mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #597 from dkanada/firefox
Minor changes to improve Firefox support
This commit is contained in:
commit
fa6a90f0f4
23 changed files with 45 additions and 161 deletions
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"main": "actionsheet.js"
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
define(['browser', 'connectionManager', 'playbackManager', 'dom', 'css!./style'], function (browser, connectionManager, playbackManager, dom) {
|
||||
define(['browser', 'connectionManager', 'playbackManager', 'dom', 'css!./backdrop'], function (browser, connectionManager, playbackManager, dom) {
|
||||
'use strict';
|
||||
|
||||
function enableAnimation(elem) {
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"main": "backdrop.js"
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
.clearButton {
|
||||
background: transparent;
|
||||
border: 0 !important;
|
||||
padding: 0 !important;
|
||||
cursor: pointer;
|
||||
outline: none !important;
|
||||
color: inherit;
|
||||
width: 100%;
|
||||
vertical-align: middle;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"main": "dialog.js"
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"main": "dialogHelper.js"
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"main": "emby-input.js"
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"main": "emby-radio.js"
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"main": "emby-tabs.js"
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.inline-flex {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.flex-direction-column {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.flex-direction-row {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.flex-grow {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.flex-shrink-zero {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.align-items-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.align-items-flex-start {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.justify-content-center {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.justify-content-flex-end {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.flex-wrap-wrap {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.align-self-flex-end {
|
||||
align-self: flex-end;
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"main": "headroom.js"
|
||||
}
|
|
@ -104,32 +104,21 @@
|
|||
</div>
|
||||
|
||||
<div class="verticalSection verticalSection-extrabottompadding">
|
||||
|
||||
<h2 class="sectionTitle">
|
||||
${HeaderLibraryOrder}
|
||||
</h2>
|
||||
<div class="paperList viewOrderList">
|
||||
|
||||
</div>
|
||||
|
||||
<h2 class="sectionTitle">${HeaderLibraryOrder}</h2>
|
||||
<div class="paperList viewOrderList"></div>
|
||||
</div>
|
||||
|
||||
<div class="perLibrarySettings">
|
||||
|
||||
</div>
|
||||
<div class="perLibrarySettings"></div>
|
||||
|
||||
<div class="verticalSection verticalSection-extrabottompadding">
|
||||
<label class="checkboxContainer">
|
||||
<input class="chkHidePlayedFromLatest" type="checkbox" is="emby-checkbox" />
|
||||
<span>${HideWatchedContentFromLatestMedia}</span>
|
||||
</label>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="verticalSection verticalSection-extrabottompadding">
|
||||
<h2 class="sectionTitle">
|
||||
${HeaderLibraryFolders}
|
||||
</h2>
|
||||
<h2 class="sectionTitle">${HeaderLibraryFolders}</h2>
|
||||
<div>
|
||||
<p>${LabelSelectFolderGroups}</p>
|
||||
<div class="folderGroupList"></div>
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"main": "navdrawer.js"
|
||||
}
|
|
@ -2,7 +2,6 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
|||
'use strict';
|
||||
|
||||
function onOneDocumentClick() {
|
||||
|
||||
document.removeEventListener('click', onOneDocumentClick);
|
||||
document.removeEventListener('keydown', onOneDocumentClick);
|
||||
|
||||
|
@ -10,15 +9,14 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
|||
Notification.requestPermission();
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('click', onOneDocumentClick);
|
||||
document.addEventListener('keydown', onOneDocumentClick);
|
||||
|
||||
var serviceWorkerRegistration;
|
||||
|
||||
function closeAfter(notification, timeoutMs) {
|
||||
|
||||
setTimeout(function () {
|
||||
|
||||
if (notification.close) {
|
||||
notification.close();
|
||||
} else if (notification.cancel) {
|
||||
|
@ -28,9 +26,7 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
|||
}
|
||||
|
||||
function resetRegistration() {
|
||||
|
||||
var serviceWorker = navigator.serviceWorker;
|
||||
|
||||
if (serviceWorker) {
|
||||
serviceWorker.ready.then(function (registration) {
|
||||
serviceWorkerRegistration = registration;
|
||||
|
@ -269,4 +265,4 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
|||
|
||||
showNotification(notification, 0, apiClient);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"main": "toast.js"
|
||||
}
|
|
@ -1,8 +1,7 @@
|
|||
define(['appSettings', 'events'], function (appsettings, events) {
|
||||
define(['appSettings', 'events'], function (appSettings, events) {
|
||||
'use strict';
|
||||
|
||||
function onSaveTimeout() {
|
||||
|
||||
var self = this;
|
||||
self.saveTimeout = null;
|
||||
self.currentApiClient.updateDisplayPreferences('usersettings', self.displayPrefs, self.currentUserId, 'emby');
|
||||
|
@ -12,6 +11,7 @@ define(['appSettings', 'events'], function (appsettings, events) {
|
|||
if (instance.saveTimeout) {
|
||||
clearTimeout(instance.saveTimeout);
|
||||
}
|
||||
|
||||
instance.saveTimeout = setTimeout(onSaveTimeout.bind(instance), 50);
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,6 @@ define(['appSettings', 'events'], function (appsettings, events) {
|
|||
}
|
||||
|
||||
UserSettings.prototype.setUserInfo = function (userId, apiClient) {
|
||||
|
||||
if (this.saveTimeout) {
|
||||
clearTimeout(this.saveTimeout);
|
||||
}
|
||||
|
@ -49,14 +48,9 @@ define(['appSettings', 'events'], function (appsettings, events) {
|
|||
};
|
||||
|
||||
UserSettings.prototype.set = function (name, value, enableOnServer) {
|
||||
|
||||
var userId = this.currentUserId;
|
||||
if (!userId) {
|
||||
throw new Error('userId cannot be null');
|
||||
}
|
||||
|
||||
var currentValue = this.get(name, enableOnServer);
|
||||
var result = appsettings.set(name, value, userId);
|
||||
var result = appSettings.set(name, value, userId);
|
||||
|
||||
if (enableOnServer !== false && this.displayPrefs) {
|
||||
this.displayPrefs.CustomPrefs[name] = value == null ? value : value.toString();
|
||||
|
@ -72,108 +66,70 @@ define(['appSettings', 'events'], function (appsettings, events) {
|
|||
|
||||
UserSettings.prototype.get = function (name, enableOnServer) {
|
||||
var userId = this.currentUserId;
|
||||
if (!userId) {
|
||||
// TODO: I'd like to continue to throw this exception but it causes issues with offline use
|
||||
// Revisit in the future and restore it
|
||||
return null;
|
||||
//throw new Error('userId cannot be null');
|
||||
if (enableOnServer !== false && this.displayPrefs) {
|
||||
return this.displayPrefs.CustomPrefs[name];
|
||||
}
|
||||
|
||||
if (enableOnServer !== false) {
|
||||
if (this.displayPrefs) {
|
||||
return this.displayPrefs.CustomPrefs[name];
|
||||
}
|
||||
}
|
||||
|
||||
return appsettings.get(name, userId);
|
||||
return appSettings.get(name, userId);
|
||||
};
|
||||
|
||||
UserSettings.prototype.serverConfig = function (config) {
|
||||
|
||||
var apiClient = this.currentApiClient;
|
||||
|
||||
if (config) {
|
||||
|
||||
return apiClient.updateUserConfiguration(this.currentUserId, config);
|
||||
|
||||
} else {
|
||||
|
||||
return apiClient.getUser(this.currentUserId).then(function (user) {
|
||||
|
||||
return user.Configuration;
|
||||
});
|
||||
}
|
||||
|
||||
return apiClient.getUser(this.currentUserId).then(function (user) {
|
||||
return user.Configuration;
|
||||
});
|
||||
};
|
||||
|
||||
UserSettings.prototype.enableCinemaMode = function (val) {
|
||||
|
||||
if (val != null) {
|
||||
return this.set('enableCinemaMode', val.toString(), false);
|
||||
}
|
||||
|
||||
val = this.get('enableCinemaMode', false);
|
||||
|
||||
if (val) {
|
||||
return val !== 'false';
|
||||
}
|
||||
|
||||
return true;
|
||||
return val !== 'false';
|
||||
};
|
||||
|
||||
UserSettings.prototype.enableNextVideoInfoOverlay = function (val) {
|
||||
|
||||
if (val != null) {
|
||||
return this.set('enableNextVideoInfoOverlay', val.toString());
|
||||
}
|
||||
|
||||
val = this.get('enableNextVideoInfoOverlay');
|
||||
|
||||
val = this.get('enableNextVideoInfoOverlay', false);
|
||||
return val !== 'false';
|
||||
};
|
||||
|
||||
UserSettings.prototype.enableThemeSongs = function (val) {
|
||||
|
||||
if (val != null) {
|
||||
return this.set('enableThemeSongs', val.toString(), false);
|
||||
}
|
||||
|
||||
val = this.get('enableThemeSongs', false);
|
||||
|
||||
return val !== 'false';
|
||||
};
|
||||
|
||||
UserSettings.prototype.enableThemeVideos = function (val) {
|
||||
|
||||
if (val != null) {
|
||||
return this.set('enableThemeVideos', val.toString(), false);
|
||||
}
|
||||
|
||||
val = this.get('enableThemeVideos', false);
|
||||
|
||||
if (val) {
|
||||
return val !== 'false';
|
||||
}
|
||||
|
||||
return UserSettings.defaults.enableThemeVideos;
|
||||
return val !== 'false';
|
||||
};
|
||||
|
||||
UserSettings.prototype.enableBackdrops = function (val) {
|
||||
|
||||
if (val != null) {
|
||||
return this.set('enableBackdrops', val.toString(), false);
|
||||
}
|
||||
|
||||
val = this.get('enableBackdrops', false);
|
||||
|
||||
if (val) {
|
||||
return val !== 'false';
|
||||
}
|
||||
|
||||
return UserSettings.defaults.enableBackdrops;
|
||||
return val !== 'false';
|
||||
};
|
||||
|
||||
UserSettings.prototype.language = function (val) {
|
||||
|
||||
if (val != null) {
|
||||
return this.set('language', val.toString(), false);
|
||||
}
|
||||
|
@ -182,7 +138,6 @@ define(['appSettings', 'events'], function (appsettings, events) {
|
|||
};
|
||||
|
||||
UserSettings.prototype.dateTimeLocale = function (val) {
|
||||
|
||||
if (val != null) {
|
||||
return this.set('datetimelocale', val.toString(), false);
|
||||
}
|
||||
|
@ -191,7 +146,6 @@ define(['appSettings', 'events'], function (appsettings, events) {
|
|||
};
|
||||
|
||||
UserSettings.prototype.skipBackLength = function (val) {
|
||||
|
||||
if (val != null) {
|
||||
return this.set('skipBackLength', val.toString());
|
||||
}
|
||||
|
@ -200,7 +154,6 @@ define(['appSettings', 'events'], function (appsettings, events) {
|
|||
};
|
||||
|
||||
UserSettings.prototype.skipForwardLength = function (val) {
|
||||
|
||||
if (val != null) {
|
||||
return this.set('skipForwardLength', val.toString());
|
||||
}
|
||||
|
@ -209,7 +162,6 @@ define(['appSettings', 'events'], function (appsettings, events) {
|
|||
};
|
||||
|
||||
UserSettings.prototype.dashboardTheme = function (val) {
|
||||
|
||||
if (val != null) {
|
||||
return this.set('dashboardTheme', val);
|
||||
}
|
||||
|
@ -218,55 +170,41 @@ define(['appSettings', 'events'], function (appsettings, events) {
|
|||
};
|
||||
|
||||
UserSettings.prototype.skin = function (val) {
|
||||
|
||||
if (val != null) {
|
||||
return this.set('skin', val, false);
|
||||
}
|
||||
|
||||
return this.get('skin', false) || UserSettings.defaults.skin;
|
||||
return this.get('skin', false);
|
||||
};
|
||||
|
||||
UserSettings.prototype.theme = function (val) {
|
||||
|
||||
if (val != null) {
|
||||
return this.set('appTheme', val, false);
|
||||
}
|
||||
|
||||
return this.get('appTheme', false) || UserSettings.defaults.theme;
|
||||
return this.get('appTheme', false);
|
||||
};
|
||||
|
||||
UserSettings.prototype.screensaver = function (val) {
|
||||
|
||||
if (val != null) {
|
||||
return this.set('screensaver', val, false);
|
||||
}
|
||||
|
||||
return this.get('screensaver', false) || UserSettings.defaults.screensaver;
|
||||
return this.get('screensaver', false);
|
||||
};
|
||||
|
||||
UserSettings.prototype.soundEffects = function (val) {
|
||||
|
||||
if (val != null) {
|
||||
return this.set('soundeffects', val, false);
|
||||
}
|
||||
|
||||
return this.get('soundeffects', false) || UserSettings.defaults.soundEffects;
|
||||
};
|
||||
|
||||
// apps should set these values
|
||||
UserSettings.defaults = {
|
||||
theme: null,
|
||||
enableThemeVideos: true
|
||||
return this.get('soundeffects', false);
|
||||
};
|
||||
|
||||
UserSettings.prototype.loadQuerySettings = function (key, query) {
|
||||
|
||||
var values = this.get(key);
|
||||
|
||||
if (values) {
|
||||
|
||||
values = JSON.parse(values);
|
||||
|
||||
return Object.assign(query, values);
|
||||
}
|
||||
|
||||
|
@ -274,12 +212,11 @@ define(['appSettings', 'events'], function (appsettings, events) {
|
|||
};
|
||||
|
||||
UserSettings.prototype.saveQuerySettings = function (key, query) {
|
||||
|
||||
var values = {};
|
||||
|
||||
if (query.SortBy) {
|
||||
values.SortBy = query.SortBy;
|
||||
}
|
||||
|
||||
if (query.SortOrder) {
|
||||
values.SortOrder = query.SortOrder;
|
||||
}
|
||||
|
@ -288,26 +225,20 @@ define(['appSettings', 'events'], function (appsettings, events) {
|
|||
};
|
||||
|
||||
UserSettings.prototype.getSubtitleAppearanceSettings = function (key) {
|
||||
|
||||
key = key || 'localplayersubtitleappearance3';
|
||||
|
||||
return JSON.parse(this.get(key, false) || '{}');
|
||||
};
|
||||
|
||||
UserSettings.prototype.setSubtitleAppearanceSettings = function (value, key) {
|
||||
|
||||
key = key || 'localplayersubtitleappearance3';
|
||||
|
||||
return this.set(key, JSON.stringify(value), false);
|
||||
};
|
||||
|
||||
UserSettings.prototype.setFilter = function (key, value) {
|
||||
|
||||
return this.set(key, value, true);
|
||||
};
|
||||
|
||||
UserSettings.prototype.getFilter = function (key) {
|
||||
|
||||
return this.get(key, true);
|
||||
};
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"main": "viewManager.js"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue