pinafore/routes/_components/dialog/AccountProfileOptionsDialog.html
2018-04-07 00:21:00 -07:00

49 lines
1 KiB
HTML

<ModalDialog
:label
:shown
:closed
:title
background="var(--main-bg)"
on:destroyDialog="destroy()"
>
<GenericDialogList :items on:click="onClick(event)"/>
</ModalDialog>
<script>
import ModalDialog from './ModalDialog.html'
import { store } from '../../_store/store'
import GenericDialogList from './GenericDialogList.html'
import { importDialogs } from '../../_utils/asyncModules'
export default {
computed: {
items: (account) => (
[
{
key: 'mention',
label: 'Mention @' + (account.acct),
icon: '#fa-comments'
}
]
)
},
components: {
ModalDialog,
GenericDialogList
},
store: () => store,
methods: {
async show() {
this.set({shown: true})
},
async onClick() {
let account = this.get('account')
this.store.setComposeData('dialog', {
text: `@${account.acct} `
})
let dialogs = await importDialogs()
dialogs.showComposeDialog()
this.set({closed: true})
}
}
}
</script>