1
0
mirror of https://github.com/nolanlawson/pinafore synced 2025-02-02 14:56:48 +01:00
2018-04-08 16:56:20 -07:00

37 lines
843 B
HTML

<ModalDialog
:id
:label
:title
background="var(--main-bg)"
>
<ComposeBox realm="dialog" size="slim" autoFocus="true" />
</ModalDialog>
<script>
import ModalDialog from './ModalDialog.html'
import ComposeBox from '../../compose/ComposeBox.html'
import { on } from '../../../_utils/eventBus'
import { show } from '../helpers/showDialog'
import { oncreate as onCreateDialog } from '../helpers/onCreateDialog'
import { close } from '../helpers/closeDialog'
export default {
oncreate() {
on('postedStatus', this, this.onPostedStatus)
onCreateDialog.call(this)
},
methods: {
show,
close,
onPostedStatus(realm) {
if (realm !== 'dialog') {
return
}
this.close()
}
},
components: {
ModalDialog,
ComposeBox
}
}
</script>