mirror of
https://github.com/jellyfin/jellyfin-vue.git
synced 2024-11-27 08:10:26 +00:00
fix(vuetify): remove defaultRtl handling
With [3.5.0](https://github.com/vuetifyjs/vuetify/releases/tag/v3.5.0), the defaultRtl information is hardcoded in the package and can't be treeshaken with our method. Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
parent
8305937f6f
commit
7f8bd1a0f6
@ -53,19 +53,6 @@ const vuetifyExports = localeNames
|
||||
.map((l) => localeTransform(vuetifyKeys, l))
|
||||
.filter((l): l is string => typeof l === 'string');
|
||||
|
||||
/**
|
||||
* Map the RTL value of the mapped locales
|
||||
*/
|
||||
const transformedVuetifyRtl: Record<string, boolean> = {};
|
||||
|
||||
for (const e of vuetifyExports) {
|
||||
const localeSplitted = e.includes(' as ') ? e.split(' as ') : e;
|
||||
const originalLocale = Array.isArray(localeSplitted) ? localeSplitted[0] : e;
|
||||
const targetLocale = Array.isArray(localeSplitted) ? localeSplitted[1] : e;
|
||||
|
||||
transformedVuetifyRtl[targetLocale] = vuetify.defaultRtl[originalLocale as keyof typeof vuetify.defaultRtl];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get commit hash
|
||||
*/
|
||||
@ -84,8 +71,5 @@ export default {
|
||||
'virtual:locales/vuetify': `export { ${vuetifyExports.join(
|
||||
', '
|
||||
)} } from 'vuetify/locale'`,
|
||||
'virtual:locales/vuetify/rtl': `export const defaultRtl = ${JSON.stringify(
|
||||
transformedVuetifyRtl
|
||||
)}`,
|
||||
'virtual:commit': `export const commit_hash = ${commit_hash}`
|
||||
};
|
||||
|
@ -1,5 +1,4 @@
|
||||
import * as vuetifyLocales from 'virtual:locales/vuetify';
|
||||
import { defaultRtl } from 'virtual:locales/vuetify/rtl';
|
||||
import { createVuetify, type ThemeDefinition } from 'vuetify';
|
||||
import { md3 } from 'vuetify/blueprints';
|
||||
import { aliases, mdi } from 'vuetify/iconsets/mdi-svg';
|
||||
@ -79,8 +78,7 @@ export const vuetify = createVuetify({
|
||||
},
|
||||
locale: {
|
||||
fallback: 'en',
|
||||
messages: vuetifyLocales,
|
||||
rtl: defaultRtl
|
||||
messages: vuetifyLocales
|
||||
},
|
||||
theme: {
|
||||
themes: {
|
||||
|
4
frontend/types/modules/virtual.d.ts
vendored
4
frontend/types/modules/virtual.d.ts
vendored
@ -12,10 +12,6 @@ declare module 'virtual:locales/vuetify' {
|
||||
export = typeWithoutRtl;
|
||||
}
|
||||
|
||||
declare module 'virtual:locales/vuetify/rtl' {
|
||||
export { defaultRtl } from 'vuetify/locale';
|
||||
}
|
||||
|
||||
declare module 'virtual:commit' {
|
||||
export const commit_hash: string | undefined;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user