pinafore/routes/_components/dialog/components/AccountProfileOptionsDialog.html
2018-04-08 16:56:20 -07:00

54 lines
1.2 KiB
HTML

<ModalDialog
:id
:label
:title
background="var(--main-bg)"
>
<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'
import { createDialogId } from '../helpers/createDialogId'
import { show } from '../helpers/showDialog'
import { close } from '../helpers/closeDialog'
import { oncreate } from '../helpers/onCreateDialog'
export default {
oncreate,
store: () => store,
data: () => ({
id: createDialogId()
}),
computed: {
items: (account) => (
[
{
key: 'mention',
label: 'Mention @' + (account.acct),
icon: '#fa-comments'
}
]
)
},
methods: {
show,
close,
async onClick() {
let account = this.get('account')
this.store.setComposeData('dialog', {
text: `@${account.acct} `
})
let dialogs = await importDialogs()
dialogs.showComposeDialog()
this.close()
}
},
components: {
ModalDialog,
GenericDialogList
},
}
</script>