fix navbar

This commit is contained in:
ThatOneCalculator 2023-02-08 19:04:56 -08:00
parent 324439e6b3
commit 137e3a5e7f
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
3 changed files with 56 additions and 67 deletions

View File

@ -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",

View File

@ -34,8 +34,8 @@
<button class="item _button post" data-cy-open-post-form @click="os.post">
<i class="icon ph-pencil-bold ph-lg ph-fw ph-lg"></i><span class="text">{{ i18n.ts.note }}</span>
</button>
<button v-click-anime v-tooltip.noDelay.right="$instance.name ?? i18n.ts.instance" class="item _button instance" @click="openInstanceMenu">
<img :src="$instance.iconUrl || $instance.faviconUrl || '/favicon.ico'" alt="" class="icon"/>
<button v-tooltip.noDelay.right="i18n.ts.help" class="item _button help" data-cy-open-post-form @click="openHelpMenu">
<i class="icon ph-info-bold ph-xl ph-fw ph-lg"></i>
</button>
</div>
</div>
@ -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,36 +76,40 @@ function openInstanceMenu(ev: MouseEvent) {
text: i18n.ts.instanceInfo,
icon: 'ph-info-bold ph-lg',
to: '/about',
}, {
type: 'link',
text: i18n.ts.aboutMisskey,
icon: 'ph-lightbulb-bold ph-lg',
to: '/about-calckey',
}, {
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.help,
icon: 'ph-question-bold ph-lg',
children: [{
type: 'link',
to: '/mfm-cheat-sheet',
text: i18n.ts._mfm.cheatSheet,
text: i18n.ts.developer,
icon: 'ph-code-bold ph-lg',
}, {
type: 'link',
to: '/scratchpad',
text: i18n.ts.scratchpad,
icon: 'ph-terminal-window-bold ph-lg',
}, {
children: [{
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',
icon: 'ph-plugs-bold ph-lg',
action: () => {
window.open('/api-doc', '_blank');
},
}],
}, {
type: 'link',
text: i18n.ts.aboutMisskey,
to: '/about-calckey',
}]
}], ev.currentTarget ?? ev.target, {
align: 'left',
});

View File

@ -44,14 +44,9 @@
<button v-tooltip.noDelay.right="i18n.ts.note" class="item _button post" data-cy-open-post-form @click="os.post">
<i class="icon ph-pencil-bold ph-lg ph-fw ph-lg"></i><span class="text">{{ i18n.ts.note }}</span>
</button>
<div class="info">
<button v-tooltip.noDelay.right="i18n.ts.info" class="item _button help" style="margin-right: 10px" data-cy-open-post-form @click="openInfoMenu">
<button v-tooltip.noDelay.right="i18n.ts.info" class="item _button info" @click="openInfoMenu">
<i class="icon ph-info-bold ph-xl ph-fw ph-lg"></i>
</button>
<button v-tooltip.noDelay.right="i18n.ts.help" class="item _button help" style="margin-left: 10px" data-cy-open-post-form @click="openHelpMenu">
<i class="icon ph-question-bold ph-xl ph-fw ph-lg"></i>
</button>
</div>
<!-- <button v-click-anime v-tooltip.noDelay.right="$instance.name ?? i18n.ts.instance" class="item _button instance" @click="openInstanceMenu">
<img :src="$instance.iconUrl || $instance.faviconUrl || '/favicon.ico'" alt="" class="icon"/>
</button> -->
@ -149,20 +144,6 @@ 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 () => {
@ -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',
}, {
}, 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, {
}]
}], ev.currentTarget ?? ev.target, {
align: 'left',
});
}
@ -311,7 +297,6 @@ function more(ev: MouseEvent) {
}
}
> .info {
margin: 10px;
align-items: center;
display: flex;
padding: 10px;