mirror of
https://github.com/pompurin404/mihomo-party.git
synced 2024-11-16 03:32:17 +08:00
fix linux relaunch sandbox
Some checks are pending
Build / windows (arm64) (push) Waiting to run
Build / windows (ia32) (push) Waiting to run
Build / windows (x64) (push) Waiting to run
Build / windows7 (ia32) (push) Waiting to run
Build / windows7 (x64) (push) Waiting to run
Build / linux (arm64) (push) Waiting to run
Build / linux (x64) (push) Waiting to run
Build / macos (arm64) (push) Waiting to run
Build / macos (x64) (push) Waiting to run
Build / updater (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-bin) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-electron) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-electron-bin) (push) Blocked by required conditions
Build / aur-git-updater (push) Waiting to run
Build / Update WinGet Package (push) Blocked by required conditions
Build / Update Homebrew cask (push) Blocked by required conditions
Some checks are pending
Build / windows (arm64) (push) Waiting to run
Build / windows (ia32) (push) Waiting to run
Build / windows (x64) (push) Waiting to run
Build / windows7 (ia32) (push) Waiting to run
Build / windows7 (x64) (push) Waiting to run
Build / linux (arm64) (push) Waiting to run
Build / linux (x64) (push) Waiting to run
Build / macos (arm64) (push) Waiting to run
Build / macos (x64) (push) Waiting to run
Build / updater (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-bin) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-electron) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-electron-bin) (push) Blocked by required conditions
Build / aur-git-updater (push) Waiting to run
Build / Update WinGet Package (push) Blocked by required conditions
Build / Update Homebrew cask (push) Blocked by required conditions
This commit is contained in:
parent
b026c5ef56
commit
0b66995b51
16
changelog.md
16
changelog.md
|
@ -1,14 +1,6 @@
|
||||||
### Breaking Changes
|
|
||||||
|
|
||||||
- 为了修复macOS应用内更新问题,此版本需要手动下载dmg进行安装
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
- 支持自定义延迟测试并发数量
|
|
||||||
- 完善Sub-Store环境变量
|
|
||||||
- 支持查看已关闭的连接
|
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
- 修复macOS应用内更新后权限丢失的问题
|
- 修复便携版无法自动更新的问题
|
||||||
- 修复高版本macOS SSID获取失败的问题
|
- gif图标缓存后无法播放的问题
|
||||||
|
- 修复Linux重启应用进入沙盒环境的问题
|
||||||
|
- 修复已关闭连接信息过时的问题
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { createTray } from './resolve/tray'
|
||||||
import { init } from './utils/init'
|
import { init } from './utils/init'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
import { initShortcut } from './resolve/shortcut'
|
import { initShortcut } from './resolve/shortcut'
|
||||||
import { execSync } from 'child_process'
|
import { execSync, spawn } from 'child_process'
|
||||||
import { createElevateTask } from './sys/misc'
|
import { createElevateTask } from './sys/misc'
|
||||||
import { initProfileUpdater } from './core/profileUpdater'
|
import { initProfileUpdater } from './core/profileUpdater'
|
||||||
import { existsSync, writeFileSync } from 'fs'
|
import { existsSync, writeFileSync } from 'fs'
|
||||||
|
@ -48,6 +48,24 @@ if (!gotTheLock) {
|
||||||
app.quit()
|
app.quit()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function customRelaunch(): void {
|
||||||
|
const script = `while kill -0 ${process.pid} 2>/dev/null; do
|
||||||
|
sleep 0.1
|
||||||
|
done
|
||||||
|
${process.argv.join(' ')} & disown
|
||||||
|
exit
|
||||||
|
`
|
||||||
|
spawn('sh', ['-c', `"${script}"`], {
|
||||||
|
shell: true,
|
||||||
|
detached: true,
|
||||||
|
stdio: 'ignore'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (process.platform === 'linux') {
|
||||||
|
app.relaunch = customRelaunch
|
||||||
|
}
|
||||||
|
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
// https://github.com/electron/electron/issues/43278
|
// https://github.com/electron/electron/issues/43278
|
||||||
// https://github.com/electron/electron/issues/36698
|
// https://github.com/electron/electron/issues/36698
|
||||||
|
|
|
@ -35,7 +35,12 @@ const ConnectionItem: React.FC<Props> = (props) => {
|
||||||
<div className="w-full flex justify-between">
|
<div className="w-full flex justify-between">
|
||||||
<div className="w-[calc(100%-48px)]">
|
<div className="w-[calc(100%-48px)]">
|
||||||
<CardHeader className="pb-0 gap-1">
|
<CardHeader className="pb-0 gap-1">
|
||||||
<Chip color={`${info.isActive ? "primary": "danger"}`} size="sm" radius="sm" variant="dot">
|
<Chip
|
||||||
|
color={`${info.isActive ? 'primary' : 'danger'}`}
|
||||||
|
size="sm"
|
||||||
|
radius="sm"
|
||||||
|
variant="dot"
|
||||||
|
>
|
||||||
{info.metadata.type}({info.metadata.network.toUpperCase()})
|
{info.metadata.type}({info.metadata.network.toUpperCase()})
|
||||||
</Chip>
|
</Chip>
|
||||||
<div className="text-ellipsis whitespace-nowrap overflow-hidden">
|
<div className="text-ellipsis whitespace-nowrap overflow-hidden">
|
||||||
|
@ -76,7 +81,7 @@ const ConnectionItem: React.FC<Props> = (props) => {
|
||||||
</CardFooter>
|
</CardFooter>
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
color={`${info.isActive ? "warning" : "danger"}`}
|
color={`${info.isActive ? 'warning' : 'danger'}`}
|
||||||
variant="light"
|
variant="light"
|
||||||
isIconOnly
|
isIconOnly
|
||||||
className="mr-2 my-auto"
|
className="mr-2 my-auto"
|
||||||
|
@ -84,7 +89,7 @@ const ConnectionItem: React.FC<Props> = (props) => {
|
||||||
close(info.id)
|
close(info.id)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{info.isActive ? (<CgClose className="text-lg"/>) : (<CgTrash className="text-lg"/>)}
|
{info.isActive ? <CgClose className="text-lg" /> : <CgTrash className="text-lg" />}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user