update translations
This commit is contained in:
parent
d65219f9f8
commit
dbf135beac
114 changed files with 3331 additions and 93 deletions
|
@ -56,6 +56,14 @@
|
|||
|
||||
return appStorage.getItem('enableFullScreen') == 'true';
|
||||
},
|
||||
syncOnlyOnWifi: function (val) {
|
||||
|
||||
if (val != null) {
|
||||
update('syncOnlyOnWifi', val.toString());
|
||||
}
|
||||
|
||||
return appStorage.getItem('syncOnlyOnWifi') != 'false';
|
||||
},
|
||||
syncPath: function (val) {
|
||||
|
||||
if (val != null) {
|
||||
|
|
18
dashboard-ui/scripts/localsync.js
Normal file
18
dashboard-ui/scripts/localsync.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
(function () {
|
||||
|
||||
window.LocalSync = {
|
||||
|
||||
isSupported: function () {
|
||||
return false;
|
||||
},
|
||||
|
||||
startSync: function () {
|
||||
|
||||
},
|
||||
|
||||
getSyncStatus: function () {
|
||||
return 'Idle';
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
67
dashboard-ui/scripts/mysync.js
Normal file
67
dashboard-ui/scripts/mysync.js
Normal file
|
@ -0,0 +1,67 @@
|
|||
(function () {
|
||||
|
||||
function refreshSyncStatus(page) {
|
||||
|
||||
require(['localsync'], function () {
|
||||
|
||||
if (LocalSync.isSupported()) {
|
||||
|
||||
page.querySelector('.localSyncStatus').classList.remove('hide');
|
||||
|
||||
var status = LocalSync.getSyncStatus();
|
||||
|
||||
page.querySelector('.labelSyncStatus').innerHTML = Globalize.translate('LabelLocalSyncStatusValue', status);
|
||||
page.querySelector('.syncSpinner').active = status == "Active";
|
||||
|
||||
page.querySelector('.btnSyncNow').disabled = status == "Active";
|
||||
|
||||
} else {
|
||||
page.querySelector('.localSyncStatus').classList.add('hide');
|
||||
page.querySelector('.syncSpinner').active = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function syncNow(page) {
|
||||
|
||||
require(['localsync'], function () {
|
||||
|
||||
LocalSync.startSync();
|
||||
Dashboard.alert(Globalize.translate('MessageSyncStarted'));
|
||||
refreshSyncStatus(page);
|
||||
});
|
||||
}
|
||||
|
||||
var interval;
|
||||
|
||||
$(document).on('pageinitdepends', "#mySyncActivityPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('.btnSyncNow', page).on('click', function () {
|
||||
syncNow(page);
|
||||
});
|
||||
|
||||
}).on('pageshowready', "#mySyncActivityPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
refreshSyncStatus(page);
|
||||
|
||||
interval = setInterval(function () {
|
||||
refreshSyncStatus(page);
|
||||
}, 5000);
|
||||
|
||||
}).on('pagebeforehide', "#mySyncActivityPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
page.querySelector('.syncSpinner').active = false;
|
||||
|
||||
if (interval) {
|
||||
clearInterval(interval);
|
||||
interval = null;
|
||||
}
|
||||
});
|
||||
|
||||
})();
|
|
@ -3,6 +3,7 @@
|
|||
function loadForm(page, user) {
|
||||
|
||||
page.querySelector('#txtSyncPath').value = AppSettings.syncPath();
|
||||
page.querySelector('#chkWifi').checked = AppSettings.syncOnlyOnWifi();
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
@ -10,6 +11,8 @@
|
|||
function saveUser(page, user) {
|
||||
|
||||
AppSettings.syncPath(page.querySelector('#txtSyncPath').value);
|
||||
AppSettings.syncOnlyOnWifi(page.querySelector('#chkWifi').checked);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
Dashboard.alert(Globalize.translate('SettingsSaved'));
|
||||
}
|
||||
|
|
|
@ -2004,6 +2004,13 @@ var AppInfo = {};
|
|||
define("videorenderer", ["scripts/htmlmediarenderer"]);
|
||||
}
|
||||
|
||||
if (Dashboard.isRunningInCordova() && $.browser.android) {
|
||||
define("localsync", ["cordova/android/localsync"]);
|
||||
}
|
||||
else {
|
||||
define("localsync", ["scripts/localsync"]);
|
||||
}
|
||||
|
||||
define("connectservice", ["apiclient/connectservice"]);
|
||||
define("paperbuttonstyle", [], function () {
|
||||
return {};
|
||||
|
@ -2107,7 +2114,9 @@ var AppInfo = {};
|
|||
|
||||
var capablities = Dashboard.capabilities();
|
||||
|
||||
init(deferred, capablities, "Emby Mobile", deviceId, device.model);
|
||||
var name = $.browser.android ? "Emby for Android" : ($.browser.safari ? "Emby for iOS" : "Emby Mobile");
|
||||
|
||||
init(deferred, capablities, name, deviceId, device.model);
|
||||
}
|
||||
|
||||
function initCordova(deferred) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue