pinafore/routes/_components/dialog/ComposeDialog.html

34 lines
715 B
HTML
Raw Normal View History

2018-04-05 05:33:17 +02:00
<ModalDialog
:label
:shown
:closed
:title
background="var(--main-bg)"
on:destroyDialog="destroy()"
>
2018-04-03 05:49:33 +02:00
<ComposeBox realm="dialog" size="slim" autoFocus="true" on:postedStatus="onPostedStatus()" />
2018-03-27 09:02:55 +02:00
</ModalDialog>
<script>
import ModalDialog from './ModalDialog.html'
import ComposeBox from '../compose/ComposeBox.html'
export default {
components: {
ModalDialog,
ComposeBox
},
methods: {
async show() {
this.set({shown: true})
},
onPostedStatus() {
try {
this.set({closed: true})
} catch (e) {
// TODO: this seems to error sometimes, not sure why
console.error(e)
}
2018-03-27 09:02:55 +02:00
}
}
}
</script>