mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update to new confirm pattern
This commit is contained in:
parent
a42596f118
commit
166a16b60d
11 changed files with 46 additions and 55 deletions
|
@ -971,27 +971,27 @@
|
|||
|
||||
restart: function () {
|
||||
|
||||
Dashboard.confirm(Globalize.translate('MessageConfirmRestart'), Globalize.translate('HeaderRestart'), function (result) {
|
||||
require(['confirm'], function (confirm) {
|
||||
|
||||
confirm(Globalize.translate('MessageConfirmRestart'), Globalize.translate('HeaderRestart')).then(function () {
|
||||
|
||||
if (result) {
|
||||
$('#btnRestartServer').buttonEnabled(false);
|
||||
$('#btnShutdown').buttonEnabled(false);
|
||||
Dashboard.restartServer();
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
shutdown: function () {
|
||||
|
||||
Dashboard.confirm(Globalize.translate('MessageConfirmShutdown'), Globalize.translate('HeaderShutdown'), function (result) {
|
||||
require(['confirm'], function (confirm) {
|
||||
|
||||
confirm(Globalize.translate('MessageConfirmShutdown'), Globalize.translate('HeaderShutdown')).then(function () {
|
||||
|
||||
if (result) {
|
||||
$('#btnRestartServer').buttonEnabled(false);
|
||||
$('#btnShutdown').buttonEnabled(false);
|
||||
ApiClient.shutdownServer();
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue