From d7222dd56adb0da6e81c84ea93651cf1901450c8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Jul 2022 21:06:33 +0900 Subject: [PATCH] enhance(client): tweak ui --- packages/client/src/components/launch-pad.vue | 36 ---- .../client/src/components/ui/child-menu.vue | 63 ++++++ packages/client/src/components/ui/menu.vue | 187 +++++++++++++----- .../client/src/components/ui/popup-menu.vue | 2 +- packages/client/src/components/ui/tooltip.vue | 158 ++------------- packages/client/src/scripts/popup-position.ts | 158 +++++++++++++++ packages/client/src/types/menu.ts | 7 +- packages/client/src/ui/_common_/common.vue | 66 +++---- .../src/ui/_common_/navbar-for-mobile.vue | 30 +++ packages/client/src/ui/_common_/navbar.vue | 30 +++ 10 files changed, 462 insertions(+), 275 deletions(-) create mode 100644 packages/client/src/components/ui/child-menu.vue create mode 100644 packages/client/src/scripts/popup-position.ts diff --git a/packages/client/src/components/launch-pad.vue b/packages/client/src/components/launch-pad.vue index 4693df291..7891f61bf 100644 --- a/packages/client/src/components/launch-pad.vue +++ b/packages/client/src/components/launch-pad.vue @@ -15,20 +15,6 @@ -
- - - -
{{ $ts.instanceInfo }}
-
- - -
{{ $ts.aboutMisskey }}
-
-
@@ -74,28 +60,6 @@ const items = Object.keys(navbarItemDef).filter(k => !menu.includes(k)).map(k => function close() { modal.close(); } - -function help(ev: MouseEvent) { - os.popupMenu([{ - type: 'link', - to: '/mfm-cheat-sheet', - text: i18n.ts._mfm.cheatSheet, - icon: 'fas fa-code', - }, { - type: 'link', - to: '/scratchpad', - text: i18n.ts.scratchpad, - icon: 'fas fa-terminal', - }, null, { - text: i18n.ts.document, - icon: 'fas fa-question-circle', - action: () => { - window.open('https://misskey-hub.net/help.html', '_blank'); - }, - }], ev.currentTarget ?? ev.target); - - close(); -} diff --git a/packages/client/src/components/ui/menu.vue b/packages/client/src/components/ui/menu.vue index 6ad63c2ad..26283ffe5 100644 --- a/packages/client/src/components/ui/menu.vue +++ b/packages/client/src/components/ui/menu.vue @@ -1,55 +1,67 @@