mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
start a dashboard folder
This commit is contained in:
parent
bcd2bd0f52
commit
c043164de5
26 changed files with 182 additions and 95 deletions
|
@ -48,7 +48,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
EmbyButtonPrototype.attachedCallback = function () {
|
||||
EmbyButtonPrototype.createdCallback = function () {
|
||||
|
||||
if (this.classList.contains('paper-icon-button-light')) {
|
||||
return;
|
||||
|
|
|
@ -26,14 +26,14 @@
|
|||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"main": "iron-meta.html",
|
||||
"homepage": "https://github.com/PolymerElements/iron-meta",
|
||||
"homepage": "https://github.com/polymerelements/iron-meta",
|
||||
"_release": "1.1.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.1.1",
|
||||
"commit": "e171ee234b482219c9514e6f9551df48ef48bd9f"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-meta.git",
|
||||
"_source": "git://github.com/polymerelements/iron-meta.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/iron-meta"
|
||||
"_originalSource": "polymerelements/iron-meta"
|
||||
}
|
24
dashboard-ui/camerauploadsettings.html
Normal file
24
dashboard-ui/camerauploadsettings.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
<div id="syncPreferencesPage" data-role="page" class="page libraryPage userPreferencesPage noSecondaryNavPage" data-title="${ButtonSyncSettings}" data-backbutton="true" data-menubutton="false">
|
||||
|
||||
<div data-role="content">
|
||||
<form class="userProfileSettingsForm" style="margin: 0 auto;">
|
||||
|
||||
<h1>
|
||||
${HeaderCameraUpload}
|
||||
</h1>
|
||||
|
||||
<p>${SelectCameraUploadServers}</p>
|
||||
|
||||
<br />
|
||||
<div class="checkboxList uploadServerList">
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<button is="emby-button" type="submit" class="raised submit block">
|
||||
<i class="md-icon">check</i>
|
||||
<span>${ButtonSave}</span>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
|
@ -1,4 +1,4 @@
|
|||
<div id="cinemaModeConfigurationPage" data-role="page" class="page type-interior playbackConfigurationPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Cinema-Mode" data-require="scripts/cinemamodeconfiguration,paper-checkbox,emby-input,emby-button">
|
||||
<div id="cinemaModeConfigurationPage" data-role="page" class="page type-interior playbackConfigurationPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Cinema-Mode" data-require="dashboard/cinemamodeconfiguration,paper-checkbox,emby-input,emby-button">
|
||||
|
||||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
|
|
|
@ -533,22 +533,6 @@ progress {
|
|||
}
|
||||
}
|
||||
|
||||
.nativeApp *:not(input):not(select):not(textarea) {
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-touch-callout: none;
|
||||
-moz-touch-callout: none;
|
||||
-ms-touch-callout: none;
|
||||
touch-callout: none;
|
||||
-webkit-user-drag: none;
|
||||
-moz-user-drag: none;
|
||||
-ms-user-drag: none;
|
||||
user-drag: none;
|
||||
}
|
||||
|
||||
.syncActivityForTarget {
|
||||
margin: 0 0 3em 0;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ body:not(.dashboardDocument) .mainDrawerButton {
|
|||
|
||||
.emby-tab-button {
|
||||
font-weight: 400;
|
||||
text-transform: none;
|
||||
text-transform: none!important;
|
||||
border-color: transparent !important;
|
||||
border-width: 0 !important;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div id="devicesUploadPage" data-role="page" class="page type-interior devicesPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Camera%20upload" data-require="scripts/devicesupload,emby-input,paper-checkbox,emby-button">
|
||||
<div id="devicesUploadPage" data-role="page" class="page type-interior devicesPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Camera%20upload" data-require="dashboard/devicesupload,emby-input,paper-checkbox,emby-button">
|
||||
|
||||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
|
|
|
@ -20,21 +20,10 @@
|
|||
</div>
|
||||
|
||||
<label class="checkboxContainer">
|
||||
<input type="checkbox" is="emby-checkbox" id="chkWifi"/>
|
||||
<input type="checkbox" is="emby-checkbox" id="chkWifi" />
|
||||
<span>${OptionSyncOnlyOnWifi}</span>
|
||||
</label>
|
||||
|
||||
<h1>
|
||||
${HeaderCameraUpload}
|
||||
</h1>
|
||||
|
||||
<p>${SelectCameraUploadServers}</p>
|
||||
|
||||
<br />
|
||||
<div class="checkboxList uploadServerList">
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<button is="emby-button" type="submit" class="raised submit block">
|
||||
<i class="md-icon">check</i>
|
||||
|
|
95
dashboard-ui/scripts/camerauploadsettings.js
Normal file
95
dashboard-ui/scripts/camerauploadsettings.js
Normal file
|
@ -0,0 +1,95 @@
|
|||
define(['appSettings'], function (appSettings) {
|
||||
|
||||
function loadForm(page, user) {
|
||||
|
||||
var uploadServers = appSettings.cameraUploadServers();
|
||||
|
||||
page.querySelector('.uploadServerList').innerHTML = ConnectionManager.getSavedServers().map(function (s) {
|
||||
|
||||
var checkedHtml = uploadServers.indexOf(s.Id) == -1 ? '' : ' checked';
|
||||
var html = '<label><input type="checkbox" is="emby-checkbox"' + checkedHtml + ' class="chkUploadServer" data-id="' + s.Id + '"/><span>' + s.Name + '</span></label>';
|
||||
|
||||
return html;
|
||||
|
||||
}).join('');
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
function saveUser(page, user) {
|
||||
|
||||
var chkUploadServer = page.querySelectorAll('.chkUploadServer');
|
||||
var cameraUploadServers = [];
|
||||
|
||||
for (var i = 0, length = chkUploadServer.length; i < length; i++) {
|
||||
if (chkUploadServer[i].checked) {
|
||||
cameraUploadServers.push(chkUploadServer[i].getAttribute('data-id'));
|
||||
}
|
||||
}
|
||||
|
||||
appSettings.cameraUploadServers(cameraUploadServers);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
require(['toast'], function (toast) {
|
||||
toast(Globalize.translate('SettingsSaved'));
|
||||
});
|
||||
|
||||
if (cameraUploadServers.length || syncPath) {
|
||||
if (window.MainActivity) {
|
||||
MainActivity.authorizeStorage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return function (view, params) {
|
||||
|
||||
view.querySelector('form').addEventListener('submit', function (e) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();
|
||||
|
||||
ApiClient.getUser(userId).then(function (user) {
|
||||
|
||||
saveUser(view, user);
|
||||
|
||||
});
|
||||
|
||||
// Disable default form submission
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
|
||||
view.querySelector('#btnSelectSyncPath').addEventListener('click', function () {
|
||||
|
||||
require(['nativedirectorychooser'], function () {
|
||||
NativeDirectoryChooser.chooseDirectory().then(function (path) {
|
||||
|
||||
if (path) {
|
||||
view.querySelector('#txtSyncPath').value = path;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
view.addEventListener('viewshow', function () {
|
||||
var page = this;
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();
|
||||
|
||||
ApiClient.getUser(userId).then(function (user) {
|
||||
|
||||
loadForm(page, user);
|
||||
});
|
||||
|
||||
if (AppInfo.supportsSyncPathSetting) {
|
||||
page.querySelector('.fldSyncPath').classList.remove('hide');
|
||||
} else {
|
||||
page.querySelector('.fldSyncPath').classList.add('hide');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
});
|
|
@ -5,17 +5,6 @@
|
|||
page.querySelector('#txtSyncPath').value = appSettings.syncPath() || '';
|
||||
page.querySelector('#chkWifi').checked = appSettings.syncOnlyOnWifi();
|
||||
|
||||
var uploadServers = appSettings.cameraUploadServers();
|
||||
|
||||
page.querySelector('.uploadServerList').innerHTML = ConnectionManager.getSavedServers().map(function (s) {
|
||||
|
||||
var checkedHtml = uploadServers.indexOf(s.Id) == -1 ? '' : ' checked';
|
||||
var html = '<label><input type="checkbox" is="emby-checkbox"' + checkedHtml + ' class="chkUploadServer" data-id="' + s.Id + '"/><span>' + s.Name + '</span></label>';
|
||||
|
||||
return html;
|
||||
|
||||
}).join('');
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
|
@ -26,17 +15,6 @@
|
|||
appSettings.syncPath(syncPath);
|
||||
appSettings.syncOnlyOnWifi(page.querySelector('#chkWifi').checked);
|
||||
|
||||
var chkUploadServer = page.querySelectorAll('.chkUploadServer');
|
||||
var cameraUploadServers = [];
|
||||
|
||||
for (var i = 0, length = chkUploadServer.length; i < length; i++) {
|
||||
if (chkUploadServer[i].checked) {
|
||||
cameraUploadServers.push(chkUploadServer[i].getAttribute('data-id'));
|
||||
}
|
||||
}
|
||||
|
||||
appSettings.cameraUploadServers(cameraUploadServers);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
require(['toast'], function (toast) {
|
||||
toast(Globalize.translate('SettingsSaved'));
|
||||
|
|
|
@ -692,7 +692,7 @@ var Dashboard = {
|
|||
// The native app can handle a little bit more than safari
|
||||
if (AppInfo.isNativeApp) {
|
||||
|
||||
quality -= 5;
|
||||
quality -= 10;
|
||||
} else {
|
||||
quality -= 20;
|
||||
}
|
||||
|
@ -1127,10 +1127,6 @@ var AppInfo = {};
|
|||
elem.classList.add('supporterMembershipDisabled');
|
||||
}
|
||||
|
||||
if (AppInfo.isNativeApp) {
|
||||
elem.classList.add('nativeApp');
|
||||
}
|
||||
|
||||
if (!AppInfo.enableHomeFavorites) {
|
||||
elem.classList.add('homeFavoritesDisabled');
|
||||
}
|
||||
|
@ -1255,15 +1251,6 @@ var AppInfo = {};
|
|||
webAnimations: bowerPath + '/web-animations-js/web-animations-next-lite.min'
|
||||
};
|
||||
|
||||
if (navigator.webkitPersistentStorage) {
|
||||
paths.imageFetcher = embyWebComponentsBowerPath + "/images/persistentimagefetcher";
|
||||
paths.imageFetcher = embyWebComponentsBowerPath + "/images/basicimagefetcher";
|
||||
} else if (Dashboard.isRunningInCordova()) {
|
||||
paths.imageFetcher = 'cordova/imagestore';
|
||||
} else {
|
||||
paths.imageFetcher = embyWebComponentsBowerPath + "/images/basicimagefetcher";
|
||||
}
|
||||
|
||||
paths.hlsjs = bowerPath + "/hls.js/dist/hls.min";
|
||||
|
||||
if ((window.chrome && window.chrome.sockets) || Dashboard.isRunningInCordova()) {
|
||||
|
@ -1690,6 +1677,12 @@ var AppInfo = {};
|
|||
|
||||
var embyWebComponentsBowerPath = bowerPath + '/emby-webcomponents';
|
||||
|
||||
if (Dashboard.isRunningInCordova() && browser.safari) {
|
||||
define("imageFetcher", ['cordova/ios/imagestore'], returnFirstDependency);
|
||||
} else {
|
||||
define("imageFetcher", [embyWebComponentsBowerPath + "/images/basicimagefetcher"], returnFirstDependency);
|
||||
}
|
||||
|
||||
var preferNativeAlerts = browser.mobile || browser.tv || browser.xboxOne;
|
||||
// use native alerts if preferred and supported (not supported in opera tv)
|
||||
if (preferNativeAlerts && window.alert) {
|
||||
|
@ -1737,9 +1730,9 @@ var AppInfo = {};
|
|||
if (Dashboard.isRunningInCordova() && browserInfo.android) {
|
||||
|
||||
if (MainActivity.getChromeVersion() >= 48) {
|
||||
define("audiorenderer", ["scripts/htmlmediarenderer"]);
|
||||
//window.VlcAudio = true;
|
||||
//define("audiorenderer", ["cordova/android/vlcplayer"]);
|
||||
//define("audiorenderer", ["scripts/htmlmediarenderer"]);
|
||||
window.VlcAudio = true;
|
||||
define("audiorenderer", ["cordova/android/vlcplayer"]);
|
||||
} else {
|
||||
window.VlcAudio = true;
|
||||
define("audiorenderer", ["cordova/android/vlcplayer"]);
|
||||
|
@ -1892,7 +1885,7 @@ var AppInfo = {};
|
|||
path: '/about.html',
|
||||
dependencies: [],
|
||||
autoFocus: false,
|
||||
controller: 'scripts/aboutpage',
|
||||
controller: 'dashboard/aboutpage',
|
||||
roles: 'admin'
|
||||
});
|
||||
|
||||
|
@ -1913,14 +1906,14 @@ var AppInfo = {};
|
|||
defineRoute({
|
||||
path: '/autoorganizelog.html',
|
||||
dependencies: ['scripts/taskbutton', 'autoorganizetablecss'],
|
||||
controller: 'scripts/autoorganizelog',
|
||||
controller: 'dashboard/autoorganizelog',
|
||||
roles: 'admin'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
path: '/autoorganizesmart.html',
|
||||
dependencies: ['emby-button'],
|
||||
controller: 'scripts/autoorganizesmart',
|
||||
controller: 'dashboard/autoorganizesmart',
|
||||
autoFocus: false,
|
||||
roles: 'admin'
|
||||
});
|
||||
|
@ -1928,7 +1921,7 @@ var AppInfo = {};
|
|||
defineRoute({
|
||||
path: '/autoorganizetv.html',
|
||||
dependencies: ['emby-checkbox', 'emby-input', 'emby-button', 'emby-select', 'emby-collapse'],
|
||||
controller: 'scripts/autoorganizetv',
|
||||
controller: 'dashboard/autoorganizetv',
|
||||
autoFocus: false,
|
||||
roles: 'admin'
|
||||
});
|
||||
|
@ -1980,7 +1973,7 @@ var AppInfo = {};
|
|||
defineRoute({
|
||||
path: '/dashboardgeneral.html',
|
||||
dependencies: ['emby-collapse', 'emby-textarea', 'emby-input', 'paper-checkbox'],
|
||||
controller: 'scripts/dashboardgeneral',
|
||||
controller: 'dashboard/dashboardgeneral',
|
||||
autoFocus: false,
|
||||
roles: 'admin'
|
||||
});
|
||||
|
@ -1990,7 +1983,7 @@ var AppInfo = {};
|
|||
dependencies: ['paper-checkbox', 'emby-input', 'emby-button'],
|
||||
autoFocus: false,
|
||||
roles: 'admin',
|
||||
controller: 'scripts/dashboardhosting'
|
||||
controller: 'dashboard/dashboardhosting'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
|
@ -2156,7 +2149,7 @@ var AppInfo = {};
|
|||
dependencies: ['emby-button', 'paper-checkbox'],
|
||||
autoFocus: false,
|
||||
roles: 'admin',
|
||||
controller: 'scripts/librarydisplay'
|
||||
controller: 'dashboard/librarydisplay'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
|
@ -2171,7 +2164,7 @@ var AppInfo = {};
|
|||
dependencies: ['emby-collapse', 'emby-input', 'paper-checkbox', 'emby-button', 'emby-select'],
|
||||
autoFocus: false,
|
||||
roles: 'admin',
|
||||
controller: 'scripts/librarysettings'
|
||||
controller: 'dashboard/librarysettings'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
|
@ -2240,14 +2233,14 @@ var AppInfo = {};
|
|||
dependencies: ['emby-input', 'paper-checkbox'],
|
||||
autoFocus: false,
|
||||
roles: 'admin',
|
||||
controller: 'scripts/livetvtunerprovider-satip'
|
||||
controller: 'dashboard/livetvtunerprovider-satip'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
path: '/log.html',
|
||||
dependencies: ['emby-checkbox'],
|
||||
roles: 'admin',
|
||||
controller: 'scripts/logpage'
|
||||
controller: 'dashboard/logpage'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
|
@ -2356,6 +2349,14 @@ var AppInfo = {};
|
|||
controller: 'scripts/mysync'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
path: '/camerauploadsettings.html',
|
||||
dependencies: [],
|
||||
autoFocus: false,
|
||||
transition: 'fade',
|
||||
controller: 'scripts/camerauploadsettings'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
path: '/mysyncjob.html',
|
||||
dependencies: [],
|
||||
|
@ -2596,7 +2597,7 @@ var AppInfo = {};
|
|||
dependencies: ['dashboardcss', 'emby-button', 'emby-input', 'emby-select'],
|
||||
autoFocus: false,
|
||||
anonymous: true,
|
||||
controller: 'scripts/wizardcomponents'
|
||||
controller: 'dashboard/wizardcomponents'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
|
@ -2604,7 +2605,7 @@ var AppInfo = {};
|
|||
dependencies: ['emby-button', 'dashboardcss'],
|
||||
autoFocus: false,
|
||||
anonymous: true,
|
||||
controller: 'scripts/wizardfinishpage'
|
||||
controller: 'dashboard/wizardfinishpage'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
|
@ -2707,7 +2708,6 @@ var AppInfo = {};
|
|||
|
||||
if (browserInfo.android) {
|
||||
deps.push('cordova/android/androidcredentials');
|
||||
deps.push('cordova/android/links');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2781,14 +2781,8 @@ var AppInfo = {};
|
|||
postInitDependencies.push('bower_components/emby-webcomponents/input/api');
|
||||
|
||||
if (!browserInfo.tv) {
|
||||
if (navigator.serviceWorker) {
|
||||
try {
|
||||
navigator.serviceWorker.register('serviceworker.js');
|
||||
} catch (err) {
|
||||
console.log('Error registering serviceWorker: ' + err);
|
||||
}
|
||||
}
|
||||
|
||||
registerServiceWorker();
|
||||
if (window.Notification) {
|
||||
postInitDependencies.push('bower_components/emby-webcomponents/notifications/notifications');
|
||||
}
|
||||
|
@ -2800,6 +2794,24 @@ var AppInfo = {};
|
|||
});
|
||||
}
|
||||
|
||||
function registerServiceWorker() {
|
||||
|
||||
if (navigator.serviceWorker) {
|
||||
try {
|
||||
navigator.serviceWorker.register('serviceworker.js').then(function () {
|
||||
return navigator.serviceWorker.ready;
|
||||
}).then(function (reg) {
|
||||
|
||||
// https://github.com/WICG/BackgroundSync/blob/master/explainer.md
|
||||
return reg.sync.register('emby-sync');
|
||||
});
|
||||
|
||||
} catch (err) {
|
||||
console.log('Error registering serviceWorker: ' + err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function upgradeLayouts() {
|
||||
if (!AppInfo.enableAppLayouts) {
|
||||
Dashboard.getPluginSecurityInfo().then(function (info) {
|
||||
|
|
|
@ -147,3 +147,8 @@ self.addEventListener('notificationclick', function (event) {
|
|||
event.waitUntil(executeAction(action, data, serverId));
|
||||
|
||||
}, false);
|
||||
|
||||
self.addEventListener('sync', function (event) {
|
||||
if (event.tag == 'emby-sync') {
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue