mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-28 05:30: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,
|
||||
url: profileUrl
|
||||
})
|
||||
mainWindow?.webContents.send('profileConfigUpdated')
|
||||
new Notification({ title: '订阅导入成功' }).show()
|
||||
break
|
||||
} 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 (
|
||||
<ProfileConfigContext.Provider
|
||||
value={{
|
||||
|
||||
@ -36,6 +36,7 @@ const Profiles: React.FC = () => {
|
||||
const handleImport = async (): Promise<void> => {
|
||||
setImporting(true)
|
||||
await addProfileItem({ name: '', type: 'remote', url, useProxy })
|
||||
setUrl('')
|
||||
setImporting(false)
|
||||
}
|
||||
const pageRef = useRef<HTMLDivElement>(null)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user