Support restarting the server on all platforms

This commit is contained in:
Mark Monteiro 2020-05-24 23:30:47 -04:00
parent c3cbba0a42
commit eb6a76f578
3 changed files with 1 additions and 12 deletions

View file

@ -179,12 +179,6 @@ define(['datetime', 'events', 'itemHelper', 'serverNotifications', 'dom', 'globa
view.querySelector('#operatingSystem').innerHTML = globalize.translate('DashboardOperatingSystem', systemInfo.OperatingSystem); view.querySelector('#operatingSystem').innerHTML = globalize.translate('DashboardOperatingSystem', systemInfo.OperatingSystem);
view.querySelector('#architecture').innerHTML = globalize.translate('DashboardArchitecture', systemInfo.SystemArchitecture); view.querySelector('#architecture').innerHTML = globalize.translate('DashboardArchitecture', systemInfo.SystemArchitecture);
if (systemInfo.CanSelfRestart) {
view.querySelector('#btnRestartServer').classList.remove('hide');
} else {
view.querySelector('#btnRestartServer').classList.add('hide');
}
view.querySelector('#cachePath').innerHTML = systemInfo.CachePath; view.querySelector('#cachePath').innerHTML = systemInfo.CachePath;
view.querySelector('#logPath').innerHTML = systemInfo.LogPath; view.querySelector('#logPath').innerHTML = systemInfo.LogPath;
view.querySelector('#transcodePath').innerHTML = systemInfo.TranscodingTempPath; view.querySelector('#transcodePath').innerHTML = systemInfo.TranscodingTempPath;

View file

@ -18,11 +18,6 @@ define(['jQuery', 'loading', 'globalize', 'fnchecked', 'emby-checkbox', 'emby-te
return '<option value="' + language.Value + '">' + language.Name + '</option>'; return '<option value="' + language.Value + '">' + language.Name + '</option>';
})).val(config.UICulture); })).val(config.UICulture);
currentLanguage = config.UICulture; currentLanguage = config.UICulture;
if (systemInfo.CanSelfRestart || systemInfo.CanSelfUpdate) {
$('.autoUpdatesContainer', page).removeClass('hide');
} else {
$('.autoUpdatesContainer', page).addClass('hide');
}
loading.hide(); loading.hide();
} }

View file

@ -16,7 +16,7 @@
</div> </div>
<div style="margin-top:1em;"> <div style="margin-top:1em;">
<button is="emby-button" type="button" id="btnRestartServer" class="raised hide" onclick="DashboardPage.restart(this);" style="margin-left:0;"> <button is="emby-button" type="button" id="btnRestartServer" class="raised" onclick="DashboardPage.restart(this);" style="margin-left:0;">
<span>${ButtonRestart}</span> <span>${ButtonRestart}</span>
</button> </button>
<button is="emby-button" type="button" id="btnShutdown" class="raised" onclick="DashboardPage.shutdown(this);"> <button is="emby-button" type="button" id="btnShutdown" class="raised" onclick="DashboardPage.shutdown(this);">