mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 21:20:29 +08:00
fix url scheme
This commit is contained in:
parent
d2d4976b86
commit
0c566bdeb5
@ -130,6 +130,7 @@ async function handleDeepLink(url: string): Promise<void> {
|
|||||||
name: profileName ?? undefined,
|
name: profileName ?? undefined,
|
||||||
url: profileUrl
|
url: profileUrl
|
||||||
})
|
})
|
||||||
|
mainWindow?.webContents.send('profileConfigUpdated')
|
||||||
new Notification({ title: '订阅导入成功' }).show()
|
new Notification({ title: '订阅导入成功' }).show()
|
||||||
break
|
break
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@ -76,6 +76,15 @@ export const ProfileConfigProvider: React.FC<{ children: ReactNode }> = ({ child
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
window.electron.ipcRenderer.on('profileConfigUpdated', () => {
|
||||||
|
mutateProfileConfig()
|
||||||
|
})
|
||||||
|
return (): void => {
|
||||||
|
window.electron.ipcRenderer.removeAllListeners('profileConfigUpdated')
|
||||||
|
}
|
||||||
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ProfileConfigContext.Provider
|
<ProfileConfigContext.Provider
|
||||||
value={{
|
value={{
|
||||||
|
|||||||
@ -36,6 +36,7 @@ const Profiles: React.FC = () => {
|
|||||||
const handleImport = async (): Promise<void> => {
|
const handleImport = async (): Promise<void> => {
|
||||||
setImporting(true)
|
setImporting(true)
|
||||||
await addProfileItem({ name: '', type: 'remote', url, useProxy })
|
await addProfileItem({ name: '', type: 'remote', url, useProxy })
|
||||||
|
setUrl('')
|
||||||
setImporting(false)
|
setImporting(false)
|
||||||
}
|
}
|
||||||
const pageRef = useRef<HTMLDivElement>(null)
|
const pageRef = useRef<HTMLDivElement>(null)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user