Change detailed note tabs design

This commit is contained in:
Freeplay 2023-05-20 12:08:20 -04:00
parent 19aeaec4ce
commit fcaf71b120
2 changed files with 22 additions and 8 deletions

View file

@ -33,37 +33,32 @@
detailedView
></MkNote>
<MkTab v-model="tab" :style="'chips'" @update:modelValue="loadTab">
<MkTab v-model="tab" :style="'underline'" @update:modelValue="loadTab">
<option value="replies">
<i class="ph-arrow-u-up-left ph-bold ph-lg"></i>
<template v-if="appearNote.repliesCount > 0">
<span class="count">{{ appearNote.repliesCount }}</span>
</template>
{{ i18n.ts._notification._types.reply }}
</option>
<option value="renotes">
<i class="ph-repeat ph-bold ph-lg"></i>
<template v-if="appearNote.renoteCount > 0">
<span class="count">{{ appearNote.renoteCount }}</span>
</template>
{{ i18n.ts._notification._types.renote }}
</option>
<option value="quotes">
<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>
<template v-if="reactionsCount > 0">
<span class="count">{{ reactionsCount }}</span>
</template>
{{ i18n.ts.reaction }}
</option>
<option value="clips">
<i class="ph-paperclip ph-bold ph-lg"></i>
<template v-if="clips?.length > 0">
<span class="count">{{ clips.length }}</span>
</template>

View file

@ -16,7 +16,10 @@ export default defineComponent({
return h(
"div",
{
class: ["pxhvhrfw", { chips: this.style === "chips" }],
class: ["pxhvhrfw",
{ chips: this.style === "chips" },
{ underline: this.style === "underline" }
],
role: "tablist",
},
options.map((option) =>
@ -85,7 +88,7 @@ export default defineComponent({
}
}
&.chips {
&.chips, &.underline {
padding: 12px 32px;
font-size: 0.85em;
overflow-x: auto;
@ -118,6 +121,22 @@ export default defineComponent({
}
}
&.underline {
padding-block: 0 !important;
margin-bottom: -1px;
button {
background: none !important;
border-radius: 0 !important;
padding-block: 10px !important;
border-bottom: 2px solid transparent;
&[aria-selected="true"] {
background: none !important;
font-weight: 700;
border-bottom-color: var(--accent);
}
}
}
&.max-width_500px {
font-size: 80%;