mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 21:20:29 +08:00
Compare commits
No commits in common. "3670f23a1cbf039bb1f0cb6795f5e27c443cdce1" and "fb33f3765204d0c1d882aac0cede5b930f105bed" have entirely different histories.
3670f23a1c
...
fb33f37652
@ -68,20 +68,26 @@ async function fixUserDataPermissions(): Promise<void> {
|
|||||||
let quitTimeout: NodeJS.Timeout | null = null
|
let quitTimeout: NodeJS.Timeout | null = null
|
||||||
export let mainWindow: BrowserWindow | null = null
|
export let mainWindow: BrowserWindow | null = null
|
||||||
|
|
||||||
const gotTheLock = app.requestSingleInstanceLock()
|
|
||||||
|
|
||||||
if (!gotTheLock) {
|
|
||||||
app.quit()
|
|
||||||
}
|
|
||||||
|
|
||||||
async function initApp(): Promise<void> {
|
async function initApp(): Promise<void> {
|
||||||
await fixUserDataPermissions()
|
await fixUserDataPermissions()
|
||||||
}
|
}
|
||||||
|
|
||||||
initApp()
|
initApp()
|
||||||
.catch((e) => {
|
.then(() => {
|
||||||
showSafeErrorBox('common.error.initFailed', `${e}`)
|
const gotTheLock = app.requestSingleInstanceLock()
|
||||||
|
|
||||||
|
if (!gotTheLock) {
|
||||||
app.quit()
|
app.quit()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
// ignore permission fix errors
|
||||||
|
const gotTheLock = app.requestSingleInstanceLock()
|
||||||
|
|
||||||
|
if (!gotTheLock) {
|
||||||
|
app.quit()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
export function customRelaunch(): void {
|
export function customRelaunch(): void {
|
||||||
|
|||||||
@ -695,9 +695,7 @@ const Mihomo: React.FC = () => {
|
|||||||
max={65535}
|
max={65535}
|
||||||
min={0}
|
min={0}
|
||||||
onValueChange={(v) => {
|
onValueChange={(v) => {
|
||||||
const port = parseInt(v)
|
patchAppConfig({ showMixedPort: parseInt(v) })
|
||||||
setMixedPortInput(port)
|
|
||||||
patchAppConfig({ showMixedPort: port })
|
|
||||||
setIsManualPortChange(true)
|
setIsManualPortChange(true)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user