summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2021-04-17 11:24:16 +0300
committerDevaev Maxim <[email protected]>2021-04-17 11:24:16 +0300
commita73295e221c0e963cee2213819c843ee1fed37ca (patch)
treee6daa037a1106e622bfd3cbbb1a6174ea79c9d01
parentcacb12791b1d914111f566dcc2f992b34e744d10 (diff)
removed stream close confirm, added tip for msd
-rw-r--r--web/kvm/index.html12
-rw-r--r--web/kvm/navbar-msd.pug7
-rw-r--r--web/kvm/window-stream.pug6
-rw-r--r--web/share/js/wm.js16
4 files changed, 21 insertions, 20 deletions
diff --git a/web/kvm/index.html b/web/kvm/index.html
index 730c5b4a..ad56d43a 100644
--- a/web/kvm/index.html
+++ b/web/kvm/index.html
@@ -362,6 +362,16 @@
<div class="progress" id="msd-uploading-progress"><span class="progress-value" id="msd-uploading-progress-value"></span></div>
</div>
<hr>
+ <table class="kv">
+ <tr>
+ <td class="value">Tip:</td>
+ <td>To speed up uploading, close the Stream window.</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>This will save network bandwidth.</td>
+ </tr>
+ </table>
</div>
<div class="buttons buttons-row">
<button class="row50" disabled id="msd-connect-button">Connect drive to Server</button>
@@ -489,7 +499,7 @@
</div>
</li>
</ul>
- <div class="window window-resizable" 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." data-show-by-button="show-stream-button">
+ <div class="window window-resizable" id="stream-window" data-show-by-button="show-stream-button">
<div class="window-header" id="stream-window-header">
<div class="window-grab">Stream</div>
<button class="window-button-close">&times;</button>
diff --git a/web/kvm/navbar-msd.pug b/web/kvm/navbar-msd.pug
index ba4347b2..a12ee247 100644
--- a/web/kvm/navbar-msd.pug
+++ b/web/kvm/navbar-msd.pug
@@ -78,6 +78,13 @@ li(id="msd-dropdown" class="right feature-disabled")
div(id="msd-uploading-progress" class="progress")
span(id="msd-uploading-progress-value" class="progress-value")
hr
+ table(class="kv")
+ tr
+ td(class="value") Tip:
+ td To speed up uploading, close the Stream window.
+ tr
+ td
+ td This will save network bandwidth.
div(class="buttons buttons-row")
button(disabled id="msd-connect-button" class="row50") Connect drive to Server
button(disabled id="msd-disconnect-button" class="row25") Disconnect
diff --git a/web/kvm/window-stream.pug b/web/kvm/window-stream.pug
index dc083600..1b45571e 100644
--- a/web/kvm/window-stream.pug
+++ b/web/kvm/window-stream.pug
@@ -1,8 +1,4 @@
-- 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.";
-
-div(id="stream-window" class="window window-resizable" data-close-confirm=confirm_msg data-show-by-button="show-stream-button")
+div(id="stream-window" class="window window-resizable" data-show-by-button="show-stream-button")
div(id="stream-window-header" class="window-header")
div(class="window-grab") Stream
button(class="window-button-close") &times;
diff --git a/web/share/js/wm.js b/web/share/js/wm.js
index 4296800c..c6fe040a 100644
--- a/web/share/js/wm.js
+++ b/web/share/js/wm.js
@@ -89,20 +89,8 @@ function __WindowManager() {
let el_close_button = el_window.querySelector(".window-header .window-button-close");
if (el_close_button) {
tools.setOnClick(el_close_button, function() {
- let close_window = function() {
- __closeWindow(el_window);
- __activateLastWindow(el_window);
- };
- let confirm_msg = el_window.getAttribute("data-close-confirm");
- if (confirm_msg) {
- self.confirm(confirm_msg).then(function(ok) {
- if (ok) {
- close_window();
- }
- });
- } else {
- close_window();
- }
+ __closeWindow(el_window);
+ __activateLastWindow(el_window);
});
}