mirror of
https://github.com/logseq/logseq.git
synced 2026-04-26 15:15:01 +00:00
enhance(ui): simplify codes for modals
This commit is contained in:
@@ -545,7 +545,7 @@
|
||||
{:drop (fn [_e files]
|
||||
(when-let [id (state/get-edit-input-id)]
|
||||
(let [format (:block/format (state/get-edit-block))]
|
||||
(editor-handler/upload-asset id files format editor-handler/*asset-uploading? true))))})
|
||||
(editor-handler/upload-asset! id files format editor-handler/*asset-uploading? true))))})
|
||||
(common-handler/listen-to-scroll! element)
|
||||
(when (:margin-less-pages? (first (:rum/args state))) ;; makes sure full screen pages displaying without scrollbar
|
||||
(set! (.. element -scrollTop) 0)))
|
||||
@@ -555,10 +555,10 @@
|
||||
(dnd/unsubscribe! el :upload-files))
|
||||
state)}
|
||||
[{:keys [route-match margin-less-pages? route-name indexeddb-support? db-restoring? main-content show-action-bar? show-recording-bar?]}]
|
||||
(let [left-sidebar-open? (state/sub :ui/left-sidebar-open?)
|
||||
(let [left-sidebar-open? (state/sub :ui/left-sidebar-open?)
|
||||
onboarding-and-home? (and (or (nil? (state/get-current-repo)) (config/demo-graph?))
|
||||
(not config/publishing?)
|
||||
(= :home route-name))
|
||||
(not config/publishing?)
|
||||
(= :home route-name))
|
||||
margin-less-pages? (or (and (mobile-util/native-platform?) onboarding-and-home?) margin-less-pages?)]
|
||||
[:div#main-container.cp__sidebar-main-layout.flex-1.flex
|
||||
{:class (util/classnames [{:is-left-sidebar-open left-sidebar-open?}])}
|
||||
|
||||
Reference in New Issue
Block a user