mirror of
https://github.com/CrazyJasonwell/clash-verge-rev.git
synced 2026-10-19 17:25:41 +08:00
feat: press esc hide the window
This commit is contained in:
1 parent
6ebf333982
commit
f9efa3bf8f
1 file changed
+6
@@ -64,6 +64,12 @@ const Layout = () => {
|
||||
});
|
||||
const [dialogOpen, setDialogOpen] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
window.addEventListener("keydown", (e) => {
|
||||
if (e.key === "Escape") windowHide();
|
||||
});
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (!vergeConfig) return;
|
||||
setBlur(!!vergeConfig.theme_blur);
|
||||
|
||||
Reference in new issue
Block a user