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:
parent
03a6269b5f
commit
1171bc1cdf
2 changed files with 23 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue