summaryrefslogtreecommitdiff
path: root/web/share/js
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-09-11 07:00:56 +0300
committerDevaev Maxim <[email protected]>2020-09-11 07:00:56 +0300
commit9b3f1975061fa6b4c7ac1b15125b71f2e93d90c4 (patch)
tree7ceb4b99f4a0b81da72b0bbf8741de2fec6155e1 /web/share/js
parent401263fea3f645eb421b5ccb3e79418afab7c9a6 (diff)
pikvm/pikvm#63: added loop mode for macro
Diffstat (limited to 'web/share/js')
-rw-r--r--web/share/js/kvm/recorder.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/web/share/js/kvm/recorder.js b/web/share/js/kvm/recorder.js
index 02f927d7..45be88d3 100644
--- a/web/share/js/kvm/recorder.js
+++ b/web/share/js/kvm/recorder.js
@@ -222,7 +222,11 @@ export function Recorder() {
}
index += 1;
}
- __stopProcess();
+ if ($("hid-recorder-loop-checkbox").checked) {
+ setTimeout(() => __runEvents(0));
+ } else {
+ __stopProcess();
+ }
};
var __refresh = function() {
@@ -241,6 +245,8 @@ export function Recorder() {
wm.switchEnabled($("hid-recorder-stop"), (__ws && (__play_timer || __recording)));
wm.switchEnabled($("hid-recorder-play"), (__ws && !__recording && __events.length));
wm.switchEnabled($("hid-recorder-clear"), (!__play_timer && !__recording && __events.length));
+ wm.switchEnabled($("hid-recorder-loop-checkbox"), (__ws && !__recording));
+
wm.switchEnabled($("hid-recorder-upload"), (!__play_timer && !__recording));
wm.switchEnabled($("hid-recorder-download"), (!__play_timer && !__recording && __events.length));