Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: custom schema support #516

Merged
merged 4 commits into from
Feb 29, 2024
Merged

feat: custom schema support #516

merged 4 commits into from
Feb 29, 2024

Conversation

4o3F
Copy link
Collaborator

@4o3F 4o3F commented Feb 29, 2024

Close #118

backend/tauri/Info.plist Outdated Show resolved Hide resolved
<dict>
<key>CFBundleURLName</key>
<!-- Obviously needs to be replaced with your app's bundle identifier -->
<string>moe.elaina.clash.nyanpasu</string>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个其实可以更改为:Clash Nyanpasu

@@ -87,6 +88,14 @@ export default function Layout() {
mutate("getProviders");
});

listen("scheme-request-received", (req) => {
Copy link
Collaborator

@greenhat616 greenhat616 Feb 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里做一个 URL 匹配会不会更好?使用一个 URL 对象初始化。然后根据 path 部分触发对应的行为,未定义行为可以触发个 dialog 或者是 notification 提示无定义行为。
譬如 clash-nyanpasu://subscribe-remote-profile?url=xxx,预留其他 path,以待未来扩展

@4o3F
Copy link
Collaborator Author

4o3F commented Feb 29, 2024

Fixed in commit 1483758

@greenhat616 greenhat616 merged commit 24617aa into libnyanpasu:main Feb 29, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

支持快速导入订阅
2 participants