From 5e91b061229fdff739fe58302345a5e719efa02e Mon Sep 17 00:00:00 2001 From: Squidly271 Date: Tue, 4 Nov 2025 22:20:36 -0500 Subject: [PATCH] Feat: Better identify safemode --- emhttp/plugins/dynamix/ArrayOperation.page | 29 +++++++++++++++++-- .../plugins/dynamix/styles/default-base.css | 4 +++ 2 files changed, 31 insertions(+), 2 deletions(-) mode change 100644 => 100755 emhttp/plugins/dynamix/ArrayOperation.page diff --git a/emhttp/plugins/dynamix/ArrayOperation.page b/emhttp/plugins/dynamix/ArrayOperation.page old mode 100644 new mode 100755 index 74381e295..9434adc99 --- a/emhttp/plugins/dynamix/ArrayOperation.page +++ b/emhttp/plugins/dynamix/ArrayOperation.page @@ -348,8 +348,33 @@ function shutdown_now(form, cmd) { $(form).append(''); switch (cmd) { - case 'reboot': var text = "_(This will reboot the system)_"; break; - case 'shutdown': var text = "_(This will shutdown the system)_"; break; + case 'reboot': + if ($('input[name="safemode"]').prop('checked')) { + $value) { + if (stripos($key, 'tailscale') !== false && $value == $_SERVER['HTTP_HOST']) { + $tailscaleUI = true; + break; + } + } + ?> + var text = "_(This will reboot the system in safe mode)_\n\n"; + var text = text.concat("_(No plugins will be loaded in safe mode.)_"); + + var text = text.concat(" _(If you use Tailscale to access the GUI or services of the server, this access will be lost.)_"); + + var text = text.concat("\n\n_(You are currently accessing the GUI of the server via Tailscale.)_"); + + + } else { + var text = "_(This will reboot the system)_"; + } + break; + case 'shutdown': + var text = "_(This will shutdown the system)_"; + break; } swal({ title:"_(Proceed)_?", diff --git a/emhttp/plugins/dynamix/styles/default-base.css b/emhttp/plugins/dynamix/styles/default-base.css index 164202fdc..19d6a6a7e 100755 --- a/emhttp/plugins/dynamix/styles/default-base.css +++ b/emhttp/plugins/dynamix/styles/default-base.css @@ -1902,6 +1902,10 @@ span#wlan0 { position: relative; } +.font-bold { + font-weight: bold; +} + .font-mono { font-family: bitstream, monospace; }