mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-25 02:36:21 +03:00
25 lines
658 B
Vue
25 lines
658 B
Vue
<script setup lang="ts">
|
|
import type { mastodon } 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 mastodon.v1.StatusVisibility,
|
|
language: route.query.language as string,
|
|
}), true)
|
|
// TODO: need a better idea 👀
|
|
await router.replace('/home')
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<slot />
|
|
</div>
|
|
</template>
|