feat: hide window on macos

This commit is contained in:
GyDi
2022-09-09 16:42:35 +08:00
committed by GitHub
Unverified
parent ddd60aa1ff
commit c07cbf9dbb
4 changed files with 64 additions and 14 deletions

View File

@@ -43,7 +43,10 @@ const Layout = () => {
useEffect(() => {
window.addEventListener("keydown", (e) => {
if (e.key === "Escape") appWindow.close();
if (e.key === "Escape") {
if (OS === "macos") appWindow.hide();
else appWindow.close();
}
});
listen("verge://refresh-clash-config", async () => {