1
0
mirror of https://github.com/j-a-n/raspberrymatic-addon-rmupdate.git synced 2023-10-10 13:37:40 +02:00

version 1.8.2

This commit is contained in:
Jan Schneider 2018-02-11 19:07:21 +01:00
parent 74b09963e6
commit b16a814561
4 changed files with 72 additions and 4 deletions

View File

@ -1 +1 @@
1.8.2 1.8.3

View File

@ -83,6 +83,36 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
}); });
} }
function show_reboot_dialog() {
$('#modal-reboot').modal({
onDeny: function(){
return true;
},
onApprove: function() {
rest('POST', '/system_reboot', null, function(data) {
display_message('success', i18next.t('system_is_rebooting'), 120000);
});
return true;
}
})
.modal('show');
}
function show_shutdown_dialog() {
$('#modal-shutdown').modal({
onDeny: function(){
return true;
},
onApprove: function() {
rest('POST', '/system_shutdown', null, function(data) {
display_message('success', i18next.t('system_is_shutting_down'), 120000);
});
return true;
}
})
.modal('show');
}
function disable_buttons() { function disable_buttons() {
$('[data-install-firmware-version]').addClass('disabled'); $('[data-install-firmware-version]').addClass('disabled');
$('[data-delete-firmware-version]').addClass('disabled'); $('[data-delete-firmware-version]').addClass('disabled');
@ -464,6 +494,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
system_type: 'System type: {{system_type}}', system_type: 'System type: {{system_type}}',
reboot_system: 'Reboot system', reboot_system: 'Reboot system',
shutdown_system: 'Shutdown system', shutdown_system: 'Shutdown system',
reboot: 'Reboot',
shutdown: 'Shutdown',
sure_to_reboot_system: 'Are you sure you want to reboot the system now?',
sure_to_shutdown_system: 'Are you sure you want to shutdown the system now?',
system_is_rebooting: 'System is going down for reboot now.',
system_is_shutting_down: 'System is going down for shutdown now.',
firmwares: 'Firmwares', firmwares: 'Firmwares',
current_installed_version: 'Current installed version', current_installed_version: 'Current installed version',
latest_available_version: 'Latest available version', latest_available_version: 'Latest available version',
@ -519,6 +555,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
system_type: 'System-Typ: {{system_type}}', system_type: 'System-Typ: {{system_type}}',
reboot_system: 'System neu starten', reboot_system: 'System neu starten',
shutdown_system: 'System herunterfahren', shutdown_system: 'System herunterfahren',
reboot: 'Neu starten',
shutdown: 'Herunterfahren',
sure_to_reboot_system: 'Soll das System jetzt neu gestartet werden?',
sure_to_shutdown_system: 'Soll das System jetzt heruntergefahren werden?',
system_is_rebooting: 'Das System wird neu gestartet.',
system_is_shutting_down: 'Das System wird heruntergefahren.',
firmwares: 'Firmwares', firmwares: 'Firmwares',
current_installed_version: 'Momentan installierte Version', current_installed_version: 'Momentan installierte Version',
latest_available_version: 'Aktuellste verfügbare Version', latest_available_version: 'Aktuellste verfügbare Version',
@ -636,8 +678,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</h2> </h2>
<div class="ui list" id="system-info"> <div class="ui list" id="system-info">
</div> </div>
<div class="ui orange basic button" data-i18n="reboot_system" onclick="rest('POST', '/system_reboot');"></div> <div class="ui orange basic button" data-i18n="reboot_system" onclick="show_reboot_dialog();"></div>
<div class="ui red basic button" data-i18n="shutdown_system" onclick="rest('POST', '/system_shutdown');"></div> <div class="ui red basic button" data-i18n="shutdown_system" onclick="show_shutdown_dialog();"></div>
<h2 class="ui header"> <h2 class="ui header">
<i class="settings icon"></i> <i class="settings icon"></i>
@ -770,6 +812,32 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</div> </div>
</div> </div>
<div id="modal-reboot" class="ui small basic modal transition scrolling">
<div data-i18n="reboot_system" class="header"></div>
<div class="content">
<p data-i18n="sure_to_reboot_system"></p>
</div>
<div class="actions">
<div data-i18n="cancel" class="ui gray basic cancel inverted button">
</div>
<div data-i18n="reboot" class="ui red approve inverted button">
</div>
</div>
</div>
<div id="modal-shutdown" class="ui small basic modal transition scrolling">
<div data-i18n="shutdown_system" class="header"></div>
<div class="content">
<p data-i18n="sure_to_shutdown_system"></p>
</div>
<div class="actions">
<div data-i18n="cancel" class="ui gray basic cancel inverted button">
</div>
<div data-i18n="shutdown" class="ui red approve inverted button">
</div>
</div>
</div>
<div id="modal-connect-wlan" class="ui modal"> <div id="modal-connect-wlan" class="ui modal">
<i class="close icon"></i> <i class="close icon"></i>
<div class="header" data-i18n="connect_to_wlan"> <div class="header" data-i18n="connect_to_wlan">

View File

@ -60,7 +60,7 @@ proc process {} {
exec /sbin/reboot exec /sbin/reboot
return "\"reboot initiated\"" return "\"reboot initiated\""
} elseif {[lindex $path 1] == "system_shutdown"} { } elseif {[lindex $path 1] == "system_shutdown"} {
exec /sbin/shutdown exec /sbin/poweroff
return "\"shutdown initiated\"" return "\"shutdown initiated\""
} elseif {[lindex $path 1] == "get_addon_info"} { } elseif {[lindex $path 1] == "get_addon_info"} {
return [rmupdate::get_addon_info 1 1 1] return [rmupdate::get_addon_info 1 1 1]

Binary file not shown.