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
2 Commits
ee19749009
...
e176f6db14
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e176f6db14 | ||
|
|
68dd3fd01a |
@ -113,7 +113,7 @@ export async function startCore(detached = false): Promise<Promise<void>[]> {
|
|||||||
corePath,
|
corePath,
|
||||||
['-d', diffWorkDir ? mihomoProfileWorkDir(current) : mihomoWorkDir(), ctlParam, mihomoIpcPath],
|
['-d', diffWorkDir ? mihomoProfileWorkDir(current) : mihomoWorkDir(), ctlParam, mihomoIpcPath],
|
||||||
{
|
{
|
||||||
detached: detached,
|
detached: true,
|
||||||
stdio: detached ? 'ignore' : undefined,
|
stdio: detached ? 'ignore' : undefined,
|
||||||
env: env
|
env: env
|
||||||
}
|
}
|
||||||
@ -218,7 +218,7 @@ export async function restartCore(): Promise<void> {
|
|||||||
|
|
||||||
export async function keepCoreAlive(): Promise<void> {
|
export async function keepCoreAlive(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
await startCore(true)
|
if (!child) await startCore(true)
|
||||||
if (child && child.pid) {
|
if (child && child.pid) {
|
||||||
await writeFile(path.join(dataDir(), 'core.pid'), child.pid.toString())
|
await writeFile(path.join(dataDir(), 'core.pid'), child.pid.toString())
|
||||||
}
|
}
|
||||||
|
|||||||
@ -234,7 +234,7 @@ const Profiles: React.FC = () => {
|
|||||||
endContent={
|
endContent={
|
||||||
<>
|
<>
|
||||||
<Button
|
<Button
|
||||||
size="sm"
|
size="md"
|
||||||
isIconOnly
|
isIconOnly
|
||||||
variant="light"
|
variant="light"
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
@ -242,6 +242,7 @@ const Profiles: React.FC = () => {
|
|||||||
setUrl(text)
|
setUrl(text)
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
|
className="mr-2"
|
||||||
>
|
>
|
||||||
<MdContentPaste className="text-lg" />
|
<MdContentPaste className="text-lg" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user