mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 11:28:23 -07:00
update dashboard refresh
This commit is contained in:
parent
bb2043e5f0
commit
89f41cdea2
@ -165,9 +165,9 @@ var Dashboard = {
|
|||||||
|
|
||||||
Dashboard.hideServerRestartWarning();
|
Dashboard.hideServerRestartWarning();
|
||||||
|
|
||||||
if (Dashboard.initialServerVersion != info.Version) {
|
if (Dashboard.initialServerVersion != info.Version && !AppInfo.isNativeApp) {
|
||||||
|
|
||||||
Dashboard.showDashboardRefreshNotification();
|
window.location.reload(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -195,24 +195,6 @@ var Dashboard = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
showDashboardRefreshNotification: function () {
|
|
||||||
|
|
||||||
if (AppInfo.isNativeApp) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var html = '<span style="margin-right: 1em;">' + Globalize.translate('MessagePleaseRefreshPage') + '</span>';
|
|
||||||
|
|
||||||
html += '<button is="emby-button" type="button" class="raised submit mini" onclick="this.disabled=\'disabled\';Dashboard.reloadPage();"><i class="md-icon">refresh</i><span>' + Globalize.translate('ButtonRefresh') + '</span></button>';
|
|
||||||
|
|
||||||
Dashboard.showFooterNotification({ id: "dashboardVersionWarning", html: html, forceShow: true, allowHide: false });
|
|
||||||
},
|
|
||||||
|
|
||||||
reloadPage: function () {
|
|
||||||
|
|
||||||
window.location.reload(true);
|
|
||||||
},
|
|
||||||
|
|
||||||
showFooterNotification: function (options) {
|
showFooterNotification: function (options) {
|
||||||
|
|
||||||
var removeOnHide = !options.id;
|
var removeOnHide = !options.id;
|
||||||
@ -437,7 +419,7 @@ var Dashboard = {
|
|||||||
|
|
||||||
// If this is back to false, the restart completed
|
// If this is back to false, the restart completed
|
||||||
if (!info.HasPendingRestart) {
|
if (!info.HasPendingRestart) {
|
||||||
Dashboard.reloadPage();
|
window.location.reload(true);
|
||||||
} else {
|
} else {
|
||||||
Dashboard.retryReload(retryCount);
|
Dashboard.retryReload(retryCount);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user