mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-24 10:16:06 +03:00
feat: basic post intent support
This commit is contained in:
parent
564a754a4d
commit
9871327a72
1 changed files with 25 additions and 0 deletions
25
pages/intent/post.vue
Normal file
25
pages/intent/post.vue
Normal file
|
@ -0,0 +1,25 @@
|
|||
<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>
|
Loading…
Reference in a new issue