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