1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

passed default theme handling to webSettings

This commit is contained in:
vitorsemeano 2020-11-07 11:56:46 +00:00
parent 03a6269b5f
commit 1171bc1cdf
2 changed files with 23 additions and 12 deletions

View file

@ -17,18 +17,10 @@ function getThemes() {
function getThemeStylesheetInfo(id) {
return getThemes().then(themes => {
let theme = themes.find(theme => {
const theme = themes.find(theme => {
return id ? theme.id === id : theme.default;
});
if (!theme) {
theme = {
'name': 'Dark',
'id': 'dark',
'default': true
};
}
return {
stylesheetPath: 'themes/' + theme.id + '/theme.css',
themeId: theme.id