mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-03 05:26:05 +02:00
improve i18n and fix tooltip focus behavior
This commit is contained in:
@@ -73,7 +73,6 @@
|
|||||||
<Button
|
<Button
|
||||||
class="mt-1"
|
class="mt-1"
|
||||||
size="xs"
|
size="xs"
|
||||||
variant="outline"
|
|
||||||
:disabled="!!instance?.closedAt"
|
:disabled="!!instance?.closedAt"
|
||||||
@click="closeInstance(resolvedInstanceLocation)">
|
@click="closeInstance(resolvedInstanceLocation)">
|
||||||
{{ t('dialog.user.info.close_instance') }}
|
{{ t('dialog.user.info.close_instance') }}
|
||||||
|
|||||||
@@ -217,7 +217,7 @@
|
|||||||
<span
|
<span
|
||||||
class="h-3 w-3 shrink-0 rounded-sm"
|
class="h-3 w-3 shrink-0 rounded-sm"
|
||||||
:style="{ backgroundColor: theme.swatch }" />
|
:style="{ backgroundColor: theme.swatch }" />
|
||||||
<span class="truncate">{{ theme.label }}</span>
|
<span class="truncate">{{ themeColorDisplayName(theme) }}</span>
|
||||||
</span>
|
</span>
|
||||||
</DropdownMenuCheckboxItem>
|
</DropdownMenuCheckboxItem>
|
||||||
</DropdownMenuSubContent>
|
</DropdownMenuSubContent>
|
||||||
@@ -235,7 +235,7 @@
|
|||||||
indicator-position="right"
|
indicator-position="right"
|
||||||
@select="handleTableDensitySelect('standard')">
|
@select="handleTableDensitySelect('standard')">
|
||||||
<span>{{
|
<span>{{
|
||||||
t('view.settings.appearance.appearance.table_density_standard')
|
t('view.settings.appearance.appearance.table_density_comfortable')
|
||||||
}}</span>
|
}}</span>
|
||||||
</DropdownMenuCheckboxItem>
|
</DropdownMenuCheckboxItem>
|
||||||
<DropdownMenuCheckboxItem
|
<DropdownMenuCheckboxItem
|
||||||
@@ -243,7 +243,7 @@
|
|||||||
indicator-position="right"
|
indicator-position="right"
|
||||||
@select="handleTableDensitySelect('comfortable')">
|
@select="handleTableDensitySelect('comfortable')">
|
||||||
<span>{{
|
<span>{{
|
||||||
t('view.settings.appearance.appearance.table_density_comfortable')
|
t('view.settings.appearance.appearance.table_density_standard')
|
||||||
}}</span>
|
}}</span>
|
||||||
</DropdownMenuCheckboxItem>
|
</DropdownMenuCheckboxItem>
|
||||||
<DropdownMenuCheckboxItem
|
<DropdownMenuCheckboxItem
|
||||||
@@ -567,6 +567,18 @@
|
|||||||
return THEME_CONFIG[themeKey]?.name ?? themeKey;
|
return THEME_CONFIG[themeKey]?.name ?? themeKey;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const themeColorDisplayName = (theme) => {
|
||||||
|
if (!theme) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
const i18nKey = `view.settings.appearance.theme_color.${theme.key}`;
|
||||||
|
const translated = t(i18nKey);
|
||||||
|
if (translated !== i18nKey) {
|
||||||
|
return translated;
|
||||||
|
}
|
||||||
|
return theme.label || theme.key;
|
||||||
|
};
|
||||||
|
|
||||||
const handleSettingsClick = () => {
|
const handleSettingsClick = () => {
|
||||||
router.push({ name: 'settings' });
|
router.push({ name: 'settings' });
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -197,17 +197,12 @@
|
|||||||
<TooltipWrapper
|
<TooltipWrapper
|
||||||
v-if="avatarDialog.isFavorite"
|
v-if="avatarDialog.isFavorite"
|
||||||
side="top"
|
side="top"
|
||||||
:ignore-non-keyboard-focus="true"
|
|
||||||
:content="t('dialog.avatar.actions.favorite_tooltip')">
|
:content="t('dialog.avatar.actions.favorite_tooltip')">
|
||||||
<Button class="rounded-full" size="icon-lg" @click="avatarDialogCommand('Add Favorite')"
|
<Button class="rounded-full" size="icon-lg" @click="avatarDialogCommand('Add Favorite')"
|
||||||
><Star
|
><Star
|
||||||
/></Button>
|
/></Button>
|
||||||
</TooltipWrapper>
|
</TooltipWrapper>
|
||||||
<TooltipWrapper
|
<TooltipWrapper v-else side="top" :content="t('dialog.avatar.actions.favorite_tooltip')">
|
||||||
v-else
|
|
||||||
side="top"
|
|
||||||
:ignore-non-keyboard-focus="true"
|
|
||||||
:content="t('dialog.avatar.actions.favorite_tooltip')">
|
|
||||||
<Button
|
<Button
|
||||||
class="rounded-full"
|
class="rounded-full"
|
||||||
size="icon-lg"
|
size="icon-lg"
|
||||||
|
|||||||
@@ -4,15 +4,10 @@
|
|||||||
<TooltipWrapper
|
<TooltipWrapper
|
||||||
v-if="userDialog.isFavorite"
|
v-if="userDialog.isFavorite"
|
||||||
side="top"
|
side="top"
|
||||||
:ignore-non-keyboard-focus="true"
|
|
||||||
:content="t('dialog.user.actions.unfavorite_tooltip')">
|
:content="t('dialog.user.actions.unfavorite_tooltip')">
|
||||||
<Button class="rounded-full" size="icon-lg" @click="userDialogCommand('Add Favorite')"><Star /></Button>
|
<Button class="rounded-full" size="icon-lg" @click="userDialogCommand('Add Favorite')"><Star /></Button>
|
||||||
</TooltipWrapper>
|
</TooltipWrapper>
|
||||||
<TooltipWrapper
|
<TooltipWrapper v-else side="top" :content="t('dialog.user.actions.favorite_tooltip')">
|
||||||
v-else
|
|
||||||
side="top"
|
|
||||||
:ignore-non-keyboard-focus="true"
|
|
||||||
:content="t('dialog.user.actions.favorite_tooltip')">
|
|
||||||
<Button class="rounded-full" size="icon-lg" variant="outline" @click="userDialogCommand('Add Favorite')"
|
<Button class="rounded-full" size="icon-lg" variant="outline" @click="userDialogCommand('Add Favorite')"
|
||||||
><Star
|
><Star
|
||||||
/></Button>
|
/></Button>
|
||||||
|
|||||||
@@ -172,17 +172,12 @@
|
|||||||
<TooltipWrapper
|
<TooltipWrapper
|
||||||
v-if="worldDialog.isFavorite"
|
v-if="worldDialog.isFavorite"
|
||||||
side="top"
|
side="top"
|
||||||
:ignore-non-keyboard-focus="true"
|
|
||||||
:content="t('dialog.world.actions.favorites_tooltip')">
|
:content="t('dialog.world.actions.favorites_tooltip')">
|
||||||
<Button class="rounded-full" size="icon-lg" @click="worldDialogCommand('Add Favorite')"
|
<Button class="rounded-full" size="icon-lg" @click="worldDialogCommand('Add Favorite')"
|
||||||
><Star
|
><Star
|
||||||
/></Button>
|
/></Button>
|
||||||
</TooltipWrapper>
|
</TooltipWrapper>
|
||||||
<TooltipWrapper
|
<TooltipWrapper v-else side="top" :content="t('dialog.world.actions.favorites_tooltip')">
|
||||||
v-else
|
|
||||||
side="top"
|
|
||||||
:ignore-non-keyboard-focus="true"
|
|
||||||
:content="t('dialog.world.actions.favorites_tooltip')">
|
|
||||||
<Button
|
<Button
|
||||||
class="rounded-full"
|
class="rounded-full"
|
||||||
size="icon-lg"
|
size="icon-lg"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const props = defineProps({
|
|||||||
disableHoverableContent: { type: Boolean, required: false },
|
disableHoverableContent: { type: Boolean, required: false },
|
||||||
disableClosingTrigger: { type: Boolean, required: false },
|
disableClosingTrigger: { type: Boolean, required: false },
|
||||||
disabled: { type: Boolean, required: false },
|
disabled: { type: Boolean, required: false },
|
||||||
ignoreNonKeyboardFocus: { type: Boolean, required: false }
|
ignoreNonKeyboardFocus: { type: Boolean, required: false, default: true }
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
sideOffset: { type: Number, required: false },
|
sideOffset: { type: Number, required: false },
|
||||||
delayDuration: { type: Number, required: false },
|
delayDuration: { type: Number, required: false },
|
||||||
disableHoverableContent: { type: Boolean, required: false },
|
disableHoverableContent: { type: Boolean, required: false },
|
||||||
ignoreNonKeyboardFocus: { type: Boolean, required: false },
|
ignoreNonKeyboardFocus: { type: Boolean, required: false, default: true },
|
||||||
disabled: { type: Boolean, required: false },
|
disabled: { type: Boolean, required: false },
|
||||||
triggerAsChild: { type: Boolean, required: false, default: true },
|
triggerAsChild: { type: Boolean, required: false, default: true },
|
||||||
contentClass: { type: null, required: false }
|
contentClass: { type: null, required: false }
|
||||||
|
|||||||
@@ -614,7 +614,15 @@
|
|||||||
"force_iso_date_format": "Force ISO Date Format"
|
"force_iso_date_format": "Force ISO Date Format"
|
||||||
},
|
},
|
||||||
"theme_color": {
|
"theme_color": {
|
||||||
"header": "Theme Color"
|
"header": "Theme Color",
|
||||||
|
"default": "Zinc",
|
||||||
|
"blue": "Blue",
|
||||||
|
"green": "Green",
|
||||||
|
"orange": "Orange",
|
||||||
|
"red": "Red",
|
||||||
|
"rose": "Rose",
|
||||||
|
"violet": "Violet",
|
||||||
|
"yellow": "Yellow"
|
||||||
},
|
},
|
||||||
"side_panel": {
|
"side_panel": {
|
||||||
"header": "Side Panel",
|
"header": "Side Panel",
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export const THEME_CONFIG = {
|
|||||||
export const THEME_COLORS = [
|
export const THEME_COLORS = [
|
||||||
{
|
{
|
||||||
key: 'default',
|
key: 'default',
|
||||||
label: 'Default',
|
label: 'Zinc',
|
||||||
swatch: 'oklch(0.205 0 0)',
|
swatch: 'oklch(0.205 0 0)',
|
||||||
file: null
|
file: null
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user