hide empty tabs

This commit is contained in:
Freeplay 2023-05-20 21:20:17 -04:00
parent 506420130e
commit b871746b93
2 changed files with 21 additions and 23 deletions

View File

@ -34,39 +34,29 @@
></MkNote> ></MkNote>
<MkTab v-model="tab" :style="'underline'" @update:modelValue="loadTab"> <MkTab v-model="tab" :style="'underline'" @update:modelValue="loadTab">
<option value="replies"> <option value="replies" v-if="appearNote.repliesCount > 0">
<i class="ph-arrow-u-up-left ph-bold ph-lg"></i> <i class="ph-arrow-u-up-left ph-bold ph-lg"></i>
<template v-if="appearNote.repliesCount > 0"> <span class="count">{{ appearNote.repliesCount }}</span>
<span class="count">{{ appearNote.repliesCount }}</span>
</template>
{{ i18n.ts._notification._types.reply }} {{ i18n.ts._notification._types.reply }}
</option> </option>
<option value="renotes"> <option value="renotes" v-if="appearNote.renoteCount > 0">
<i class="ph-repeat ph-bold ph-lg"></i> <i class="ph-repeat ph-bold ph-lg"></i>
<template v-if="appearNote.renoteCount > 0"> <span class="count">{{ appearNote.renoteCount }}</span>
<span class="count">{{ appearNote.renoteCount }}</span>
</template>
{{ i18n.ts._notification._types.renote }} {{ i18n.ts._notification._types.renote }}
</option> </option>
<option value="quotes"> <option value="reactions" v-if="reactionsCount > 0">
<i class="ph-quotes ph-bold ph-lg"></i>
<template v-if="directQuotes?.length > 0">
<span class="count">{{ directQuotes.length }}</span>
</template>
{{ i18n.ts._notification._types.quote }}
</option>
<option value="reactions">
<i class="ph-smiley ph-bold ph-lg"></i> <i class="ph-smiley ph-bold ph-lg"></i>
<template v-if="reactionsCount > 0"> <span class="count">{{ reactionsCount }}</span>
<span class="count">{{ reactionsCount }}</span>
</template>
{{ i18n.ts.reaction }} {{ i18n.ts.reaction }}
</option> </option>
<option value="clips"> <option value="quotes" v-if="directQuotes?.length > 0">
<i class="ph-quotes ph-bold ph-lg"></i>
<span class="count">{{ directQuotes.length }}</span>
{{ i18n.ts._notification._types.quote }}
</option>
<option value="clips" v-if="clips?.length > 0">
<i class="ph-paperclip ph-bold ph-lg"></i> <i class="ph-paperclip ph-bold ph-lg"></i>
<template v-if="clips?.length > 0"> <span class="count">{{ clips.length }}</span>
<span class="count">{{ clips.length }}</span>
</template>
{{ i18n.ts.clips }} {{ i18n.ts.clips }}
</option> </option>
</MkTab> </MkTab>
@ -518,6 +508,10 @@ onUnmounted(() => {
overflow: clip; overflow: clip;
outline: none; outline: none;
scroll-margin-top: calc(var(--stickyTop) + 20vh); scroll-margin-top: calc(var(--stickyTop) + 20vh);
&:not(:last-child) {
border-bottom: 1px solid var(--divider);
margin-bottom: 4px;
}
.article { .article {
cursor: unset; cursor: unset;
padding-bottom: 0; padding-bottom: 0;

View File

@ -86,6 +86,10 @@ export default defineComponent({
> .icon { > .icon {
margin-right: 6px; margin-right: 6px;
} }
&:empty {
display: none !important;
}
} }
&.chips, &.underline { &.chips, &.underline {