feat: ✨ Better tabs for mobile
This commit is contained in:
parent
60fb59c878
commit
9b3ad73576
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "calckey",
|
"name": "calckey",
|
||||||
"version": "12.118.1-calc.2-beta.2-rc.9",
|
"version": "12.118.1-calc.2-beta.2-rc.10",
|
||||||
"codename": "aqua",
|
"codename": "aqua",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -14,16 +14,17 @@
|
||||||
<div v-if="!narrow && metadata.subtitle" class="subtitle">
|
<div v-if="!narrow && metadata.subtitle" class="subtitle">
|
||||||
{{ metadata.subtitle }}
|
{{ metadata.subtitle }}
|
||||||
</div>
|
</div>
|
||||||
<div v-if="narrow && hasTabs" class="subtitle activeTab">
|
<!-- <div v-if="narrow && hasTabs" class="subtitle activeTab">
|
||||||
{{ tabs.find(tab => tab.key === props.tab)?.title }}
|
{{ tabs.find(tab => tab.key === props.tab)?.title }}
|
||||||
<i class="chevron fas fa-chevron-down"></i>
|
<i class="chevron fas fa-chevron-down"></i>
|
||||||
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div v-if="hideTitle" class="tabs"> <!-- v-if="!narrow || hideTitle" -->
|
||||||
<div v-if="!narrow || hideTitle" class="tabs">
|
<!-- eslint-disable-next-line vue/require-v-for-key -->
|
||||||
<button v-for="tab in tabs" :ref="(el) => tabRefs[tab.key] = el" v-tooltip.noDelay="tab.title" class="tab _button" :class="{ active: tab.key != null && tab.key === props.tab }" @mousedown="(ev) => onTabMousedown(tab, ev)" @click="(ev) => onTabClick(tab, ev)">
|
<button v-for="tab in tabs" :ref="(el) => tabRefs[tab.key] = el" v-tooltip.noDelay="tab.title" class="tab _button" :class="{ active: tab.key != null && tab.key === props.tab }" @mousedown="(ev) => onTabMousedown(tab, ev)" @click="(ev) => onTabClick(tab, ev)">
|
||||||
<i v-if="tab.icon" class="icon" :class="tab.icon"></i>
|
<i v-if="tab.icon" class="icon" :class="tab.icon"></i>
|
||||||
<span v-if="!tab.iconOnly" class="title">{{ tab.title }}</span>
|
<span v-if="!tab.iconOnly && !narrow" class="title">{{ tab.title }}</span>
|
||||||
</button>
|
</button>
|
||||||
<div ref="tabHighlightEl" class="highlight"></div>
|
<div ref="tabHighlightEl" class="highlight"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -115,6 +115,7 @@ const headerActions = $computed(() => []);
|
||||||
let theTabs = [{
|
let theTabs = [{
|
||||||
key: 'overview',
|
key: 'overview',
|
||||||
title: i18n.ts.overview,
|
title: i18n.ts.overview,
|
||||||
|
icon: 'fas fa-sitemap',
|
||||||
}, {
|
}, {
|
||||||
key: 'emojis',
|
key: 'emojis',
|
||||||
title: i18n.ts.customEmojis,
|
title: i18n.ts.customEmojis,
|
||||||
|
|
|
@ -77,6 +77,7 @@ const headerTabs = $computed(() => [{
|
||||||
title: i18n.ts.users,
|
title: i18n.ts.users,
|
||||||
}, {
|
}, {
|
||||||
key: 'search',
|
key: 'search',
|
||||||
|
icon: 'fas fa-magnifying-glass',
|
||||||
title: i18n.ts.search,
|
title: i18n.ts.search,
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
|
|
|
@ -93,17 +93,23 @@ const headerActions = $computed(() => [tab === 'all' ? {
|
||||||
const headerTabs = $computed(() => [{
|
const headerTabs = $computed(() => [{
|
||||||
key: 'all',
|
key: 'all',
|
||||||
title: i18n.ts.all,
|
title: i18n.ts.all,
|
||||||
|
icon: 'fas fa-bell',
|
||||||
|
iconOnly: true,
|
||||||
}, {
|
}, {
|
||||||
key: 'unread',
|
key: 'unread',
|
||||||
title: i18n.ts.unread,
|
title: i18n.ts.unread,
|
||||||
|
icon: 'fas fa-exclamation',
|
||||||
|
iconOnly: true,
|
||||||
}, {
|
}, {
|
||||||
key: 'mentions',
|
key: 'mentions',
|
||||||
title: i18n.ts.mentions,
|
title: i18n.ts.mentions,
|
||||||
icon: 'fas fa-at',
|
icon: 'fas fa-at',
|
||||||
|
iconOnly: true,
|
||||||
}, {
|
}, {
|
||||||
key: 'directNotes',
|
key: 'directNotes',
|
||||||
title: i18n.ts.directNotes,
|
title: i18n.ts.directNotes,
|
||||||
icon: 'fas fa-envelope',
|
icon: 'fas fa-envelope',
|
||||||
|
iconOnly: true,
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
definePageMetadata(computed(() => ({
|
definePageMetadata(computed(() => ({
|
||||||
|
|
Loading…
Reference in New Issue