mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-22 12:03:25 -04:00
style(profile): hide voice labels as they don’t make much sense there
This commit is contained in:
parent
fe7644a718
commit
80827277bb
@ -26,8 +26,9 @@ withDefaults(defineProps<{
|
||||
<PronunciationSpeaker
|
||||
v-for="voice in voices"
|
||||
:key="voice"
|
||||
:pronunciation="pronunciation"
|
||||
:voice="voice"
|
||||
:pronunciation
|
||||
:voice
|
||||
:show-voice-label="voices.length > 1"
|
||||
class="btn btn-sm btn-link px-1 py-0"
|
||||
/>
|
||||
</span>
|
||||
|
@ -6,7 +6,7 @@ import type { VoiceKey } from '#shared/pronunciation/voices.ts';
|
||||
const props = withDefaults(defineProps<{
|
||||
pronunciation?: string | null;
|
||||
voice: VoiceKey;
|
||||
button?: boolean;
|
||||
showVoiceLabel?: boolean;
|
||||
}>(), {
|
||||
pronunciation: null,
|
||||
});
|
||||
@ -58,7 +58,10 @@ const icon = computed((): string => {
|
||||
});
|
||||
|
||||
const config = useConfig();
|
||||
const name = computed((): string | null => {
|
||||
const voiceLabel = computed((): string | null => {
|
||||
if (!props.showVoiceLabel) {
|
||||
return null;
|
||||
}
|
||||
if (!config.pronunciation?.enabled) {
|
||||
return props.voice.toUpperCase();
|
||||
}
|
||||
@ -83,6 +86,6 @@ const name = computed((): string | null => {
|
||||
target="_blank"
|
||||
@click.prevent="pronounce"
|
||||
>
|
||||
<Icon :v="icon" /><sub v-if="name">{{ name }}</sub>
|
||||
<Icon :v="icon" /><sub v-if="voiceLabel">{{ voiceLabel }}</sub>
|
||||
</Tooltip>
|
||||
</template>
|
||||
|
Loading…
x
Reference in New Issue
Block a user