mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Support siyuan:// protocol on macOS https://github.com/siyuan-note/siyuan/issues/12271
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
9366b0f073
commit
59950dde41
3 changed files with 9 additions and 4 deletions
|
|
@ -22,6 +22,10 @@ mac:
|
||||||
- NSMicrophoneUsageDescription: "This app requires microphone access to record audio."
|
- NSMicrophoneUsageDescription: "This app requires microphone access to record audio."
|
||||||
entitlementsInherit: "../../entitlements.mas.plist"
|
entitlementsInherit: "../../entitlements.mas.plist"
|
||||||
minimumSystemVersion: "10.15"
|
minimumSystemVersion: "10.15"
|
||||||
|
protocols:
|
||||||
|
- name: "SiYuan"
|
||||||
|
schemes:
|
||||||
|
- "siyuan"
|
||||||
extraResources:
|
extraResources:
|
||||||
- from: "kernel-darwin-arm64"
|
- from: "kernel-darwin-arm64"
|
||||||
to: "kernel"
|
to: "kernel"
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,10 @@ mac:
|
||||||
- NSMicrophoneUsageDescription: "This app requires microphone access to record audio."
|
- NSMicrophoneUsageDescription: "This app requires microphone access to record audio."
|
||||||
entitlementsInherit: "../../entitlements.mas.plist"
|
entitlementsInherit: "../../entitlements.mas.plist"
|
||||||
minimumSystemVersion: "10.15"
|
minimumSystemVersion: "10.15"
|
||||||
|
protocols:
|
||||||
|
- name: "SiYuan"
|
||||||
|
schemes:
|
||||||
|
- "siyuan"
|
||||||
extraResources:
|
extraResources:
|
||||||
- from: "kernel-darwin"
|
- from: "kernel-darwin"
|
||||||
to: "kernel"
|
to: "kernel"
|
||||||
|
|
|
||||||
|
|
@ -387,10 +387,7 @@ const initMainWindow = () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
currentWindow.webContents.on("did-finish-load", () => {
|
currentWindow.webContents.on("did-finish-load", () => {
|
||||||
let siyuanOpenURL;
|
let siyuanOpenURL = process.argv.find((arg) => arg.startsWith("siyuan://"));
|
||||||
if ("win32" === process.platform || "linux" === process.platform) {
|
|
||||||
siyuanOpenURL = process.argv.find((arg) => arg.startsWith("siyuan://"));
|
|
||||||
}
|
|
||||||
if (siyuanOpenURL) {
|
if (siyuanOpenURL) {
|
||||||
if (currentWindow.isMinimized()) {
|
if (currentWindow.isMinimized()) {
|
||||||
currentWindow.restore();
|
currentWindow.restore();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue