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