mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update dashboard refresh
This commit is contained in:
parent
bb2043e5f0
commit
89f41cdea2
1 changed files with 3 additions and 21 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue