mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
feat(sync): add logseq protocol
This commit is contained in:
@@ -4,6 +4,13 @@ module.exports = {
|
||||
packagerConfig: {
|
||||
name: 'Logseq',
|
||||
icon: './icons/logseq_big_sur.icns',
|
||||
protocols: [
|
||||
{
|
||||
"protocol":"logseq",
|
||||
"name":"logseq",
|
||||
"schemes":"logseq"
|
||||
}
|
||||
],
|
||||
osxSign: {
|
||||
identity: 'Developer ID Application: Tiansheng Qin',
|
||||
'hardened-runtime': true,
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
[electron.exceptions :as exceptions]
|
||||
["/electron/utils" :as utils]))
|
||||
|
||||
(defonce LSP_SCHEME "lsp")
|
||||
(defonce LSP_SCHEME "logseq")
|
||||
(defonce LSP_PROTOCOL (str LSP_SCHEME "://"))
|
||||
(defonce PLUGIN_URL (str LSP_PROTOCOL "logseq.io/"))
|
||||
(defonce STATIC_URL (str LSP_PROTOCOL "logseq.com/"))
|
||||
@@ -38,7 +38,7 @@
|
||||
:logger logger
|
||||
:win win})))
|
||||
|
||||
(defn setup-interceptor! []
|
||||
(defn setup-interceptor! [win]
|
||||
(.registerFileProtocol
|
||||
protocol "assets"
|
||||
(fn [^js request callback]
|
||||
@@ -62,6 +62,12 @@
|
||||
|
||||
(callback #js {:path path'}))))
|
||||
|
||||
(.registerHttpProtocol
|
||||
protocol LSP_SCHEME
|
||||
(fn [^js request callback]
|
||||
;; placeholder
|
||||
(.loadURL MAIN_WINDOW_ENTRY)))
|
||||
|
||||
#(do
|
||||
(.unregisterProtocol protocol LSP_SCHEME)
|
||||
(.unregisterProtocol protocol "assets")))
|
||||
|
||||
Reference in New Issue
Block a user