1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-05 08:29:57 +00:00
elk/pages/intent/post.vue

26 lines
654 B
Vue
Raw Normal View History

2023-01-03 17:46:04 +00:00
<script setup lang="ts">
import type { StatusVisibility } from 'masto'
const router = useRouter()
const route = useRoute()
onMounted(async () => {
// TODO: login check
await openPublishDialog('intent', getDefaultDraft({
status: route.query.text as string,
sensitive: route.query.sensitive === 'true' || route.query.sensitive === null,
spoilerText: route.query.spoiler_text as string,
visibility: route.query.visibility as StatusVisibility,
language: route.query.language as string,
}), true)
// TODO: need a better idea 👀
await router.replace('/home')
})
</script>
<template>
<div>
<slot />
</div>
</template>