feat: hide window on macos

This commit is contained in:
GyDi authored and GitHub committed 2022-09-09 16:42:35 +08:00
1 parent ddd60aa1ff
commit c07cbf9dbb
4 files changed
+64 -14

No files matched your search

+4 -1
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 () => {