mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Revert "pull fonts from official repository"
This commit is contained in:
parent
f59003568f
commit
1abe4845f5
6 changed files with 11 additions and 29 deletions
|
@ -1,22 +1,11 @@
|
|||
import * as userSettings from 'userSettings';
|
||||
import * as webSettings from 'webSettings';
|
||||
import skinManager from 'skinManager';
|
||||
import events from 'events';
|
||||
|
||||
// set the default theme when loading
|
||||
// Set the default theme when loading
|
||||
skinManager.setTheme(userSettings.theme());
|
||||
|
||||
// set the saved theme once a user authenticates
|
||||
// Set the user's prefered theme when signing in
|
||||
events.on(window.connectionManager, 'localusersignedin', function (e, user) {
|
||||
skinManager.setTheme(userSettings.theme());
|
||||
});
|
||||
|
||||
webSettings.getFonts().then(fonts => {
|
||||
for (const font of fonts) {
|
||||
const link = document.createElement('link');
|
||||
link.setAttribute('rel', 'stylesheet');
|
||||
link.href = font;
|
||||
|
||||
document.getElementsByTagName('head')[0].appendChild(link);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -102,12 +102,3 @@ export function getPlugins() {
|
|||
return [];
|
||||
});
|
||||
}
|
||||
|
||||
export function getFonts() {
|
||||
return getConfig().then(config => {
|
||||
return config.fonts;
|
||||
}).catch(error => {
|
||||
console.log('cannot get web config:', error);
|
||||
return [];
|
||||
});
|
||||
}
|
||||
|
|
|
@ -506,6 +506,7 @@ function initClient() {
|
|||
'sortable',
|
||||
'webcomponents',
|
||||
'material-icons',
|
||||
'jellyfin-noto',
|
||||
'date-fns',
|
||||
'page',
|
||||
'polyfill',
|
||||
|
@ -528,7 +529,7 @@ function initClient() {
|
|||
});
|
||||
|
||||
promise = require(['fetch'])
|
||||
.then(() => require(['jQuery', 'polyfill', 'fast-text-encoding', 'intersection-observer', 'classlist-polyfill', 'css!assets/css/site'], (jQuery) => {
|
||||
.then(() => require(['jQuery', 'polyfill', 'fast-text-encoding', 'intersection-observer', 'classlist-polyfill', 'css!assets/css/site', 'jellyfin-noto'], (jQuery) => {
|
||||
// Expose jQuery globally
|
||||
window.$ = jQuery;
|
||||
window.jQuery = jQuery;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue