mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-28 05:30:29 +08:00
fix: remove white border in floating window on some systems
This commit is contained in:
parent
8cfee2f5e5
commit
436ef9a030
@ -323,6 +323,26 @@ const resolveSysproxy = () =>
|
|||||||
downloadURL: `https://github.com/mihomo-party-org/sysproxy/releases/download/${arch}/sysproxy.exe`
|
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 = () =>
|
const resolve7zip = () =>
|
||||||
resolveResource({
|
resolveResource({
|
||||||
@ -413,7 +433,12 @@ const tasks = [
|
|||||||
retry: 5,
|
retry: 5,
|
||||||
winOnly: true
|
winOnly: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'monitor',
|
||||||
|
func: resolveMonitor,
|
||||||
|
retry: 5,
|
||||||
|
winOnly: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'substore',
|
name: 'substore',
|
||||||
func: resolveSubstore,
|
func: resolveSubstore,
|
||||||
|
|||||||
@ -28,6 +28,7 @@ async function createFloatingWindow(): Promise<void> {
|
|||||||
maximizable: false,
|
maximizable: false,
|
||||||
fullscreenable: false,
|
fullscreenable: false,
|
||||||
closable: false,
|
closable: false,
|
||||||
|
backgroundColor: '#00000000',
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
preload: join(__dirname, '../preload/index.js'),
|
preload: join(__dirname, '../preload/index.js'),
|
||||||
spellcheck: false,
|
spellcheck: false,
|
||||||
|
|||||||
@ -12,9 +12,11 @@
|
|||||||
BlinkMacSystemFont;
|
BlinkMacSystemFont;
|
||||||
}
|
}
|
||||||
|
|
||||||
html {
|
html,
|
||||||
background: none !important;
|
body {
|
||||||
background-color: transparent !important;
|
background: transparent !important;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-nodrag {
|
.app-nodrag {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user