mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added CanSelfRestart
This commit is contained in:
parent
c236b53727
commit
d8fdb2f5f8
3 changed files with 18 additions and 5 deletions
|
@ -158,7 +158,7 @@ var Dashboard = {
|
|||
Dashboard.getCurrentUser().done(function (currentUser) {
|
||||
|
||||
if (currentUser.Configuration.IsAdministrator) {
|
||||
Dashboard.showServerRestartWarning();
|
||||
Dashboard.showServerRestartWarning(info);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -252,10 +252,13 @@ var Dashboard = {
|
|||
|
||||
},
|
||||
|
||||
showServerRestartWarning: function () {
|
||||
showServerRestartWarning: function (systemInfo) {
|
||||
|
||||
var html = '<span style="margin-right: 1em;">Please restart Media Browser Server to finish updating.</span>';
|
||||
html += '<button type="button" data-icon="refresh" onclick="$(this).button(\'disable\');Dashboard.restartServer();" data-theme="b" data-inline="true" data-mini="true">Restart Server</button>';
|
||||
|
||||
if (systemInfo.CanSelfRestart) {
|
||||
html += '<button type="button" data-icon="refresh" onclick="$(this).button(\'disable\');Dashboard.restartServer();" data-theme="b" data-inline="true" data-mini="true">Restart Server</button>';
|
||||
}
|
||||
|
||||
Dashboard.showFooterNotification({ id: "serverRestartWarning", html: html, forceShow: true, allowHide: false });
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue