mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
move channel view setting to global
This commit is contained in:
parent
5cd71abd36
commit
218112efc1
7 changed files with 43 additions and 18 deletions
|
@ -6,7 +6,6 @@
|
|||
|
||||
.dockedtabs-tab-button {
|
||||
flex-grow: 1;
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-transform: none !important;
|
||||
|
@ -18,6 +17,14 @@
|
|||
border-width: 0 !important;
|
||||
}
|
||||
|
||||
.dockedtabs-tab-button:not(.hide) {
|
||||
display: flex !important;
|
||||
}
|
||||
|
||||
.dockedtabs-tab-button-noflex:not(.hide) {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.dockedtabs-tab-button, .dockedtabs-tab-button-foreground {
|
||||
font-weight: normal !important;
|
||||
}
|
||||
|
@ -41,4 +48,4 @@
|
|||
.dockedtab-midsize {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(['apphost', 'connectionManager', 'events', 'globalize', 'css!./dockedtabs', 'emby-tabs'], function (appHost, connectionManager, events, globalize) {
|
||||
define(['apphost', 'connectionManager', 'events', 'globalize', 'browser', 'css!./dockedtabs', 'emby-tabs'], function (appHost, connectionManager, events, globalize, browser) {
|
||||
|
||||
var currentUser = {};
|
||||
var currentUserViews = [];
|
||||
|
@ -47,7 +47,9 @@
|
|||
|
||||
function showMenu(menuItems, button) {
|
||||
|
||||
require(['webActionSheet'], function (actionSheet) {
|
||||
var actionSheetType = browser.safari ? 'actionsheet' : 'webActionSheet';
|
||||
|
||||
require([actionSheetType], function (actionSheet) {
|
||||
|
||||
actionSheet.show({
|
||||
|
||||
|
@ -159,6 +161,20 @@
|
|||
}
|
||||
}
|
||||
|
||||
function addNoFlexClass(buttons) {
|
||||
|
||||
setTimeout(function() {
|
||||
for (var i = 0, length = buttons.length; i < length; i++) {
|
||||
|
||||
var button = buttons[i];
|
||||
|
||||
if (button.classList.contains('emby-button-noflex')) {
|
||||
button.classList.add('dockedtabs-tab-button-noflex');
|
||||
}
|
||||
}
|
||||
}, 300);
|
||||
}
|
||||
|
||||
function render(options) {
|
||||
|
||||
var elem = document.createElement('div');
|
||||
|
@ -209,8 +225,11 @@
|
|||
|
||||
var buttons = elem.querySelectorAll('.emby-tab-button');
|
||||
for (var i = 0, length = buttons.length; i < length; i++) {
|
||||
buttons[i].addEventListener('click', onTabClick);
|
||||
|
||||
var button = buttons[i];
|
||||
button.addEventListener('click', onTabClick);
|
||||
}
|
||||
addNoFlexClass(buttons);
|
||||
|
||||
options.appFooter.add(elem);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue