pinafore/routes/statuses/[statusId]/reply.html

53 lines
1.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<:Head>
<title>Pinafore Reply</title>
</:Head>
<Layout page='reply' >
<DynamicPageBanner title=""/>
<div class="reply-container">
{{#if status}}
<Status index="0"
length="1"
timelineType="reply"
timelineValue="{{params.statusId}}"
:status
/>
<ComposeBox realm="{{params.statusId}}" />
{{else}}
<LoadingPage />
{{/if}}
</div>
</Layout>
<style>
.reply-container {
position: relative;
margin-top: 20px;
min-height: 60vh;
}
</style>
<script>
import Layout from '../../_components/Layout.html'
import { store } from '../../_store/store.js'
import DynamicPageBanner from '../../_components/DynamicPageBanner.html'
import LoadingPage from '../../_components/LoadingPage.html'
import ComposeBox from '../../_components/compose/ComposeBox.html'
import Status from '../../_components/status/Status.html'
import { database } from '../../_database/database'
export default {
async oncreate() {
let statusId = this.get('params').statusId
let instanceName = this.store.get('currentInstance')
let status = await database.getStatus(instanceName, statusId)
this.set({status})
},
store: () => store,
components: {
Layout,
DynamicPageBanner,
LoadingPage,
ComposeBox,
Status
}
}
</script>