1
0
mirror of https://github.com/elk-zone/elk synced 2024-12-12 13:48:04 +09:00
elk/pages/intent/post.vue

26 lines
658 B
Vue
Raw Normal View History

2023-01-04 02:46:04 +09:00
<script setup lang="ts">
2023-01-08 15:21:09 +09:00
import type { mastodon } from 'masto'
2023-01-04 02:46:04 +09:00
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,
2023-01-08 15:21:09 +09:00
visibility: route.query.visibility as mastodon.v1.StatusVisibility,
2023-01-04 02:46:04 +09:00
language: route.query.language as string,
}), true)
// TODO: need a better idea 👀
await router.replace('/home')
})
</script>
<template>
<div>
<slot />
</div>
</template>