update dashboard refresh

This commit is contained in:
Luke Pulverenti 2016-08-13 20:52:19 -04:00
parent bb2043e5f0
commit 89f41cdea2

View File

@ -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);
} }