mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 13:10:30 +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`
|
||||
})
|
||||
|
||||
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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -12,9 +12,11 @@
|
||||
BlinkMacSystemFont;
|
||||
}
|
||||
|
||||
html {
|
||||
background: none !important;
|
||||
background-color: transparent !important;
|
||||
html,
|
||||
body {
|
||||
background: transparent !important;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.app-nodrag {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user