From eaa92e784d89c5bbaaed8efb0ed096005d2460f8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 17 Nov 2020 22:52:07 +0900 Subject: [PATCH] Resolve #6840 --- src/client/components/launch-pad.vue | 152 +++++++++++++++++++++++++++ src/client/components/sidebar.vue | 28 +---- 2 files changed, 155 insertions(+), 25 deletions(-) create mode 100644 src/client/components/launch-pad.vue diff --git a/src/client/components/launch-pad.vue b/src/client/components/launch-pad.vue new file mode 100644 index 0000000000..d09a4002df --- /dev/null +++ b/src/client/components/launch-pad.vue @@ -0,0 +1,152 @@ + + + + + diff --git a/src/client/components/sidebar.vue b/src/client/components/sidebar.vue index bda3902a1f..3d4f9f5046 100644 --- a/src/client/components/sidebar.vue +++ b/src/client/components/sidebar.vue @@ -45,7 +45,7 @@ import { defineComponent } from 'vue'; import { faGripVertical, faChevronLeft, faHashtag, faBroadcastTower, faFireAlt, faEllipsisH, faPencilAlt, faBars, faTimes, faSearch, faUserCog, faCog, faUser, faHome, faStar, faCircle, faAt, faListUl, faPlus, faUserClock, faUsers, faTachometerAlt, faExchangeAlt, faGlobe, faChartBar, faCloud, faServer, faInfoCircle, faQuestionCircle, faProjectDiagram, faStream, faExclamationCircle } from '@fortawesome/free-solid-svg-icons'; import { faBell, faEnvelope, faLaugh, faComments } from '@fortawesome/free-regular-svg-icons'; -import { host, instanceName } from '@/config'; +import { host } from '@/config'; import { search } from '@/scripts/search'; import * as os from '@/os'; import { sidebarDef } from '@/sidebar'; @@ -223,30 +223,8 @@ export default defineComponent({ }, more(ev) { - const items = Object.keys(this.menuDef).filter(k => !this.menu.includes(k)).map(k => this.menuDef[k]).filter(def => def.show == null ? true : def.show).map(def => ({ - type: def.to ? 'link' : 'button', - text: this.$t(def.title), - icon: def.icon, - to: def.to, - action: def.action, - indicate: def.indicated, - })); - os.modalMenu([...items, null, { - type: 'link', - text: this.$t('help'), - to: '/docs', - icon: faQuestionCircle, - }, { - type: 'link', - text: this.$t('aboutX', { x: instanceName }), - to: '/about', - icon: faInfoCircle, - }, { - type: 'link', - text: this.$t('aboutMisskey'), - to: '/about-misskey', - icon: faInfoCircle, - }], ev.currentTarget || ev.target); + os.popup(import('./launch-pad.vue'), {}, { + }, 'closed'); }, addAcount() {