summaryrefslogtreecommitdiff
path: root/src/client/components/user-menu.vue
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2020-07-12 00:38:55 +0900
committerGitHub <noreply@github.com>2020-07-12 00:38:55 +0900
commit9b73e897df134ba57d4ac4d0e6e6924f8ddbc23d (patch)
tree2885511bc46ab67c7ef7b7b40f7598e788edcd18 /src/client/components/user-menu.vue
parentfeat(client): 無限にダイアログを出すように (diff)
downloadsharkey-9b73e897df134ba57d4ac4d0e6e6924f8ddbc23d.tar.gz
sharkey-9b73e897df134ba57d4ac4d0e6e6924f8ddbc23d.tar.bz2
sharkey-9b73e897df134ba57d4ac4d0e6e6924f8ddbc23d.zip
Plugin system (#6479)
* wip * wip * wip * wip * Update store.ts
Diffstat (limited to 'src/client/components/user-menu.vue')
-rw-r--r--src/client/components/user-menu.vue12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/client/components/user-menu.vue b/src/client/components/user-menu.vue
index 25937fb3c0..cbfa7b346d 100644
--- a/src/client/components/user-menu.vue
+++ b/src/client/components/user-menu.vue
@@ -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
};