From 8ee6a4a5171af145deba4a6a1a2446c723ff56d4 Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Sat, 6 Mar 2021 15:50:12 +0300 Subject: fixed pikvm/pikvm#223: confirm stream window closing --- web/kvm/index.html | 6 +++--- web/kvm/window-stream.pug | 5 ++++- web/kvm/windows.pug | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'web/kvm') diff --git a/web/kvm/index.html b/web/kvm/index.html index 63e511e7..8e71e029 100644 --- a/web/kvm/index.html +++ b/web/kvm/index.html @@ -472,7 +472,7 @@ -
+
Stream
@@ -501,7 +501,7 @@
-
+
Virtual Keyboard
@@ -1345,7 +1345,7 @@
-
+
About
diff --git a/web/kvm/window-stream.pug b/web/kvm/window-stream.pug index f3493c39..84f1d4dc 100644 --- a/web/kvm/window-stream.pug +++ b/web/kvm/window-stream.pug @@ -1,4 +1,7 @@ -+window("stream-window", "Stream", true) +- let confirm_msg = "Do you want to close the stream? This action will temporarily stop
"; +- confirm_msg += "the video transmission until you open the broadcast again.
"; +- confirm_msg += "This can be useful for saving traffic."; ++window("stream-window", "Stream", true, confirm_msg) div(id="stream-info") div(id="stream-box" class="stream-box-inactive") img(id="stream-image" class="stream-image-inactive" src=`${png_dir}/blank-stream.png`) diff --git a/web/kvm/windows.pug b/web/kvm/windows.pug index 15fdf131..d735b65d 100644 --- a/web/kvm/windows.pug +++ b/web/kvm/windows.pug @@ -1,5 +1,5 @@ -mixin window(id, title, with_header_id=false) - div(id=id class="window") +mixin window(id, title, with_header_id=false, close_confirm_msg="") + div(id=id class="window" data-close-confirm=close_confirm_msg) div(id=(with_header_id ? `${id}-header` : "") class="window-header") div(class="window-grab") #{title} button(class="window-button-close") × -- cgit v1.2.3