mirror of
https://github.com/marcoallegretti/WEFT_OS.git
synced 2026-03-27 01:13:09 +00:00
feat(shell): close launcher on Escape key and click-outside
This commit is contained in:
parent
e5ec05ce2c
commit
a3a826058e
1 changed files with 12 additions and 0 deletions
|
|
@ -197,6 +197,18 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
document.addEventListener('keydown', function (e) {
|
||||||
|
if (e.key === 'Escape') {
|
||||||
|
document.getElementById('launcher').setAttribute('hidden', '');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
document.getElementById('launcher').addEventListener('click', function (e) {
|
||||||
|
if (e.target === this) {
|
||||||
|
this.setAttribute('hidden', '');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var APPD_WS_PORT = window.WEFT_APPD_WS_PORT || 7410;
|
var APPD_WS_PORT = window.WEFT_APPD_WS_PORT || 7410;
|
||||||
var ws = null;
|
var ws = null;
|
||||||
var wsReconnectDelay = 1000;
|
var wsReconnectDelay = 1000;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue