pinafore/routes/_components/dialog/AccountProfileOptionsDialog.html

49 lines
1 KiB
HTML
Raw Normal View History

2018-04-05 04:45:19 +00:00
<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'
2018-04-07 07:21:00 +00:00
import { importDialogs } from '../../_utils/asyncModules'
2018-04-05 04:45:19 +00:00
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})
},
2018-04-07 07:21:00 +00:00
async onClick() {
2018-04-05 04:45:19 +00:00
let account = this.get('account')
2018-04-07 07:21:00 +00:00
this.store.setComposeData('dialog', {
2018-04-05 04:45:19 +00:00
text: `@${account.acct} `
})
2018-04-07 07:21:00 +00:00
let dialogs = await importDialogs()
dialogs.showComposeDialog()
2018-04-05 04:45:19 +00:00
this.set({closed: true})
}
}
}
</script>