Skip to content

Commit 562f860

Browse files
committed
fix: app-drag not work in windows
1 parent 3ffbbaa commit 562f860

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

electron/main/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ async function createWindow() {
5555
minHeight: 600,
5656
width: 1200,
5757
height: 800,
58+
// maxWidth: 1200,
59+
// maxHeight: 800,
5860
backgroundColor: "transparent",
61+
resizable: false,
5962
// transparent: true,
6063
// useContentSize: true,
6164
title: process.platform == "darwin" ? undefined : "VoceChat",
@@ -72,6 +75,10 @@ async function createWindow() {
7275
contextIsolation: false
7376
}
7477
});
78+
// workaround https://github.com/electron/electron/issues/30788
79+
setTimeout(() => {
80+
win.setResizable(true);
81+
}, 5000);
7582
win.on("close", (e) => {
7683
console.log("event:close", e);
7784
if (!triggerByQuit) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vocechat-desktop",
3-
"version": "0.7.9",
3+
"version": "0.7.10",
44
"main": "dist-electron/main/index.js",
55
"description": "vocechat desktop version",
66
"author": "Tristan <yanggc888@163.com>",

src/components/layout.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { MouseEvent, useEffect, useRef, useState } from "react";
1+
import { MouseEvent, useEffect, useState } from "react";
22
import { useDispatch } from "react-redux";
33
import clsx from "clsx";
44
import { motion } from "framer-motion";
@@ -7,8 +7,6 @@ import { useAppSelector } from "@/app/store";
77
import { ReactComponent as IconAdd } from "@/assets/icons/add.svg";
88
// import { ReactComponent as IconDrag } from "@/assets/icons/drag.svg";
99
import { ReactComponent as IconRefresh } from "@/assets/icons/refresh.svg";
10-
import { ReactComponent as IconLeft } from "@/assets/icons/arrow.left.svg";
11-
import { ReactComponent as IconRight } from "@/assets/icons/arrow.right.svg";
1210
// import { isDarkMode } from "@/utils";
1311
import ServerTip from "./server-tip";
1412
import AddServerModal from "./modal-add-server";
@@ -209,7 +207,9 @@ const Layout = () => {
209207
{contextMenuVisible ? (
210208
<div className="menu-mask fixed left-0 top-0 z-10 h-full w-full"></div>
211209
) : (
212-
<div className="app-drag fixed left-0 top-0 z-50 h-6 w-full"></div>
210+
process.platform == "darwin" && (
211+
<div className="app-drag fixed left-0 top-0 z-50 h-6 w-full"></div>
212+
)
213213
)}
214214
</section>
215215
{!!removeServer && (

0 commit comments

Comments
 (0)