mirror of https://github.com/logseq/logseq
parent
b92d01d5d5
commit
a6d9cd8b91
|
@ -6,6 +6,7 @@
|
||||||
["buffer" :as buffer]
|
["buffer" :as buffer]
|
||||||
["diff-match-patch" :as google-diff]
|
["diff-match-patch" :as google-diff]
|
||||||
["electron" :refer [app autoUpdater dialog ipcMain shell]]
|
["electron" :refer [app autoUpdater dialog ipcMain shell]]
|
||||||
|
["electron-window-state" :as windowStateKeeper]
|
||||||
["fs" :as fs]
|
["fs" :as fs]
|
||||||
["fs-extra" :as fs-extra]
|
["fs-extra" :as fs-extra]
|
||||||
["os" :as os]
|
["os" :as os]
|
||||||
|
@ -618,6 +619,10 @@
|
||||||
(defmethod handle :window-close [^js win]
|
(defmethod handle :window-close [^js win]
|
||||||
(.close win))
|
(.close win))
|
||||||
|
|
||||||
|
(defmethod handle :theme-loaded [^js win]
|
||||||
|
(.manage (windowStateKeeper) win)
|
||||||
|
(.show win))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; file-sync-rs-apis ;;
|
;; file-sync-rs-apis ;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
:titleBarStyle "hiddenInset"
|
:titleBarStyle "hiddenInset"
|
||||||
:trafficLightPosition {:x 16 :y 16}
|
:trafficLightPosition {:x 16 :y 16}
|
||||||
:autoHideMenuBar (not mac?)
|
:autoHideMenuBar (not mac?)
|
||||||
|
:show false
|
||||||
:webPreferences
|
:webPreferences
|
||||||
{:plugins true ; pdf
|
{:plugins true ; pdf
|
||||||
:nodeIntegration false
|
:nodeIntegration false
|
||||||
|
@ -55,7 +56,6 @@
|
||||||
linux?
|
linux?
|
||||||
(assoc :icon (node-path/join js/__dirname "icons/logseq.png")))
|
(assoc :icon (node-path/join js/__dirname "icons/logseq.png")))
|
||||||
win (BrowserWindow. (clj->js win-opts))]
|
win (BrowserWindow. (clj->js win-opts))]
|
||||||
(.manage win-state win)
|
|
||||||
(.onBeforeSendHeaders (.. session -defaultSession -webRequest)
|
(.onBeforeSendHeaders (.. session -defaultSession -webRequest)
|
||||||
(clj->js {:urls (array "*://*.youtube.com/*")})
|
(clj->js {:urls (array "*://*.youtube.com/*")})
|
||||||
(fn [^js details callback]
|
(fn [^js details callback]
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
(ns frontend.components.theme
|
(ns frontend.components.theme
|
||||||
(:require [frontend.extensions.pdf.core :as pdf]
|
(:require [electron.ipc :as ipc]
|
||||||
|
[frontend.extensions.pdf.core :as pdf]
|
||||||
[frontend.config :as config]
|
[frontend.config :as config]
|
||||||
[frontend.handler.plugin :as plugin-handler]
|
[frontend.handler.plugin :as plugin-handler]
|
||||||
[frontend.handler.plugin-config :as plugin-config-handler]
|
[frontend.handler.plugin-config :as plugin-config-handler]
|
||||||
|
@ -35,6 +36,10 @@
|
||||||
#(let [doc js/document.documentElement]
|
#(let [doc js/document.documentElement]
|
||||||
(.setAttribute doc "lang" preferred-language)))
|
(.setAttribute doc "lang" preferred-language)))
|
||||||
|
|
||||||
|
(rum/use-effect!
|
||||||
|
#(js/setTimeout (fn [] (ipc/ipc "theme-loaded")) 100) ; Wait for the theme to be applied
|
||||||
|
[])
|
||||||
|
|
||||||
(rum/use-effect!
|
(rum/use-effect!
|
||||||
#(when (and restored-sidebar?
|
#(when (and restored-sidebar?
|
||||||
(mounted-fn))
|
(mounted-fn))
|
||||||
|
|
Loading…
Reference in New Issue