mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
add custom font system-ui
This commit is contained in:
@@ -553,12 +553,13 @@
|
||||
"bio_language": "Target Language",
|
||||
"theme_mode": "Theme",
|
||||
"font_family": "Font",
|
||||
"font_family_tooltip": "Does not change CJK fonts",
|
||||
"font_family_tooltip": "Only the system font affects CJK characters",
|
||||
"font_family_inter": "Inter",
|
||||
"font_family_noto_sans": "Noto Sans",
|
||||
"font_family_source_sans_3": "Source Sans 3",
|
||||
"font_family_ibm_plex_sans": "IBM Plex Sans",
|
||||
"font_family_harmonyos_sans": "HarmonyOS Sans",
|
||||
"font_family_system_ui": "System Font",
|
||||
"theme_mode_system": "System",
|
||||
"theme_mode_light": "Light",
|
||||
"theme_mode_dark": "Dark",
|
||||
|
||||
@@ -6,8 +6,9 @@ const APP_FONT_CONFIG = Object.freeze({
|
||||
link: null
|
||||
},
|
||||
noto_sans: {
|
||||
cssName: "'Noto Sans Variable'",
|
||||
link: null
|
||||
cssName: "'Noto Sans'",
|
||||
cssImport:
|
||||
"@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&family=Noto+Sans:ital,wght@0,100..900;1,100..900&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap');"
|
||||
},
|
||||
source_sans_3: {
|
||||
cssName: "'Source Sans 3'",
|
||||
@@ -23,6 +24,10 @@ const APP_FONT_CONFIG = Object.freeze({
|
||||
cssName: "'HarmonyOS Sans'",
|
||||
cssImport:
|
||||
"@import url('https://fonts.cdnfonts.com/css/harmonyos-sans');"
|
||||
},
|
||||
system_ui: {
|
||||
cssName: 'system-ui',
|
||||
link: null
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@import '@fontsource-variable/inter';
|
||||
@import '@fontsource-variable/noto-sans';
|
||||
|
||||
@import '@fontsource-variable/noto-sans-jp';
|
||||
@import '@fontsource-variable/noto-sans-kr';
|
||||
|
||||
@@ -50,9 +50,12 @@
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectGroup>
|
||||
<SelectItem v-for="fontKey in appFontFamilyOptions" :key="fontKey" :value="fontKey">
|
||||
{{ t(`view.settings.appearance.appearance.font_family_${fontKey}`) }}
|
||||
</SelectItem>
|
||||
<template v-for="option in appFontFamilyOptions" :key="option.key">
|
||||
<SelectSeparator v-if="option.type === 'separator'" />
|
||||
<SelectItem v-else :value="option.key">
|
||||
{{ t(`view.settings.appearance.appearance.font_family_${option.key}`) }}
|
||||
</SelectItem>
|
||||
</template>
|
||||
</SelectGroup>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
@@ -427,8 +430,16 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectGroup,
|
||||
SelectItem,
|
||||
SelectSeparator,
|
||||
SelectTrigger,
|
||||
SelectValue
|
||||
} from '@/components/ui/select';
|
||||
import { ListboxContent, ListboxFilter, ListboxItem, ListboxItemIndicator, ListboxRoot, useFilter } from 'reka-ui';
|
||||
import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||
import {
|
||||
NumberField,
|
||||
NumberFieldContent,
|
||||
@@ -522,7 +533,14 @@
|
||||
setAppFontFamily
|
||||
} = appearanceSettingsStore;
|
||||
|
||||
const appFontFamilyOptions = APP_FONT_FAMILIES;
|
||||
const appFontFamilyOptions = computed(() => {
|
||||
const fontKeys = APP_FONT_FAMILIES.filter((key) => key !== 'system_ui');
|
||||
return [
|
||||
...fontKeys.map((key) => ({ type: 'item', key })),
|
||||
{ type: 'separator', key: 'separator-system-ui' },
|
||||
{ type: 'item', key: 'system_ui' }
|
||||
];
|
||||
});
|
||||
|
||||
const zoomLevel = ref(100);
|
||||
const isLinux = computed(() => LINUX);
|
||||
|
||||
Reference in New Issue
Block a user