diff --git a/frontend/locales/en.json b/frontend/locales/en.json index a5d8d626..9f01a108 100644 --- a/frontend/locales/en.json +++ b/frontend/locales/en.json @@ -104,6 +104,7 @@ "dlnaSettingsDescription": "Configure DLNA settings and profile", "editMetadata": "Edit metadata", "editPerson": "Edit person", + "enablePermission": "Enable Permission", "enableUPNP": "Enable UPnP", "endsAt": "Ends at {time}", "eps": "EPs", @@ -145,7 +146,8 @@ "lastActive": "Last active", "lastActivityDate": "Last seen {value}", "latestLibrary": "Latest {libraryName}", - "lazyLoading": "Showing {value} items. Loading moreā€¦", + "lazyLoading": "Showing {value} items. Loading more...", + "learnMore": "Learn More", "libraries": "Libraries", "librariesSettingsDescription": "Manage libraries and their metadata", "libraryAccess": "Library access", @@ -155,6 +157,7 @@ "liked": "Liked", "liveTv": "Live TV & DVR", "liveTvSettingsDescription": "Manage TV tuners, guide data providers and DVR settings", + "localFontsPermissionWarning": "Access to the local fonts permission is required to select a font.", "login": "Login", "loginAs": "Login as {name}", "logo": "Logo", @@ -279,6 +282,7 @@ "pushToBottom": "Move to the end", "pushToTop": "Move to the beginning", "quality": "Quality", + "queryLocalFontsNotSupportedWarning": "Local fonts are currently not supported by your browser.", "queue": "Queue", "queueItems": "{items} tracks", "rating": "Rating", diff --git a/frontend/src/components/Selectors/FontSelector.vue b/frontend/src/components/Selectors/FontSelector.vue new file mode 100644 index 00000000..a04f96bb --- /dev/null +++ b/frontend/src/components/Selectors/FontSelector.vue @@ -0,0 +1,74 @@ + + + diff --git a/frontend/src/pages/settings/subtitles.vue b/frontend/src/pages/settings/subtitles.vue index 99631a56..2c2c6af6 100644 --- a/frontend/src/pages/settings/subtitles.vue +++ b/frontend/src/pages/settings/subtitles.vue @@ -1,80 +1,52 @@ diff --git a/frontend/src/store/client-settings.ts b/frontend/src/store/client-settings.ts index 6b23a1ed..33dbda83 100644 --- a/frontend/src/store/client-settings.ts +++ b/frontend/src/store/client-settings.ts @@ -8,19 +8,17 @@ import { remote } from '@/plugins/remote'; import { vuetify } from '@/plugins/vuetify'; import { sealed } from '@/utils/validation'; import { SyncedStore } from '@/store/super/synced-store'; -import { FALLBACK_SUBTITLE_FONT, SUBTITLE_FONT_FAMILIES } from '@/utils/subtitles'; /** * == INTERFACES AND TYPES == * Casted typings for the CustomPrefs property of DisplayPreferencesDto */ -export type subtitleFontFamily = typeof SUBTITLE_FONT_FAMILIES[number]; export interface ClientSettingsState { darkMode: 'auto' | boolean; locale: string; subtitleAppearance: { - fontFamily: subtitleFontFamily; + fontFamily: string; fontSize: number; positionFromBottom: number; backdrop: boolean; @@ -92,7 +90,7 @@ class ClientSettingsStore extends SyncedStore { darkMode: 'auto', locale: 'auto', subtitleAppearance: { - fontFamily: SUBTITLE_FONT_FAMILIES[0], + fontFamily: 'FigTree Variable', fontSize: 1.5, positionFromBottom: 10, backdrop: true, diff --git a/frontend/src/utils/subtitles.ts b/frontend/src/utils/subtitles.ts index e746af51..553d2771 100644 --- a/frontend/src/utils/subtitles.ts +++ b/frontend/src/utils/subtitles.ts @@ -17,22 +17,6 @@ export interface ParsedSubtitleTrack { type TagMap = Record; -export const SUBTITLE_FONT_FAMILIES = [ - 'Figtree Variable', - 'Trebuchet MS', - 'Verdana', - 'Sans Serif MS', - 'Arial', - 'Courier New', - 'Times New Roman', - 'Old English Text MT', - 'Century Gothic', - 'Helvetica', - 'Garamond' -] as const; - -export const FALLBACK_SUBTITLE_FONT = 'sans-serif, system-ui'; - /** * Parse time string used in subtitle files to seconds */ diff --git a/frontend/types/global/components.d.ts b/frontend/types/global/components.d.ts index a9579b8d..51c09aaa 100644 --- a/frontend/types/global/components.d.ts +++ b/frontend/types/global/components.d.ts @@ -27,6 +27,7 @@ declare module 'vue' { DateInput: typeof import('./../../src/components/Item/Metadata/DateInput.vue')['default'] DraggableQueue: typeof import('./../../src/components/Playback/DraggableQueue.vue')['default'] FilterButton: typeof import('./../../src/components/Buttons/FilterButton.vue')['default'] + FontSelector: typeof import('./../../src/components/Selectors/FontSelector.vue')['default'] GenericDialog: typeof import('./../../src/components/Dialogs/GenericDialog.vue')['default'] GenericItemCard: typeof import('./../../src/components/Item/Card/GenericItemCard.vue')['default'] IDashiconsAlbum: typeof import('~icons/dashicons/album')['default'] @@ -156,6 +157,7 @@ declare module 'vue' { UserButton: typeof import('./../../src/components/Layout/AppBar/Buttons/UserButton.vue')['default'] UserCard: typeof import('./../../src/components/Users/UserCard.vue')['default'] UserImage: typeof import('./../../src/components/Layout/Images/UserImage.vue')['default'] + VAlert: typeof import('vuetify/components')['VAlert'] VApp: typeof import('vuetify/components')['VApp'] VAppBar: typeof import('vuetify/components')['VAppBar'] VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']