mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge branch 'master' into return-of-the-scrollbar
This commit is contained in:
commit
88b0d6d458
151 changed files with 4431 additions and 2598 deletions
|
@ -1,15 +1,26 @@
|
|||
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())
|
||||
/* This keeps the scrollbar always present in all pages, so we avoid clipping while switching between pages
|
||||
/* this keeps the scrollbar always present in all pages, so we avoid clipping while switching between pages
|
||||
that need the scrollbar and pages that don't.
|
||||
*/
|
||||
.then(() => document.body.classList.add('force-scroll'));
|
||||
|
||||
// Set the user's prefered theme when signing in
|
||||
// set the saved theme once a user authenticates
|
||||
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);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue