mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix sync status display
This commit is contained in:
parent
a07e6b59a3
commit
94a5cf7549
26 changed files with 415 additions and 276 deletions
|
@ -26,8 +26,9 @@
|
|||
} else {
|
||||
|
||||
var url = getUrl(name, culture);
|
||||
var requestUrl = url + "?v=" + window.dashboardVersion;
|
||||
|
||||
$.getJSON(url).done(function (dictionary) {
|
||||
$.getJSON(requestUrl).done(function (dictionary) {
|
||||
|
||||
dictionaries[url] = dictionary;
|
||||
deferred.resolve();
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
getPromise().done(function (item) {
|
||||
|
||||
reloadFromItem(page, item);
|
||||
window.scrollTo(0, 0);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -548,13 +548,7 @@
|
|||
|
||||
closeMainDrawer();
|
||||
|
||||
requirejs(["scripts/registrationservices"], function () {
|
||||
|
||||
RegistrationServices.validateFeature('manageserver').done(function () {
|
||||
Dashboard.navigate('dashboard.html');
|
||||
|
||||
});
|
||||
});
|
||||
Dashboard.navigate('dashboard.html');
|
||||
}
|
||||
|
||||
function getTopParentId() {
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
if (LocalSync.isSupported()) {
|
||||
|
||||
page.querySelector('.localSyncStatus').classList.remove('hide');
|
||||
|
||||
var status = LocalSync.getSyncStatus();
|
||||
|
||||
page.querySelector('.labelSyncStatus').innerHTML = Globalize.translate('LabelLocalSyncStatusValue', status);
|
||||
|
@ -20,9 +18,6 @@
|
|||
page.querySelector('.btnSyncNow').classList.remove('hide');
|
||||
}
|
||||
|
||||
} else {
|
||||
page.querySelector('.localSyncStatus').classList.add('hide');
|
||||
page.querySelector('.syncSpinner').active = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -47,7 +42,19 @@
|
|||
syncNow(page);
|
||||
});
|
||||
|
||||
}).on('pageshow', "#mySyncActivityPage", function () {
|
||||
require(['localsync'], function () {
|
||||
|
||||
if (LocalSync.isSupported()) {
|
||||
|
||||
page.querySelector('.localSyncStatus').classList.remove('hide');
|
||||
|
||||
} else {
|
||||
page.querySelector('.localSyncStatus').classList.add('hide');
|
||||
page.querySelector('.syncSpinner').active = false;
|
||||
}
|
||||
});
|
||||
|
||||
}).on('pagebeforeshow', "#mySyncActivityPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
|
|
@ -100,6 +100,12 @@ var Dashboard = {
|
|||
return;
|
||||
}
|
||||
|
||||
// Don't bounce if the failure is in a sync service
|
||||
if (url.indexOf('/sync') != -1) {
|
||||
Dashboard.hideLoadingMsg();
|
||||
return;
|
||||
}
|
||||
|
||||
// Bounce to the login screen, but not if a password entry fails, obviously
|
||||
if (url.indexOf('/password') == -1 &&
|
||||
url.indexOf('/authenticate') == -1 &&
|
||||
|
@ -238,6 +244,8 @@ var Dashboard = {
|
|||
|
||||
importCss: function (url) {
|
||||
|
||||
url += "?v=" + window.dashboardVersion;
|
||||
|
||||
if (!Dashboard.importedCss) {
|
||||
Dashboard.importedCss = [];
|
||||
}
|
||||
|
@ -2019,12 +2027,20 @@ var AppInfo = {};
|
|||
urlArgs += new Date().getTime();
|
||||
}
|
||||
|
||||
var paths = {
|
||||
velocity: "bower_components/velocity/velocity.min"
|
||||
};
|
||||
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
paths.prompt = "cordova/prompt";
|
||||
} else {
|
||||
paths.prompt = "components/prompt";
|
||||
}
|
||||
|
||||
requirejs.config({
|
||||
urlArgs: urlArgs,
|
||||
|
||||
paths: {
|
||||
"velocity": "bower_components/velocity/velocity.min"
|
||||
}
|
||||
paths: paths
|
||||
});
|
||||
|
||||
// Required since jQuery is loaded before requireJs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue