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

add setting for photo libraries

This commit is contained in:
Luke Pulverenti 2016-08-15 00:36:17 -04:00
parent 89c8c73cab
commit 775db5c5e8
16 changed files with 119 additions and 68 deletions

View file

@ -1,10 +1,11 @@
.dockedtabs {
height: 60px;
height: 54px;
background: #212121;
position: fixed;
left: 0;
right: 0;
z-index: 99999;
z-index: 1;
display: flex;
}
.dockedtabs-bottom {
@ -22,3 +23,29 @@
.dockedtabs--unpinned {
transform: translateY(100%);
}
.dockedtabs-tabs {
flex-grow: 1;
display: flex;
}
.dockedtabs-tab-button {
flex-grow: 1;
display: flex !important;
align-items: center;
justify-content: center;
text-transform: none !important;
font-size: 12px !important;
padding: 0 !important;
margin: 0 !important;
text-align: center;
}
.dockedtabs-tab-button, .dockedtabs-tab-button-foreground {
font-weight: normal !important;
}
.dockedtabs-tab-button-icon {
margin-bottom: .25em;
font-size: 20px;
}

View file

@ -1,4 +1,4 @@
define(['css!./dockedtabs'], function () {
define(['css!./dockedtabs', 'emby-tabs'], function () {
function render(options) {
@ -13,6 +13,29 @@
// live tv
// now playing
var html = '';
html += ' <div is="emby-tabs" class="dockedtabs-tabs" data-selectionbar="false">\
<button is="emby-button" class="dockedtabs-tab-button emby-tab-button emby-tab-button-active" data-index="0">\
<div class="dockedtabs-tab-button-foreground emby-button-foreground"><i class="dockedtabs-tab-button-icon md-icon">home</i><div>Home</div></div>\
</button>\
<button is="emby-button" class="dockedtabs-tab-button emby-tab-button" data-index="1">\
<div class="dockedtabs-tab-button-foreground emby-button-foreground"><i class="dockedtabs-tab-button-icon md-icon">dvr</i><div>Live TV</div></div>\
</button>\
<button is="emby-button" class="dockedtabs-tab-button emby-tab-button homeFavoritesTab" data-index="2">\
<div class="dockedtabs-tab-button-foreground emby-button-foreground"><i class="dockedtabs-tab-button-icon md-icon">favorite</i><div>Favorites</div></div>\
</button>\
<button is="emby-button" class="dockedtabs-tab-button emby-tab-button" data-index="3">\
<div class="dockedtabs-tab-button-foreground emby-button-foreground"><i class="dockedtabs-tab-button-icon md-icon">playlist_play</i><div>Now Playing</div></div>\
</button>\
<button is="emby-button" class="dockedtabs-tab-button emby-tab-button" data-index="3">\
<div class="dockedtabs-tab-button-foreground emby-button-foreground"><i class="dockedtabs-tab-button-icon md-icon">menu</i><div>More</div></div>\
</button>\
</div>\
';
elem.innerHTML = html;
document.body.appendChild(elem);
return elem;

View file

@ -33,6 +33,12 @@
parent.querySelector('.chkArhiveAsMediaContainer').classList.add('hide');
}
if (contentType == 'homevideos') {
parent.querySelector('.chkEnablePhotosContainer').classList.remove('hide');
} else {
parent.querySelector('.chkEnablePhotosContainer').classList.add('hide');
}
if (contentType == 'music' || contentType == 'tvshows' || contentType == 'movies' || contentType == 'homevideos' || contentType == 'musicvideos' || contentType == 'mixed') {
parent.classList.remove('hide');
} else {
@ -43,7 +49,8 @@
function getLibraryOptions(parent) {
var options = {
EnableArchiveMediaFiles: parent.querySelector('.chkArhiveAsMedia').checked
EnableArchiveMediaFiles: parent.querySelector('.chkArhiveAsMedia').checked,
EnablePhotos: parent.querySelector('.chkEnablePhotos').checked
};
return options;
@ -51,7 +58,8 @@
function setLibraryOptions(parent, options) {
parent.querySelector('.chkArhiveAsMedia').checked = options.EnableArchiveMediaFiles;;
parent.querySelector('.chkArhiveAsMedia').checked = options.EnableArchiveMediaFiles;
parent.querySelector('.chkEnablePhotos').checked = options.EnablePhotos;
}
return {

View file

@ -1,4 +1,11 @@
<h1>${HeaderSettings}</h1>
<div class="checkboxContainer checkboxContainer-withDescription chkEnablePhotosContainer">
<label>
<input type="checkbox" is="emby-checkbox" class="chkEnablePhotos" checked />
<span>${EnablePhotos}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${EnablePhotosHelp}</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription chkArhiveAsMediaContainer">
<label>
<input type="checkbox" is="emby-checkbox" class="chkArhiveAsMedia" />