feat: press esc hide the window
This commit is contained in:
parent
4e8d4f4591
commit
4979a472de
@ -64,6 +64,12 @@ const Layout = () => {
|
|||||||
});
|
});
|
||||||
const [dialogOpen, setDialogOpen] = useState(false);
|
const [dialogOpen, setDialogOpen] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
window.addEventListener("keydown", (e) => {
|
||||||
|
if (e.key === "Escape") windowHide();
|
||||||
|
});
|
||||||
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!vergeConfig) return;
|
if (!vergeConfig) return;
|
||||||
setBlur(!!vergeConfig.theme_blur);
|
setBlur(!!vergeConfig.theme_blur);
|
||||||
|
Loading…
Reference in New Issue
Block a user