2023-01-03 20:46:04 +03:00
|
|
|
<script setup lang="ts">
|
2023-01-08 09:21:09 +03:00
|
|
|
import type { mastodon } from 'masto'
|
2023-01-03 20:46:04 +03:00
|
|
|
|
|
|
|
const router = useRouter()
|
|
|
|
const route = useRoute()
|
|
|
|
|
|
|
|
onMounted(async () => {
|
|
|
|
// TODO: login check
|
2024-04-08 12:53:26 +03:00
|
|
|
await openPublishDialog('intent', getDefaultDraftItem({
|
2023-01-03 20:46:04 +03:00
|
|
|
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 09:21:09 +03:00
|
|
|
visibility: route.query.visibility as mastodon.v1.StatusVisibility,
|
2023-01-03 20:46:04 +03:00
|
|
|
language: route.query.language as string,
|
|
|
|
}), true)
|
|
|
|
// TODO: need a better idea 👀
|
|
|
|
await router.replace('/home')
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<slot />
|
|
|
|
</div>
|
|
|
|
</template>
|