From 137e3a5e7fb1162fabcce888385f09f657a4bb98 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 8 Feb 2023 19:04:56 -0800 Subject: [PATCH] fix navbar --- package.json | 4 +- .../src/ui/_common_/navbar-for-mobile.vue | 64 ++++++++++--------- packages/client/src/ui/_common_/navbar.vue | 55 ++++++---------- 3 files changed, 56 insertions(+), 67 deletions(-) diff --git a/package.json b/package.json index a16504cd03..2808f2c7ab 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "name": "calckey", - "version": "13.1.3-beta5", + "version": "13.1.3-beta4", "codename": "aqua", "repository": { "type": "git", "url": "https://codeberg.org/calckey/calckey.git" }, - "packageManager": "pnpm@7.26.3", + "packageManager": "pnpm@7.27.0", "private": true, "scripts": { "rebuild": "pnpm run clean && pnpm -r run build && pnpm run gulp", diff --git a/packages/client/src/ui/_common_/navbar-for-mobile.vue b/packages/client/src/ui/_common_/navbar-for-mobile.vue index 5374e67c9b..0cda5185f8 100644 --- a/packages/client/src/ui/_common_/navbar-for-mobile.vue +++ b/packages/client/src/ui/_common_/navbar-for-mobile.vue @@ -34,8 +34,8 @@ - @@ -67,7 +67,7 @@ function openAccountMenu(ev: MouseEvent) { }, ev); } -function openInstanceMenu(ev: MouseEvent) { +function openHelpMenu(ev: MouseEvent) { os.popupMenu([{ text: instance.name ?? host, type: 'label', @@ -76,37 +76,41 @@ function openInstanceMenu(ev: MouseEvent) { text: i18n.ts.instanceInfo, icon: 'ph-info-bold ph-lg', to: '/about', - }, null, { - type: 'parent', - text: i18n.ts.help, - icon: 'ph-question-bold ph-lg', - children: [{ - type: 'link', - to: '/mfm-cheat-sheet', - text: i18n.ts._mfm.cheatSheet, - icon: 'ph-code-bold ph-lg', - }, { - type: 'link', - to: '/scratchpad', - text: i18n.ts.scratchpad, - icon: 'ph-terminal-window-bold ph-lg', - }, { - type: 'link', - to: '/api-console', - text: 'API Console', - icon: 'ph-terminal-window-bold ph-lg', - }, null, { - text: i18n.ts.document, - icon: 'ph-question-bold ph-lg', - action: () => { - window.open('/api-doc', '_blank'); - }, - }], }, { type: 'link', text: i18n.ts.aboutMisskey, + icon: 'ph-lightbulb-bold ph-lg', to: '/about-calckey', - }], ev.currentTarget ?? ev.target, { + }, { + type: 'link', + text: i18n.ts._apps.apps, + icon: 'ph-device-mobile-bold ph-lg', + to: '/apps', + }, { + type: 'button', + action: async () => { + defaultStore.set('tutorial', 0); + os.popup(XTutorial, {}, {}, 'closed'); + }, + text: i18n.ts.replayTutorial, + icon: 'ph-circle-wavy-question-bold ph-lg', + }, null, { + type: 'parent', + text: i18n.ts.developer, + icon: 'ph-code-bold ph-lg', + children: [{ + type: 'link', + to: '/api-console', + text: 'API Console', + icon: 'ph-terminal-window-bold ph-lg', + }, { + text: i18n.ts.document, + icon: 'ph-plugs-bold ph-lg', + action: () => { + window.open('/api-doc', '_blank'); + }, + }] + }], ev.currentTarget ?? ev.target, { align: 'left', }); } diff --git a/packages/client/src/ui/_common_/navbar.vue b/packages/client/src/ui/_common_/navbar.vue index ea51c91124..0659c538b2 100644 --- a/packages/client/src/ui/_common_/navbar.vue +++ b/packages/client/src/ui/_common_/navbar.vue @@ -44,14 +44,9 @@ -
- - -
+ @@ -149,21 +144,7 @@ function openHelpMenu(ev: MouseEvent) { text: i18n.ts._apps.apps, icon: 'ph-device-mobile-bold ph-lg', to: '/apps', - }], ev.currentTarget ?? ev.target, { - align: 'left', - }); -} - -function openInfoMenu(ev: MouseEvent) { - os.popupMenu([{ - text: instance.name ?? host, - type: 'label', }, { - type: 'link', - to: '/mfm-cheat-sheet', - text: i18n.ts._mfm.cheatSheet, - icon: 'ph-code-bold ph-lg', - }, { type: 'button', action: async () => { defaultStore.set('tutorial', 0); @@ -171,18 +152,23 @@ function openInfoMenu(ev: MouseEvent) { }, text: i18n.ts.replayTutorial, icon: 'ph-circle-wavy-question-bold ph-lg', - }, { - type: 'link', - to: '/scratchpad', - text: i18n.ts.scratchpad, - icon: 'ph-terminal-window-bold ph-lg', - }, { - type: 'link', - to: '/api-console', - text: 'API Console', - icon: 'ph-terminal-window-bold ph-lg', - }, - ], ev.currentTarget ?? ev.target, { + }, null, { + type: 'parent', + text: i18n.ts.developer, + icon: 'ph-code-bold ph-lg', + children: [{ + type: 'link', + to: '/api-console', + text: 'API Console', + icon: 'ph-terminal-window-bold ph-lg', + }, { + text: i18n.ts.document, + icon: 'ph-plugs-bold ph-lg', + action: () => { + window.open('/api-doc', '_blank'); + }, + }] + }], ev.currentTarget ?? ev.target, { align: 'left', }); } @@ -311,7 +297,6 @@ function more(ev: MouseEvent) { } } > .info { - margin: 10px; align-items: center; display: flex; padding: 10px;