From 92ea768457ec160b9e4b27a467d6c07920bd9703 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Tue, 25 Apr 2023 15:18:33 +0300 Subject: [PATCH 1/4] Fix: search in page position --- src/main/frontend/components/container.cljs | 6 +++--- src/main/frontend/components/find_in_page.cljs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/frontend/components/container.cljs b/src/main/frontend/components/container.cljs index b076164bf0..d030a80b6d 100644 --- a/src/main/frontend/components/container.cljs +++ b/src/main/frontend/components/container.cljs @@ -511,9 +511,6 @@ {:tabIndex "-1" :data-is-margin-less-pages margin-less-pages?} - (when (util/electron?) - (find-in-page/search)) - (when show-action-bar? (action-bar/action-bar)) @@ -783,6 +780,9 @@ :default-home default-home :new-block-mode new-block-mode}) + (when (util/electron?) + (find-in-page/search)) + (main {:route-match route-match :margin-less-pages? margin-less-pages? :logged? logged? diff --git a/src/main/frontend/components/find_in_page.cljs b/src/main/frontend/components/find_in_page.cljs index 703830d770..6bb469d80f 100644 --- a/src/main/frontend/components/find_in_page.cljs +++ b/src/main/frontend/components/find_in_page.cljs @@ -50,7 +50,7 @@ :on-hide (fn [] (search-handler/electron-exit-find-in-page!))))) [{:keys [matches match-case? q]}] - [:div#search-in-page.flex.flex-row.absolute.top-2.right-4.shadow-lg.px-2.py-1.faster-fade-in.items-center + [:div#search-in-page.flex.flex-row.absolute.top-10.right-4.shadow-lg.px-2.py-1.faster-fade-in.items-center (search-input q matches) From 5493479a0e2d768cf15ef7f56a18492bbc5e9f2a Mon Sep 17 00:00:00 2001 From: Sergey Kolesnik Date: Tue, 25 Apr 2023 18:45:31 +0300 Subject: [PATCH 2/4] tiny style fix: polish color circles in block context menu (#9237) * style: adapt bullet context menu color circles to theme highlight colors * style: remove shadows for color circles in block context menu * Revert "style: adapt bullet context menu color circles to theme highlight colors" This reverts commit 6468115e94c3bda1330a44705c68eec84c929640. --- src/main/frontend/ui.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/frontend/ui.cljs b/src/main/frontend/ui.cljs index b0060f6500..50578173ff 100644 --- a/src/main/frontend/ui.cljs +++ b/src/main/frontend/ui.cljs @@ -69,11 +69,11 @@ [:div.flex.flex-row.justify-between.py-1.px-2.items-center [:div.flex.flex-row.justify-between.flex-1.mx-2.mt-2 (for [color block-background-colors] - [:a.shadow-sm + [:a {:title (t (keyword "color" color)) :on-click #(add-bgcolor-fn color)} [:div.heading-bg {:style {:background-color (str "var(--color-" color "-500)")}}]]) - [:a.shadow-sm + [:a {:title (t :remove-background) :on-click rm-bgcolor-fn} [:div.heading-bg.remove "-"]]]]) From b7bc230ed8738e5ecc43ff8cc84f86674334a769 Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Wed, 26 Apr 2023 12:25:49 +0800 Subject: [PATCH 3/4] fix: page uuid might be empty --- src/main/frontend/components/search.cljs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/frontend/components/search.cljs b/src/main/frontend/components/search.cljs index 39733bd44d..2c9755aa1b 100644 --- a/src/main/frontend/components/search.cljs +++ b/src/main/frontend/components/search.cljs @@ -317,16 +317,17 @@ :page-content (let [{:block/keys [snippet uuid]} data ;; content here is normalized repo (state/sub :git/current-repo) - page (model/query-block-by-uuid uuid) ;; it's actually a page + page (when uuid (model/query-block-by-uuid uuid)) ;; it's actually a page format (db/get-page-format page)] - [:span {:data-block-ref uuid} - (search-result-item {:name "page" - :title (t :search-item/page) - :extension? true} - (if page - (page-content-search-result-item repo uuid format snippet search-q search-mode) - (do (log/error "search result with non-existing uuid: " data) - (str "Cache is outdated. Please click the 'Re-index' button in the graph's dropdown menu."))))]) + (when page + [:span {:data-block-ref uuid} + (search-result-item {:name "page" + :title (t :search-item/page) + :extension? true} + (if page + (page-content-search-result-item repo uuid format snippet search-q search-mode) + (do (log/error "search result with non-existing uuid: " data) + (str "Cache is outdated. Please click the 'Re-index' button in the graph's dropdown menu."))))])) nil)])) From ac44c245a6eda570660c750b25df5501c01bc5d6 Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Wed, 26 Apr 2023 17:35:20 +0800 Subject: [PATCH 4/4] fix: align notification buttons --- src/main/frontend/ui.cljs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/frontend/ui.cljs b/src/main/frontend/ui.cljs index 50578173ff..6df7990a09 100644 --- a/src/main/frontend/ui.cljs +++ b/src/main/frontend/ui.cljs @@ -234,15 +234,15 @@ (if (keyword? status) (case status :success - (icon "circle-check" {:class "text-success" :size "32"}) + (icon "circle-check" {:class "text-success" :size "20"}) :warning - (icon "alert-circle" {:class "text-warning" :size "32"}) + (icon "alert-circle" {:class "text-warning" :size "20"}) :error - (icon "circle-x" {:class "text-error" :size "32"}) + (icon "circle-x" {:class "text-error" :size "20"}) - (icon "info-circle" {:class "text-indigo-500" :size "32"})) + (icon "info-circle" {:class "text-indigo-500" :size "20"})) status)] [:div.ui__notifications-content {:style