fix: remove white border in floating window on some systems

This commit is contained in:
ezequielnick 2025-08-08 18:03:21 +08:00
parent 8cfee2f5e5
commit 436ef9a030
3 changed files with 32 additions and 4 deletions

View File

@ -323,6 +323,26 @@ const resolveSysproxy = () =>
downloadURL: `https://github.com/mihomo-party-org/sysproxy/releases/download/${arch}/sysproxy.exe`
})
const resolveMonitor = async () => {
const tempDir = path.join(TEMP_DIR, 'TrafficMonitor')
const tempZip = path.join(tempDir, `${arch}.zip`)
if (!fs.existsSync(tempDir)) {
fs.mkdirSync(tempDir, { recursive: true })
}
await downloadFile(
`https://github.com/mihomo-party-org/mihomo-party-run/releases/download/monitor/${arch}.zip`,
tempZip
)
const zip = new AdmZip(tempZip)
const resDir = path.join(cwd, 'extra', 'files')
const targetPath = path.join(resDir, 'TrafficMonitor')
if (fs.existsSync(targetPath)) {
fs.rmSync(targetPath, { recursive: true })
}
zip.extractAllTo(targetPath, true)
console.log(`[INFO]: TrafficMonitor finished`)
}
const resolve7zip = () =>
resolveResource({
@ -413,7 +433,12 @@ const tasks = [
retry: 5,
winOnly: true
},
{
name: 'monitor',
func: resolveMonitor,
retry: 5,
winOnly: true
},
{
name: 'substore',
func: resolveSubstore,

View File

@ -28,6 +28,7 @@ async function createFloatingWindow(): Promise<void> {
maximizable: false,
fullscreenable: false,
closable: false,
backgroundColor: '#00000000',
webPreferences: {
preload: join(__dirname, '../preload/index.js'),
spellcheck: false,

View File

@ -12,9 +12,11 @@
BlinkMacSystemFont;
}
html {
background: none !important;
background-color: transparent !important;
html,
body {
background: transparent !important;
margin: 0;
padding: 0;
}
.app-nodrag {