2018-04-05 04:45:19 +00:00
|
|
|
<ModalDialog
|
2018-04-08 23:56:20 +00:00
|
|
|
:id
|
2018-04-05 04:45:19 +00:00
|
|
|
:label
|
|
|
|
:title
|
|
|
|
background="var(--main-bg)"
|
|
|
|
>
|
|
|
|
<GenericDialogList :items on:click="onClick(event)"/>
|
|
|
|
</ModalDialog>
|
|
|
|
<script>
|
|
|
|
import ModalDialog from './ModalDialog.html'
|
2018-04-08 23:56:20 +00:00
|
|
|
import { store } from '../../../_store/store'
|
2018-04-05 04:45:19 +00:00
|
|
|
import GenericDialogList from './GenericDialogList.html'
|
2018-04-08 23:56:20 +00:00
|
|
|
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'
|
2018-04-05 04:45:19 +00:00
|
|
|
|
|
|
|
export default {
|
2018-04-08 23:56:20 +00:00
|
|
|
oncreate,
|
|
|
|
store: () => store,
|
|
|
|
data: () => ({
|
|
|
|
id: createDialogId()
|
|
|
|
}),
|
2018-04-05 04:45:19 +00:00
|
|
|
computed: {
|
|
|
|
items: (account) => (
|
|
|
|
[
|
|
|
|
{
|
|
|
|
key: 'mention',
|
|
|
|
label: 'Mention @' + (account.acct),
|
|
|
|
icon: '#fa-comments'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
)
|
|
|
|
},
|
|
|
|
methods: {
|
2018-04-08 23:56:20 +00:00
|
|
|
show,
|
|
|
|
close,
|
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-08 23:56:20 +00:00
|
|
|
this.close()
|
2018-04-05 04:45:19 +00:00
|
|
|
}
|
2018-04-08 23:56:20 +00:00
|
|
|
},
|
|
|
|
components: {
|
|
|
|
ModalDialog,
|
|
|
|
GenericDialogList
|
|
|
|
},
|
2018-04-05 04:45:19 +00:00
|
|
|
}
|
|
|
|
</script>
|