parent
debc0086fa
commit
9b73e897df
13 changed files with 293 additions and 17 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import { faAt, faListUl, faEye, faEyeSlash, faBan, faPencilAlt, faComments, faUsers, faMicrophoneSlash } from '@fortawesome/free-solid-svg-icons';
|
||||
import { faAt, faListUl, faEye, faEyeSlash, faBan, faPencilAlt, faComments, faUsers, faMicrophoneSlash, faPlug } from '@fortawesome/free-solid-svg-icons';
|
||||
import { faSnowflake, faEnvelope } from '@fortawesome/free-regular-svg-icons';
|
||||
import XMenu from './menu.vue';
|
||||
import copyToClipboard from '../scripts/copy-to-clipboard';
|
||||
|
@ -80,6 +80,16 @@ export default Vue.extend({
|
|||
}]);
|
||||
}
|
||||
|
||||
if (this.$store.state.userActions.length > 0) {
|
||||
menu = menu.concat([null, ...this.$store.state.userActions.map(action => ({
|
||||
icon: faPlug,
|
||||
text: action.title,
|
||||
action: () => {
|
||||
action.handler(this.user);
|
||||
}
|
||||
}))]);
|
||||
}
|
||||
|
||||
return {
|
||||
items: menu
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue