1
0
mirror of https://github.com/nolanlawson/pinafore synced 2025-02-02 22:57:36 +01:00

37 lines
845 B
HTML
Raw Normal View History

2018-04-04 20:33:17 -07:00
<ModalDialog
:id
2018-04-04 20:33:17 -07:00
:label
:title
background="var(--main-bg)"
>
2018-04-08 15:08:32 -07:00
<ComposeBox realm="dialog" size="slim" autoFocus="true" />
2018-03-27 00:02:55 -07:00
</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'
2018-03-27 00:02:55 -07:00
export default {
2018-04-19 21:38:01 -07:00
oncreate () {
2018-04-08 15:08:32 -07:00
on('postedStatus', this, this.onPostedStatus)
onCreateDialog.call(this)
2018-03-27 00:02:55 -07:00
},
methods: {
show,
close,
2018-04-19 21:38:01 -07:00
onPostedStatus (realm) {
2018-04-08 15:08:32 -07:00
if (realm !== 'dialog') {
return
}
this.close()
2018-03-27 00:02:55 -07:00
}
},
components: {
ModalDialog,
ComposeBox
2018-03-27 00:02:55 -07:00
}
}
</script>