fixed pikvm/pikvm#223: confirm stream window closing

This commit is contained in:
Devaev Maxim
2021-03-06 15:50:12 +03:00
parent ec0f985109
commit 8ee6a4a517
4 changed files with 24 additions and 9 deletions

View File

@@ -472,7 +472,7 @@
</div>
</li>
</ul>
<div class="window" id="stream-window">
<div class="window" id="stream-window" data-close-confirm="Do you want to close the stream? This action will temporarily stop&lt;br&gt;the video transmission until you open the broadcast again.&lt;br&gt;This can be useful for saving traffic.">
<div class="window-header" id="stream-window-header">
<div class="window-grab">Stream</div>
<button class="window-button-close">&times;</button>
@@ -501,7 +501,7 @@
</div>
</div>
</div>
<div class="window" id="keyboard-window">
<div class="window" id="keyboard-window" data-close-confirm="">
<div class="window-header" id="keyboard-window-header">
<div class="window-grab">Virtual Keyboard</div>
<button class="window-button-close">&times;</button>
@@ -1345,7 +1345,7 @@
</div>
</div>
</div>
<div class="window" id="about-window">
<div class="window" id="about-window" data-close-confirm="">
<div class="window-header" id="">
<div class="window-grab">About</div>
<button class="window-button-close">&times;</button>

View File

@@ -1,4 +1,7 @@
+window("stream-window", "Stream", true)
- let confirm_msg = "Do you want to close the stream? This action will temporarily stop<br>";
- confirm_msg += "the video transmission until you open the broadcast again.<br>";
- 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`)

View File

@@ -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") &times;