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
c2b1d02a33
321 changed files with 7572 additions and 6563 deletions
|
@ -1,9 +1,10 @@
|
|||
import * as userSettings from 'userSettings';
|
||||
import * as webSettings from 'webSettings';
|
||||
import skinManager from 'skinManager';
|
||||
import events from 'events';
|
||||
import * as userSettings from './settings/userSettings';
|
||||
import * as webSettings from './settings/webSettings';
|
||||
import skinManager from './themeManager';
|
||||
import { Events } from 'jellyfin-apiclient';
|
||||
import ServerConnections from '../components/ServerConnections';
|
||||
|
||||
// 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
|
||||
that need the scrollbar and pages that don't.
|
||||
|
@ -11,16 +12,6 @@ skinManager.setTheme(userSettings.theme())
|
|||
.then(() => document.body.classList.add('force-scroll'));
|
||||
|
||||
// set the saved theme once a user authenticates
|
||||
events.on(window.connectionManager, 'localusersignedin', function (e, user) {
|
||||
Events.on(ServerConnections, '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