mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -07:00
remove camera upload and sync options from preference menu
This commit is contained in:
parent
5aac42d5bd
commit
7560d9abd1
@ -1,17 +0,0 @@
|
|||||||
<div id="syncPreferencesPage" data-role="page" class="page libraryPage userPreferencesPage noSecondaryNavPage" data-title="${TabCameraUpload}" data-menubutton="false">
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<form class="userProfileSettingsForm" style="margin: 0 auto;">
|
|
||||||
|
|
||||||
<h1>
|
|
||||||
${HeaderCameraUpload}
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
<p>${SelectCameraUploadServers}</p>
|
|
||||||
|
|
||||||
<div class="checkboxList uploadServerList">
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -47,24 +47,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a is="emby-linkbutton" style="display:block; padding: 0; margin:0;" data-ripple="false" href="#" class="lnkCameraUpload hide listItem-border">
|
|
||||||
<div class="listItem">
|
|
||||||
<i class="md-icon listItemIcon listItemIcon-transparent">photo</i>
|
|
||||||
<div class="listItemBody">
|
|
||||||
<div class="listItemBodyText">${TabCameraUpload}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a is="emby-linkbutton" style="display:block; padding: 0; margin:0;" data-ripple="false" href="#" class="lnkSync hide listItem-border">
|
|
||||||
<div class="listItem">
|
|
||||||
<i class="md-icon listItemIcon listItemIcon-transparent">file_download</i>
|
|
||||||
<div class="listItemBody">
|
|
||||||
<div class="listItemBodyText">${HeaderOfflineSync}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="verticalSection verticalSection-extrabottompadding">
|
<div class="verticalSection verticalSection-extrabottompadding">
|
||||||
<h2 class="sectionTitle headerUser" style="padding-left:.25em;"></h2>
|
<h2 class="sectionTitle headerUser" style="padding-left:.25em;"></h2>
|
||||||
@ -77,12 +59,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div class="listItem btnLogout listItem-border">
|
<a is="emby-linkbutton" style="display:block; padding: 0; margin:0;" data-ripple="false" href="#" class="btnLogout hide listItem-border">
|
||||||
|
<div class="listItem">
|
||||||
<i class="md-icon listItemIcon listItemIcon-transparent">lock</i>
|
<i class="md-icon listItemIcon listItemIcon-transparent">lock</i>
|
||||||
<div class="listItemBody">
|
<div class="listItemBody">
|
||||||
<div class="listItemBodyText">${ButtonSignOut}</div>
|
<div class="listItemBodyText">${ButtonSignOut}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
<div id="syncPreferencesPage" data-role="page" class="page libraryPage userPreferencesPage noSecondaryNavPage" data-title="${HeaderOfflineSync}" data-menubutton="false">
|
|
||||||
|
|
||||||
<div class="padded-left padded-right padded-bottom-page">
|
|
||||||
<form class="userProfileSettingsForm" style="margin: 0 auto;">
|
|
||||||
|
|
||||||
<h1>
|
|
||||||
${HeaderOfflineSync}
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
<div class="inputContainer fldSyncPath hide">
|
|
||||||
<div style="display: flex; align-items: center;">
|
|
||||||
<div style="flex-grow: 1;">
|
|
||||||
<input is="emby-input" id="txtSyncPath" class="txtSyncPath" label="${LabelSyncPath}" autocomplete="off" readonly />
|
|
||||||
</div>
|
|
||||||
<button type="button" is="paper-icon-button-light" id="btnSelectSyncPath" class="autoSize">
|
|
||||||
<i class="md-icon">search</i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="selectContainer">
|
|
||||||
<select is="emby-select" class="selectAudioBitrate" label="${LabelMaxAudioFileBitrate}">
|
|
||||||
<option value="2000000">${OptionNone}</option>
|
|
||||||
<option value="320000">320K</option>
|
|
||||||
<option value="256000">256K</option>
|
|
||||||
<option value="192000">192K</option>
|
|
||||||
<option value="128000">128K</option>
|
|
||||||
<option value="64000">64K</option>
|
|
||||||
</select>
|
|
||||||
<div class="fieldDescription">${LabelMaxAudioFileBitrateHelp}</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<label class="checkboxContainer">
|
|
||||||
<input type="checkbox" is="emby-checkbox" id="chkWifi" />
|
|
||||||
<span>${OptionSyncOnlyOnWifi}</span>
|
|
||||||
</label>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,29 +0,0 @@
|
|||||||
define(["appSettings", "loading", "emby-checkbox"], function(appSettings, loading) {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
function loadForm(page, user) {
|
|
||||||
var uploadServers = appSettings.cameraUploadServers();
|
|
||||||
page.querySelector(".uploadServerList").innerHTML = ConnectionManager.getSavedServers().map(function(s) {
|
|
||||||
return '<label><input type="checkbox" is="emby-checkbox"' + (-1 == uploadServers.indexOf(s.Id) ? "" : " checked") + ' class="chkUploadServer" data-id="' + s.Id + '"/><span>' + s.Name + "</span></label>"
|
|
||||||
}).join(""), loading.hide()
|
|
||||||
}
|
|
||||||
|
|
||||||
function saveUser(page) {
|
|
||||||
for (var chkUploadServer = page.querySelectorAll(".chkUploadServer"), cameraUploadServers = [], i = 0, length = chkUploadServer.length; i < length; i++) chkUploadServer[i].checked && cameraUploadServers.push(chkUploadServer[i].getAttribute("data-id"));
|
|
||||||
appSettings.cameraUploadServers(cameraUploadServers), window.MainActivity && MainActivity.authorizeStorage(), loading.hide()
|
|
||||||
}
|
|
||||||
return function(view, params) {
|
|
||||||
view.querySelector("form").addEventListener("submit", function(e) {
|
|
||||||
return loading.show(), saveUser(view), e.preventDefault(), !1
|
|
||||||
}), view.addEventListener("viewshow", function() {
|
|
||||||
var page = this;
|
|
||||||
loading.show();
|
|
||||||
var userId = params.userId || Dashboard.getCurrentUserId();
|
|
||||||
ApiClient.getUser(userId).then(function(user) {
|
|
||||||
loadForm(page, user)
|
|
||||||
})
|
|
||||||
}), view.addEventListener("viewbeforehide", function() {
|
|
||||||
saveUser(this)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
});
|
|
@ -1,9 +1,12 @@
|
|||||||
define(["apphost", "connectionManager", "listViewStyle", "emby-linkbutton"], function(appHost, connectionManager) {
|
define(["apphost", "connectionManager", "listViewStyle", "emby-linkbutton"], function(appHost, connectionManager) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return function(view, params) {
|
return function(view, params) {
|
||||||
view.querySelector(".btnLogout").addEventListener("click", function() {
|
view.querySelector(".btnLogout").addEventListener("click", function() {
|
||||||
Dashboard.logout()
|
Dashboard.logout();
|
||||||
}), view.addEventListener("viewshow", function() {
|
});
|
||||||
|
|
||||||
|
view.addEventListener("viewshow", function() {
|
||||||
var page = this;
|
var page = this;
|
||||||
var userId = params.userId || Dashboard.getCurrentUserId();
|
var userId = params.userId || Dashboard.getCurrentUserId();
|
||||||
|
|
||||||
@ -12,27 +15,16 @@ define(["apphost", "connectionManager", "listViewStyle", "emby-linkbutton"], fun
|
|||||||
page.querySelector(".lnkSubtitleSettings").setAttribute("href", "mypreferencessubtitles.html?userId=" + userId);
|
page.querySelector(".lnkSubtitleSettings").setAttribute("href", "mypreferencessubtitles.html?userId=" + userId);
|
||||||
page.querySelector(".lnkHomeScreenPreferences").setAttribute("href", "mypreferenceshome.html?userId=" + userId);
|
page.querySelector(".lnkHomeScreenPreferences").setAttribute("href", "mypreferenceshome.html?userId=" + userId);
|
||||||
page.querySelector(".lnkMyProfile").setAttribute("href", "myprofile.html?userId=" + userId);
|
page.querySelector(".lnkMyProfile").setAttribute("href", "myprofile.html?userId=" + userId);
|
||||||
page.querySelector(".lnkSync").setAttribute("href", "mysyncsettings.html?userId=" + userId);
|
|
||||||
page.querySelector(".lnkCameraUpload").setAttribute("href", "camerauploadsettings.html?userId=" + userId);
|
|
||||||
|
|
||||||
appHost.supports("cameraupload")
|
|
||||||
? page.querySelector(".lnkCameraUpload").classList.remove("hide")
|
|
||||||
: page.querySelector(".lnkCameraUpload").classList.add("hide");
|
|
||||||
|
|
||||||
appHost.supports("sync")
|
|
||||||
? page.querySelector(".lnkSync").classList.remove("hide")
|
|
||||||
: page.querySelector(".lnkSync").classList.add("hide");
|
|
||||||
|
|
||||||
|
appHost.supports("multiserver") ? page.querySelector(".selectServer").classList.remove("hide") : page.querySelector(".selectServer").classList.add("hide");
|
||||||
connectionManager.user(ApiClient).then(function(user) {
|
connectionManager.user(ApiClient).then(function(user) {
|
||||||
user.localUser && !user.localUser.EnableAutoLogin ? view.querySelector(".btnLogout").classList.add("hide") : view.querySelector(".btnLogout").classList.remove("hide");
|
user.localUser && !user.localUser.EnableAutoLogin ? view.querySelector(".btnLogout").classList.remove("hide") : view.querySelector(".btnLogout").classList.add("hide");
|
||||||
});
|
});
|
||||||
|
|
||||||
Dashboard.getCurrentUser().then(function(user) {
|
Dashboard.getCurrentUser().then(function(user) {
|
||||||
page.querySelector(".headerUser").innerHTML = user.Name;
|
page.querySelector(".headerUser").innerHTML = user.Name;
|
||||||
user.Policy.IsAdministrator ? page.querySelector(".adminSection").classList.remove("hide") : page.querySelector(".adminSection").classList.add("hide");
|
user.Policy.IsAdministrator ? page.querySelector(".adminSection").classList.remove("hide") : page.querySelector(".adminSection").classList.add("hide");
|
||||||
});
|
});
|
||||||
|
|
||||||
appHost.supports("multiserver") ? page.querySelector(".selectServer").classList.remove("hide") : page.querySelector(".selectServer").classList.add("hide");
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
@ -1,33 +0,0 @@
|
|||||||
define(["appSettings", "apphost", "emby-checkbox", "emby-select", "emby-input"], function(appSettings, appHost) {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
function loadForm(page, user) {
|
|
||||||
page.querySelector("#txtSyncPath").value = appSettings.syncPath() || "", page.querySelector("#chkWifi").checked = appSettings.syncOnlyOnWifi(), page.querySelector(".selectAudioBitrate").value = appSettings.maxStaticMusicBitrate() || ""
|
|
||||||
}
|
|
||||||
|
|
||||||
function saveUser(page) {
|
|
||||||
var syncPath = page.querySelector("#txtSyncPath").value;
|
|
||||||
appSettings.syncPath(syncPath), appSettings.syncOnlyOnWifi(page.querySelector("#chkWifi").checked), appSettings.maxStaticMusicBitrate(page.querySelector(".selectAudioBitrate").value || null), require(["localsync"], function(localSync) {
|
|
||||||
localSync.sync()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return function(view, params) {
|
|
||||||
view.querySelector("form").addEventListener("submit", function(e) {
|
|
||||||
return saveUser(view), e.preventDefault(), !1
|
|
||||||
}), view.querySelector("#btnSelectSyncPath").addEventListener("click", function() {
|
|
||||||
require(["nativedirectorychooser"], function() {
|
|
||||||
NativeDirectoryChooser.chooseDirectory().then(function(path) {
|
|
||||||
path && (view.querySelector("#txtSyncPath").value = path)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}), view.addEventListener("viewshow", function() {
|
|
||||||
var page = this,
|
|
||||||
userId = getParameterByName("userId") || Dashboard.getCurrentUserId();
|
|
||||||
ApiClient.getUser(userId).then(function(user) {
|
|
||||||
loadForm(page, user)
|
|
||||||
}), appHost.supports("customsyncpath") ? page.querySelector(".fldSyncPath").classList.remove("hide") : page.querySelector(".fldSyncPath").classList.add("hide")
|
|
||||||
}), view.addEventListener("viewbeforehide", function() {
|
|
||||||
saveUser(this)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
});
|
|
@ -670,24 +670,12 @@ var Dashboard = {
|
|||||||
autoFocus: !1,
|
autoFocus: !1,
|
||||||
transition: "fade",
|
transition: "fade",
|
||||||
controller: "scripts/myprofile"
|
controller: "scripts/myprofile"
|
||||||
}), defineRoute({
|
|
||||||
path: "/camerauploadsettings.html",
|
|
||||||
dependencies: [],
|
|
||||||
autoFocus: !1,
|
|
||||||
transition: "fade",
|
|
||||||
controller: "scripts/camerauploadsettings"
|
|
||||||
}), defineRoute({
|
}), defineRoute({
|
||||||
path: "/mysyncjob.html",
|
path: "/mysyncjob.html",
|
||||||
dependencies: [],
|
dependencies: [],
|
||||||
autoFocus: !1,
|
autoFocus: !1,
|
||||||
transition: "fade",
|
transition: "fade",
|
||||||
controller: "scripts/syncjob"
|
controller: "scripts/syncjob"
|
||||||
}), defineRoute({
|
|
||||||
path: "/mysyncsettings.html",
|
|
||||||
dependencies: ["emby-checkbox", "emby-input", "emby-button", "paper-icon-button-light"],
|
|
||||||
autoFocus: !1,
|
|
||||||
transition: "fade",
|
|
||||||
controller: "scripts/mysyncsettings"
|
|
||||||
}), defineRoute({
|
}), defineRoute({
|
||||||
path: "/notificationsetting.html",
|
path: "/notificationsetting.html",
|
||||||
dependencies: [],
|
dependencies: [],
|
||||||
@ -1118,7 +1106,6 @@ var Dashboard = {
|
|||||||
serverId = item.ServerId || options.serverId;
|
serverId = item.ServerId || options.serverId;
|
||||||
if ("settings" === item) return "mypreferencesmenu.html";
|
if ("settings" === item) return "mypreferencesmenu.html";
|
||||||
if ("wizard" === item) return "wizardstart.html";
|
if ("wizard" === item) return "wizardstart.html";
|
||||||
if ("downloadsettings" === item) return "mysyncsettings.html";
|
|
||||||
if ("manageserver" === item) return "dashboard.html";
|
if ("manageserver" === item) return "dashboard.html";
|
||||||
if ("recordedtv" === item) return "livetv.html?tab=3&serverId=" + options.serverId;
|
if ("recordedtv" === item) return "livetv.html?tab=3&serverId=" + options.serverId;
|
||||||
if ("nextup" === item) return "list/list.html?type=nextup&serverId=" + options.serverId;
|
if ("nextup" === item) return "list/list.html?type=nextup&serverId=" + options.serverId;
|
||||||
|
Loading…
Reference in New Issue
Block a user