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

Merge pull request #1288 from jellyfin/banner

Add display preference for details banner and update some defaults
This commit is contained in:
dkanada 2020-05-28 03:08:35 +09:00 committed by GitHub
commit e140381a02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 7 deletions

View file

@ -182,6 +182,7 @@ define(['require', 'browser', 'layoutManager', 'appSettings', 'pluginManager', '
context.querySelector('#chkThemeVideo').checked = userSettings.enableThemeVideos();
context.querySelector('#chkFadein').checked = userSettings.enableFastFadein();
context.querySelector('#chkBackdrops').checked = userSettings.enableBackdrops();
context.querySelector('#chkDetailsBanner').checked = userSettings.detailsBanner();
context.querySelector('#selectLanguage').value = userSettings.language() || '';
context.querySelector('.selectDateTimeLocale').value = userSettings.dateTimeLocale() || '';
@ -223,6 +224,7 @@ define(['require', 'browser', 'layoutManager', 'appSettings', 'pluginManager', '
userSettingsInstance.enableFastFadein(context.querySelector('#chkFadein').checked);
userSettingsInstance.enableBackdrops(context.querySelector('#chkBackdrops').checked);
userSettingsInstance.detailsBanner(context.querySelector('#chkDetailsBanner').checked);
if (user.Id === apiClient.getCurrentUserId()) {
skinManager.setTheme(userSettingsInstance.theme());

View file

@ -156,6 +156,14 @@
<div class="fieldDescription checkboxFieldDescription">${EnableFastImageFadeInHelp}</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription fldDetailsBanner">
<label>
<input type="checkbox" is="emby-checkbox" id="chkDetailsBanner" />
<span>${EnableDetailsBanner}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${EnableDetailsBannerHelp}</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription fldBackdrops hide">
<label>
<input type="checkbox" is="emby-checkbox" id="chkBackdrops" />

View file

@ -475,7 +475,7 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
item.Type === 'MusicAlbum' ||
item.Type === 'Person';
if (!layoutManager.mobile && !userSettings.enableBackdrops()) {
if (!layoutManager.mobile && !userSettings.detailsBanner()) {
return false;
}

View file

@ -107,7 +107,7 @@ import events from 'events';
}
val = this.get('enableThemeSongs', false);
return val !== 'false';
return val === 'true';
}
export function enableThemeVideos(val) {
@ -116,7 +116,7 @@ import events from 'events';
}
val = this.get('enableThemeVideos', false);
return val !== 'false';
return val === 'true';
}
export function enableFastFadein(val) {
@ -137,6 +137,15 @@ import events from 'events';
return val !== 'false';
}
export function detailsBanner(val) {
if (val !== undefined) {
return this.set('detailsBanner', val.toString(), false);
}
val = this.get('detailsBanner', false);
return val !== 'false';
}
export function language(val) {
if (val !== undefined) {
return this.set('language', val.toString(), false);

View file

@ -572,7 +572,7 @@
"Repeat": "Repeat",
"RemoveFromPlaylist": "Remove from playlist",
"RemoveFromCollection": "Remove from collection",
"RememberMe": "Remember me",
"RememberMe": "Remember Me",
"ReleaseDate": "Release date",
"RefreshMetadata": "Refresh metadata",
"RefreshDialogHelp": "Metadata is refreshed based on settings and internet services that are enabled in the Jellyfin Server dashboard.",

View file

@ -239,6 +239,8 @@
"EnableThemeSongsHelp": "Play theme songs in the background while browsing the library.",
"EnableThemeVideos": "Theme videos",
"EnableThemeVideosHelp": "Play theme videos in the background while browsing the library.",
"EnableDetailsBanner": "Details Banner",
"EnableDetailsBannerHelp": "Display a banner image at the top of the item details page.",
"Ended": "Ended",
"EndsAtValue": "Ends at {0}",
"Episode": "Episode",
@ -824,8 +826,8 @@
"LabelSaveLocalMetadataHelp": "Saving artwork into media folders will put them in a place where they can be easily edited.",
"LabelScheduledTaskLastRan": "Last ran {0}, taking {1}.",
"LabelScreensaver": "Screensaver:",
"EnableFastImageFadeIn": "Fast image fade-in",
"EnableFastImageFadeInHelp": "Enable faster fade-in animation for loaded images",
"EnableFastImageFadeIn": "Fast Image Fade Animations",
"EnableFastImageFadeInHelp": "Show posters and other images with a quicker fade animation when they finish loading.",
"LabelSeasonNumber": "Season number:",
"LabelSelectFolderGroups": "Automatically group content from the following folders into views such as Movies, Music and TV:",
"LabelSelectFolderGroupsHelp": "Folders that are unchecked will be displayed by themselves in their own view.",
@ -1322,7 +1324,7 @@
"RefreshQueued": "Refresh queued.",
"ReleaseDate": "Release date",
"ReleaseGroup": "Release Group",
"RememberMe": "Remember me",
"RememberMe": "Remember Me",
"RemoveFromCollection": "Remove from collection",
"RemoveFromPlaylist": "Remove from playlist",
"Repeat": "Repeat",