mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge remote-tracking branch 'origin/master' into no-limits
This commit is contained in:
commit
6d75c48496
92 changed files with 1501 additions and 961 deletions
|
@ -292,7 +292,7 @@ define([], function () {
|
|||
}
|
||||
|
||||
if (typeof document !== 'undefined') {
|
||||
if (('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
|
||||
if (('ontouchstart' in window) || (navigator.maxTouchPoints > 0)) {
|
||||
browser.touch = true;
|
||||
}
|
||||
}
|
||||
|
|
104
src/scripts/dfnshelper.js
Normal file
104
src/scripts/dfnshelper.js
Normal file
|
@ -0,0 +1,104 @@
|
|||
import { ar, be, bg, ca, cs, da, de, el, enGB, enUS, es, faIR, fi, fr, frCA, he, hi, hr, hu, id, it, kk, ko, lt, ms, nb, nl, pl, ptBR, pt, ro, ru, sk, sl, sv, tr, uk, vi, zhCN, zhTW } from 'date-fns/locale';
|
||||
import globalize from 'globalize';
|
||||
|
||||
export function getLocale() {
|
||||
switch (globalize.getCurrentLocale()) {
|
||||
case 'ar':
|
||||
return ar;
|
||||
case 'be-by':
|
||||
return be;
|
||||
case 'bg-bg':
|
||||
return bg;
|
||||
case 'ca':
|
||||
return ca;
|
||||
case 'cs':
|
||||
return cs;
|
||||
case 'da':
|
||||
return da;
|
||||
case 'de':
|
||||
return de;
|
||||
case 'el':
|
||||
return el;
|
||||
case 'en-gb':
|
||||
return enGB;
|
||||
case 'en-us':
|
||||
return enUS;
|
||||
case 'es':
|
||||
return es;
|
||||
case 'es-ar':
|
||||
return es;
|
||||
case 'es-mx':
|
||||
return es;
|
||||
case 'fa':
|
||||
return faIR;
|
||||
case 'fi':
|
||||
return fi;
|
||||
case 'fr':
|
||||
return fr;
|
||||
case 'fr-ca':
|
||||
return frCA;
|
||||
case 'gsw':
|
||||
return de;
|
||||
case 'he':
|
||||
return he;
|
||||
case 'hi-in':
|
||||
return hi;
|
||||
case 'hr':
|
||||
return hr;
|
||||
case 'hu':
|
||||
return hu;
|
||||
case 'id':
|
||||
return id;
|
||||
case 'it':
|
||||
return it;
|
||||
case 'kk':
|
||||
return kk;
|
||||
case 'ko':
|
||||
return ko;
|
||||
case 'lt-lt':
|
||||
return lt;
|
||||
case 'ms':
|
||||
return ms;
|
||||
case 'nb':
|
||||
return nb;
|
||||
case 'nl':
|
||||
return nl;
|
||||
case 'pl':
|
||||
return pl;
|
||||
case 'pt-br':
|
||||
return ptBR;
|
||||
case 'pt-pt':
|
||||
return pt;
|
||||
case 'ro':
|
||||
return ro;
|
||||
case 'ru':
|
||||
return ru;
|
||||
case 'sk':
|
||||
return sk;
|
||||
case 'sl-si':
|
||||
return sl;
|
||||
case 'sv':
|
||||
return sv;
|
||||
case 'tr':
|
||||
return tr;
|
||||
case 'uk':
|
||||
return uk;
|
||||
case 'vi':
|
||||
return vi;
|
||||
case 'zh-cn':
|
||||
return zhCN;
|
||||
case 'zh-hk':
|
||||
return zhCN;
|
||||
case 'zh-tw':
|
||||
return zhTW;
|
||||
default:
|
||||
return enUS;
|
||||
}
|
||||
}
|
||||
|
||||
export const localeWithSuffix = { addSuffix: true, locale: getLocale() };
|
||||
|
||||
export default {
|
||||
getLocale: getLocale,
|
||||
localeWithSuffix: localeWithSuffix
|
||||
};
|
|
@ -1,4 +1,4 @@
|
|||
define(['connectionManager', 'userSettings', 'events'], function (connectionManager, userSettings, events) {
|
||||
define(['userSettings', 'events'], function (userSettings, events) {
|
||||
'use strict';
|
||||
var fallbackCulture = 'en-us';
|
||||
|
||||
|
@ -253,7 +253,6 @@ define(['connectionManager', 'userSettings', 'events'], function (connectionMana
|
|||
|
||||
updateCurrentCulture();
|
||||
|
||||
events.on(connectionManager, 'localusersignedin', updateCurrentCulture);
|
||||
events.on(userSettings, 'change', function (e, name) {
|
||||
if (name === 'language' || name === 'datetimelocale') {
|
||||
updateCurrentCulture();
|
||||
|
@ -269,6 +268,7 @@ define(['connectionManager', 'userSettings', 'events'], function (connectionMana
|
|||
defaultModule: defaultModule,
|
||||
getCurrentLocale: getCurrentLocale,
|
||||
getCurrentDateTimeLocale: getCurrentDateTimeLocale,
|
||||
register: register
|
||||
register: register,
|
||||
updateCurrentCulture: updateCurrentCulture
|
||||
};
|
||||
});
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
define(["browser"], function (browser) {
|
||||
"use strict";
|
||||
/* eslint-disable indent */
|
||||
|
||||
function getDeviceIcon(device) {
|
||||
import browser from 'browser';
|
||||
|
||||
export function getDeviceIcon(device) {
|
||||
var baseUrl = "assets/img/devices/";
|
||||
switch (device.AppName || device.Client) {
|
||||
case "Samsung Smart TV":
|
||||
|
@ -42,7 +43,7 @@ define(["browser"], function (browser) {
|
|||
}
|
||||
}
|
||||
|
||||
function getLibraryIcon(library) {
|
||||
export function getLibraryIcon(library) {
|
||||
switch (library) {
|
||||
case "movies":
|
||||
return "video_library";
|
||||
|
@ -71,8 +72,9 @@ define(["browser"], function (browser) {
|
|||
}
|
||||
}
|
||||
|
||||
return {
|
||||
getDeviceIcon: getDeviceIcon,
|
||||
getLibraryIcon: getLibraryIcon
|
||||
};
|
||||
});
|
||||
/* eslint-enable indent */
|
||||
|
||||
export default {
|
||||
getDeviceIcon: getDeviceIcon,
|
||||
getLibraryIcon: getLibraryIcon
|
||||
};
|
||||
|
|
|
@ -83,7 +83,7 @@ define(["userSettings"], function (userSettings) {
|
|||
|
||||
if (html += '<div class="listPaging">', showControls) {
|
||||
html += '<span style="vertical-align:middle;">';
|
||||
html += (totalRecordCount ? startIndex + 1 : 0) + "-" + recordsEnd + " of " + totalRecordCount;
|
||||
html += Globalize.translate("ListPaging", (totalRecordCount ? startIndex + 1 : 0), recordsEnd, totalRecordCount);
|
||||
html += "</span>";
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
define(['appStorage', 'events'], function (appStorage, events) {
|
||||
'use strict';
|
||||
/* eslint-disable indent */
|
||||
|
||||
import appStorage from 'appStorage';
|
||||
import events from 'events';
|
||||
|
||||
function getKey(name, userId) {
|
||||
if (userId) {
|
||||
|
@ -9,26 +11,23 @@ define(['appStorage', 'events'], function (appStorage, events) {
|
|||
return name;
|
||||
}
|
||||
|
||||
function AppSettings() {
|
||||
}
|
||||
|
||||
AppSettings.prototype.enableAutoLogin = function (val) {
|
||||
export function enableAutoLogin(val) {
|
||||
if (val != null) {
|
||||
this.set('enableAutoLogin', val.toString());
|
||||
}
|
||||
|
||||
return this.get('enableAutoLogin') !== 'false';
|
||||
};
|
||||
}
|
||||
|
||||
AppSettings.prototype.enableSystemExternalPlayers = function (val) {
|
||||
export function enableSystemExternalPlayers(val) {
|
||||
if (val !== null) {
|
||||
this.set('enableSystemExternalPlayers', val.toString());
|
||||
}
|
||||
|
||||
return this.get('enableSystemExternalPlayers') === 'true';
|
||||
};
|
||||
}
|
||||
|
||||
AppSettings.prototype.enableAutomaticBitrateDetection = function (isInNetwork, mediaType, val) {
|
||||
export function enableAutomaticBitrateDetection(isInNetwork, mediaType, val) {
|
||||
var key = 'enableautobitratebitrate-' + mediaType + '-' + isInNetwork;
|
||||
if (val != null) {
|
||||
if (isInNetwork && mediaType === 'Audio') {
|
||||
|
@ -43,9 +42,9 @@ define(['appStorage', 'events'], function (appStorage, events) {
|
|||
} else {
|
||||
return this.get(key) !== 'false';
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
AppSettings.prototype.maxStreamingBitrate = function (isInNetwork, mediaType, val) {
|
||||
export function maxStreamingBitrate(isInNetwork, mediaType, val) {
|
||||
var key = 'maxbitrate-' + mediaType + '-' + isInNetwork;
|
||||
if (val != null) {
|
||||
if (isInNetwork && mediaType === 'Audio') {
|
||||
|
@ -61,43 +60,43 @@ define(['appStorage', 'events'], function (appStorage, events) {
|
|||
} else {
|
||||
return parseInt(this.get(key) || '0') || 1500000;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
AppSettings.prototype.maxStaticMusicBitrate = function (val) {
|
||||
export function maxStaticMusicBitrate(val) {
|
||||
if (val !== undefined) {
|
||||
this.set('maxStaticMusicBitrate', val);
|
||||
}
|
||||
|
||||
var defaultValue = 320000;
|
||||
return parseInt(this.get('maxStaticMusicBitrate') || defaultValue.toString()) || defaultValue;
|
||||
};
|
||||
}
|
||||
|
||||
AppSettings.prototype.maxChromecastBitrate = function (val) {
|
||||
export function maxChromecastBitrate(val) {
|
||||
if (val != null) {
|
||||
this.set('chromecastBitrate1', val);
|
||||
}
|
||||
|
||||
val = this.get('chromecastBitrate1');
|
||||
return val ? parseInt(val) : null;
|
||||
};
|
||||
}
|
||||
|
||||
AppSettings.prototype.syncOnlyOnWifi = function (val) {
|
||||
export function syncOnlyOnWifi(val) {
|
||||
if (val != null) {
|
||||
this.set('syncOnlyOnWifi', val.toString());
|
||||
}
|
||||
|
||||
return this.get('syncOnlyOnWifi') !== 'false';
|
||||
};
|
||||
}
|
||||
|
||||
AppSettings.prototype.syncPath = function (val) {
|
||||
export function syncPath(val) {
|
||||
if (val != null) {
|
||||
this.set('syncPath', val);
|
||||
}
|
||||
|
||||
return this.get('syncPath');
|
||||
};
|
||||
}
|
||||
|
||||
AppSettings.prototype.cameraUploadServers = function (val) {
|
||||
export function cameraUploadServers(val) {
|
||||
if (val != null) {
|
||||
this.set('cameraUploadServers', val.join(','));
|
||||
}
|
||||
|
@ -108,28 +107,42 @@ define(['appStorage', 'events'], function (appStorage, events) {
|
|||
}
|
||||
|
||||
return [];
|
||||
};
|
||||
}
|
||||
|
||||
AppSettings.prototype.runAtStartup = function (val) {
|
||||
export function runAtStartup(val) {
|
||||
if (val != null) {
|
||||
this.set('runatstartup', val.toString());
|
||||
}
|
||||
|
||||
return this.get('runatstartup') === 'true';
|
||||
};
|
||||
}
|
||||
|
||||
AppSettings.prototype.set = function (name, value, userId) {
|
||||
export function set(name, value, userId) {
|
||||
var currentValue = this.get(name, userId);
|
||||
appStorage.setItem(getKey(name, userId), value);
|
||||
|
||||
if (currentValue !== value) {
|
||||
events.trigger(this, 'change', [name]);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
AppSettings.prototype.get = function (name, userId) {
|
||||
export function get(name, userId) {
|
||||
return appStorage.getItem(getKey(name, userId));
|
||||
};
|
||||
}
|
||||
|
||||
return new AppSettings();
|
||||
});
|
||||
/* eslint-enable indent */
|
||||
|
||||
export default {
|
||||
enableAutoLogin: enableAutoLogin,
|
||||
enableSystemExternalPlayers: enableSystemExternalPlayers,
|
||||
enableAutomaticBitrateDetection: enableAutomaticBitrateDetection,
|
||||
maxStreamingBitrate: maxStreamingBitrate,
|
||||
maxStaticMusicBitrate: maxStaticMusicBitrate,
|
||||
maxChromecastBitrate: maxChromecastBitrate,
|
||||
syncOnlyOnWifi: syncOnlyOnWifi,
|
||||
syncPath: syncPath,
|
||||
cameraUploadServers: cameraUploadServers,
|
||||
runAtStartup: runAtStartup,
|
||||
set: set,
|
||||
get: get
|
||||
};
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
define(['appSettings', 'events'], function (appSettings, events) {
|
||||
'use strict';
|
||||
/* eslint-disable indent */
|
||||
|
||||
import appSettings from 'appSettings';
|
||||
import events from 'events';
|
||||
|
||||
function onSaveTimeout() {
|
||||
var self = this;
|
||||
|
@ -15,10 +17,7 @@ define(['appSettings', 'events'], function (appSettings, events) {
|
|||
instance.saveTimeout = setTimeout(onSaveTimeout.bind(instance), 50);
|
||||
}
|
||||
|
||||
function UserSettings() {
|
||||
}
|
||||
|
||||
UserSettings.prototype.setUserInfo = function (userId, apiClient) {
|
||||
export function setUserInfo(userId, apiClient) {
|
||||
if (this.saveTimeout) {
|
||||
clearTimeout(this.saveTimeout);
|
||||
}
|
||||
|
@ -37,17 +36,17 @@ define(['appSettings', 'events'], function (appSettings, events) {
|
|||
result.CustomPrefs = result.CustomPrefs || {};
|
||||
self.displayPrefs = result;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.getData = function () {
|
||||
export function getData() {
|
||||
return this.displayPrefs;
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.importFrom = function (instance) {
|
||||
export function importFrom(instance) {
|
||||
this.displayPrefs = instance.getData();
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.set = function (name, value, enableOnServer) {
|
||||
export function set(name, value, enableOnServer) {
|
||||
var userId = this.currentUserId;
|
||||
var currentValue = this.get(name, enableOnServer);
|
||||
var result = appSettings.set(name, value, userId);
|
||||
|
@ -62,18 +61,18 @@ define(['appSettings', 'events'], function (appSettings, events) {
|
|||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.get = function (name, enableOnServer) {
|
||||
export function get(name, enableOnServer) {
|
||||
var userId = this.currentUserId;
|
||||
if (enableOnServer !== false && this.displayPrefs) {
|
||||
return this.displayPrefs.CustomPrefs[name];
|
||||
}
|
||||
|
||||
return appSettings.get(name, userId);
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.serverConfig = function (config) {
|
||||
export function serverConfig(config) {
|
||||
var apiClient = this.currentApiClient;
|
||||
if (config) {
|
||||
return apiClient.updateUserConfiguration(this.currentUserId, config);
|
||||
|
@ -82,127 +81,127 @@ define(['appSettings', 'events'], function (appSettings, events) {
|
|||
return apiClient.getUser(this.currentUserId).then(function (user) {
|
||||
return user.Configuration;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.enableCinemaMode = function (val) {
|
||||
export function enableCinemaMode(val) {
|
||||
if (val != null) {
|
||||
return this.set('enableCinemaMode', val.toString(), false);
|
||||
}
|
||||
|
||||
val = this.get('enableCinemaMode', false);
|
||||
return val !== 'false';
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.enableNextVideoInfoOverlay = function (val) {
|
||||
export function enableNextVideoInfoOverlay(val) {
|
||||
if (val != null) {
|
||||
return this.set('enableNextVideoInfoOverlay', val.toString());
|
||||
}
|
||||
|
||||
val = this.get('enableNextVideoInfoOverlay', false);
|
||||
return val !== 'false';
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.enableThemeSongs = function (val) {
|
||||
export function enableThemeSongs(val) {
|
||||
if (val != null) {
|
||||
return this.set('enableThemeSongs', val.toString(), false);
|
||||
}
|
||||
|
||||
val = this.get('enableThemeSongs', false);
|
||||
return val !== 'false';
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.enableThemeVideos = function (val) {
|
||||
export function enableThemeVideos(val) {
|
||||
if (val != null) {
|
||||
return this.set('enableThemeVideos', val.toString(), false);
|
||||
}
|
||||
|
||||
val = this.get('enableThemeVideos', false);
|
||||
return val !== 'false';
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.enableFastFadein = function (val) {
|
||||
export function enableFastFadein(val) {
|
||||
if (val != null) {
|
||||
return this.set('fastFadein', val.toString(), false);
|
||||
}
|
||||
|
||||
val = this.get('fastFadein', false);
|
||||
return val !== 'false';
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.enableBackdrops = function (val) {
|
||||
export function enableBackdrops(val) {
|
||||
if (val != null) {
|
||||
return this.set('enableBackdrops', val.toString(), false);
|
||||
}
|
||||
|
||||
val = this.get('enableBackdrops', false);
|
||||
return val !== 'false';
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.language = function (val) {
|
||||
export function language(val) {
|
||||
if (val != null) {
|
||||
return this.set('language', val.toString(), false);
|
||||
}
|
||||
|
||||
return this.get('language', false);
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.dateTimeLocale = function (val) {
|
||||
export function dateTimeLocale(val) {
|
||||
if (val != null) {
|
||||
return this.set('datetimelocale', val.toString(), false);
|
||||
}
|
||||
|
||||
return this.get('datetimelocale', false);
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.skipBackLength = function (val) {
|
||||
export function skipBackLength(val) {
|
||||
if (val != null) {
|
||||
return this.set('skipBackLength', val.toString());
|
||||
}
|
||||
|
||||
return parseInt(this.get('skipBackLength') || '10000');
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.skipForwardLength = function (val) {
|
||||
export function skipForwardLength(val) {
|
||||
if (val != null) {
|
||||
return this.set('skipForwardLength', val.toString());
|
||||
}
|
||||
|
||||
return parseInt(this.get('skipForwardLength') || '30000');
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.dashboardTheme = function (val) {
|
||||
export function dashboardTheme(val) {
|
||||
if (val != null) {
|
||||
return this.set('dashboardTheme', val);
|
||||
}
|
||||
|
||||
return this.get('dashboardTheme');
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.skin = function (val) {
|
||||
export function skin(val) {
|
||||
if (val != null) {
|
||||
return this.set('skin', val, false);
|
||||
}
|
||||
|
||||
return this.get('skin', false);
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.theme = function (val) {
|
||||
export function theme(val) {
|
||||
if (val != null) {
|
||||
return this.set('appTheme', val, false);
|
||||
}
|
||||
|
||||
return this.get('appTheme', false);
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.screensaver = function (val) {
|
||||
export function screensaver(val) {
|
||||
if (val != null) {
|
||||
return this.set('screensaver', val, false);
|
||||
}
|
||||
|
||||
return this.get('screensaver', false);
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.libraryPageSize = function (val) {
|
||||
export function libraryPageSize(val) {
|
||||
if (val != null) {
|
||||
return this.set('libraryPageSize', parseInt(val, 10), false);
|
||||
}
|
||||
|
@ -214,17 +213,17 @@ define(['appSettings', 'events'], function (appSettings, events) {
|
|||
} else {
|
||||
return libraryPageSize || 100;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.soundEffects = function (val) {
|
||||
export function soundEffects(val) {
|
||||
if (val != null) {
|
||||
return this.set('soundeffects', val, false);
|
||||
}
|
||||
|
||||
return this.get('soundeffects', false);
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.loadQuerySettings = function (key, query) {
|
||||
export function loadQuerySettings(key, query) {
|
||||
var values = this.get(key);
|
||||
if (values) {
|
||||
values = JSON.parse(values);
|
||||
|
@ -232,9 +231,9 @@ define(['appSettings', 'events'], function (appSettings, events) {
|
|||
}
|
||||
|
||||
return query;
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.saveQuerySettings = function (key, query) {
|
||||
export function saveQuerySettings(key, query) {
|
||||
var values = {};
|
||||
if (query.SortBy) {
|
||||
values.SortBy = query.SortBy;
|
||||
|
@ -245,25 +244,24 @@ define(['appSettings', 'events'], function (appSettings, events) {
|
|||
}
|
||||
|
||||
return this.set(key, JSON.stringify(values));
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.getSubtitleAppearanceSettings = function (key) {
|
||||
export function getSubtitleAppearanceSettings(key) {
|
||||
key = key || 'localplayersubtitleappearance3';
|
||||
return JSON.parse(this.get(key, false) || '{}');
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.setSubtitleAppearanceSettings = function (value, key) {
|
||||
export function setSubtitleAppearanceSettings(value, key) {
|
||||
key = key || 'localplayersubtitleappearance3';
|
||||
return this.set(key, JSON.stringify(value), false);
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.setFilter = function (key, value) {
|
||||
export function setFilter(key, value) {
|
||||
return this.set(key, value, true);
|
||||
};
|
||||
}
|
||||
|
||||
UserSettings.prototype.getFilter = function (key) {
|
||||
export function getFilter(key) {
|
||||
return this.get(key, true);
|
||||
};
|
||||
}
|
||||
|
||||
return UserSettings;
|
||||
});
|
||||
/* eslint-enable indent */
|
|
@ -323,11 +323,11 @@ var AppInfo = {};
|
|||
}
|
||||
|
||||
function getElementsPath() {
|
||||
return "elements"
|
||||
return "elements";
|
||||
}
|
||||
|
||||
function getScriptsPath() {
|
||||
return "scripts"
|
||||
return "scripts";
|
||||
}
|
||||
|
||||
function getPlaybackManager(playbackManager) {
|
||||
|
@ -452,6 +452,9 @@ var AppInfo = {};
|
|||
require(["autoFocuser"], function(autoFocuser) {
|
||||
autoFocuser.enable();
|
||||
});
|
||||
require(['globalize', 'connectionManager', 'events'], function (globalize, connectionManager, events) {
|
||||
events.on(connectionManager, 'localusersignedin', globalize.updateCurrentCulture);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -574,6 +577,7 @@ var AppInfo = {};
|
|||
}
|
||||
|
||||
require(["mediaSession", "serverNotifications"]);
|
||||
require(["date-fns", "date-fns/locale"]);
|
||||
|
||||
if (!browser.tv && !browser.xboxOne) {
|
||||
require(["components/playback/playbackorientation"]);
|
||||
|
@ -647,12 +651,12 @@ var AppInfo = {};
|
|||
inputManager: "scripts/inputManager",
|
||||
datetime: "scripts/datetime",
|
||||
globalize: "scripts/globalize",
|
||||
dfnshelper: "scripts/dfnshelper",
|
||||
libraryMenu: "scripts/librarymenu",
|
||||
playlisteditor: componentsPath + "/playlisteditor/playlisteditor",
|
||||
medialibrarycreator: componentsPath + "/medialibrarycreator/medialibrarycreator",
|
||||
medialibraryeditor: componentsPath + "/medialibraryeditor/medialibraryeditor",
|
||||
imageoptionseditor: componentsPath + "/imageoptionseditor/imageoptionseditor",
|
||||
humanedate: componentsPath + "/humanedate",
|
||||
apphost: componentsPath + "/apphost",
|
||||
visibleinviewport: componentsPath + "/visibleinviewport",
|
||||
qualityoptions: componentsPath + "/qualityoptions",
|
||||
|
@ -693,8 +697,10 @@ var AppInfo = {};
|
|||
"webcomponents",
|
||||
"material-icons",
|
||||
"jellyfin-noto",
|
||||
"date-fns",
|
||||
"page",
|
||||
"polyfill"
|
||||
"polyfill",
|
||||
"classlist-polyfill"
|
||||
]
|
||||
},
|
||||
urlArgs: urlArgs,
|
||||
|
@ -703,6 +709,7 @@ var AppInfo = {};
|
|||
});
|
||||
|
||||
require(["polyfill"]);
|
||||
require(["classlist-polyfill"]);
|
||||
|
||||
// Expose jQuery globally
|
||||
require(["jQuery"], function(jQuery) {
|
||||
|
@ -768,10 +775,7 @@ var AppInfo = {};
|
|||
|
||||
define("webSettings", [scriptsPath + "/settings/webSettings"], returnFirstDependency);
|
||||
define("appSettings", [scriptsPath + "/settings/appSettings"], returnFirstDependency);
|
||||
define("userSettingsBuilder", [scriptsPath + "/settings/userSettingsBuilder"], returnFirstDependency);
|
||||
define("userSettings", ["userSettingsBuilder"], function(userSettingsBuilder) {
|
||||
return new userSettingsBuilder();
|
||||
});
|
||||
define("userSettings", [scriptsPath + "/settings/userSettings"], returnFirstDependency);
|
||||
|
||||
define("chromecastHelper", [componentsPath + "/chromecast/chromecasthelpers"], returnFirstDependency);
|
||||
define("mediaSession", [componentsPath + "/playback/mediasession"], returnFirstDependency);
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
define(["dom", "emby-button"], function (dom) {
|
||||
"use strict";
|
||||
|
||||
function onSubmit(e) {
|
||||
if (dom.parentWithClass(this, "page").querySelector(".chkAccept").checked) {
|
||||
Dashboard.navigate("wizardfinish.html");
|
||||
} else {
|
||||
Dashboard.alert({
|
||||
message: Globalize.translate("MessagePleaseAcceptTermsOfServiceBeforeContinuing"),
|
||||
title: ""
|
||||
});
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
|
||||
return function (view, params) {
|
||||
view.querySelector(".wizardAgreementForm").addEventListener("submit", onSubmit);
|
||||
view.addEventListener("viewshow", function () {
|
||||
document.querySelector(".skinHeader").classList.add("noHomeButtonHeader");
|
||||
});
|
||||
view.addEventListener("viewhide", function () {
|
||||
document.querySelector(".skinHeader").classList.remove("noHomeButtonHeader");
|
||||
});
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue