From 529bb0239bd2bc6e9d4249ad7bad6bebb5cc5bac Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Mon, 31 Jul 2023 11:50:54 +0300 Subject: [PATCH 01/32] add missing go-home shortcut --- src/main/frontend/components/container.cljs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/frontend/components/container.cljs b/src/main/frontend/components/container.cljs index 4d90e8a9770d..a5b5a17e81fe 100644 --- a/src/main/frontend/components/container.cljs +++ b/src/main/frontend/components/container.cljs @@ -356,7 +356,8 @@ :active (and (not srs-open?) (= route-name :page) (= page (get-in route-match [:path-params :name]))) - :icon "home"}) + :icon "home" + :shortcut :go/home}) (sidebar-item {:class "journals-nav" :active (and (not srs-open?) From e03f66b7c668d8ec46943ac8b6a6c7d95381eac9 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Mon, 31 Jul 2023 16:37:48 +0300 Subject: [PATCH 02/32] wip: enhance main container --- src/main/frontend/components/container.cljs | 15 +++++---------- src/main/frontend/components/container.css | 9 +++++++-- src/main/frontend/components/journal.css | 1 - src/main/frontend/components/page.cljs | 2 +- src/main/frontend/components/page.css | 11 ++++------- 5 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/main/frontend/components/container.cljs b/src/main/frontend/components/container.cljs index a5b5a17e81fe..9946c72347d1 100644 --- a/src/main/frontend/components/container.cljs +++ b/src/main/frontend/components/container.cljs @@ -524,8 +524,9 @@ (when show-action-bar? (action-bar/action-bar)) - [:div.cp__sidebar-main-content - {:data-is-margin-less-pages margin-less-pages? + [:div.rounded-xl.cp__sidebar-main-content + {:class (when (not= route-name :whiteboards) "color-level") + :data-is-margin-less-pages margin-less-pages? :data-is-full-width (or margin-less-pages? (contains? #{:all-files :all-pages :my-publishing} route-name))} @@ -544,17 +545,11 @@ nil db-restoring? - [:div.mt-20 - [:div.ls-center - (ui/loading)]] + (ui/loading) :else [:div - {:class (if (or onboarding-and-home? margin-less-pages?) "" (util/hiccup->class "mx-auto.pb-24")) - :style {:margin-bottom (cond - margin-less-pages? 0 - onboarding-and-home? 0 - :else 120)}} + {:class (if (or onboarding-and-home? margin-less-pages?) "" (util/hiccup->class "mx-auto"))} main-content]) (when onboarding-and-home? diff --git a/src/main/frontend/components/container.css b/src/main/frontend/components/container.css index fd4a2c018fca..6e0e4dfc8abf 100644 --- a/src/main/frontend/components/container.css +++ b/src/main/frontend/components/container.css @@ -64,7 +64,7 @@ } #main-content-container { - @apply p-4 sm:px-8; + @apply p-4 sm:p-8; font-size: 1em; } @@ -497,7 +497,12 @@ html[data-theme='dark'] { } .cp__sidebar-main-content { - width: 100%; + @apply w-full h-fit p-6 sm:p-12; + + body[data-page=whiteboard] & { + @apply h-auto p-0; + } + max-width: var(--ls-main-content-max-width); flex: 1; } diff --git a/src/main/frontend/components/journal.css b/src/main/frontend/components/journal.css index f87e7e630606..395aa7dd0ff2 100644 --- a/src/main/frontend/components/journal.css +++ b/src/main/frontend/components/journal.css @@ -8,7 +8,6 @@ .journal-item { border-top: 1px solid; border-top-color: var(--ls-border-color, #738694); - margin: 24px 0; padding: 24px 0; min-height: 250px; diff --git a/src/main/frontend/components/page.cljs b/src/main/frontend/components/page.cljs index cb3c8dc30748..ae5ec742167a 100644 --- a/src/main/frontend/components/page.cljs +++ b/src/main/frontend/components/page.cljs @@ -950,7 +950,7 @@ [:div.flex-1.cp__all_pages [:h1.title (t :all-pages)] - [:div.text-sm.ml-1.opacity-70.mb-4 (t :paginates/pages total-items)] + [:div.text-sm.opacity-70 (t :paginates/pages total-items)] (when current-repo diff --git a/src/main/frontend/components/page.css b/src/main/frontend/components/page.css index ad93a8ecd4c4..5428daf61174 100644 --- a/src/main/frontend/components/page.css +++ b/src/main/frontend/components/page.css @@ -98,11 +98,11 @@ } .actions { - position: sticky; - background-color: var(--ls-primary-background-color); + @apply py-3 sticky; + + background-color: var(--color-level-1); white-space: nowrap; - top: -18px; - padding-bottom: 10px; + top: -32px; z-index: 1; @screen md { @@ -236,9 +236,6 @@ .ls-page-title { @apply rounded-sm; - padding: 5px 8px; - margin: 0 -6px; - &.title { margin-bottom: 12px; } From 664f4d846b4f37bbf7437c6db24c94732d4f2196 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Tue, 1 Aug 2023 12:13:01 +0300 Subject: [PATCH 03/32] minor padding adjustment --- src/main/frontend/components/container.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/frontend/components/container.css b/src/main/frontend/components/container.css index 6e0e4dfc8abf..deb93d527822 100644 --- a/src/main/frontend/components/container.css +++ b/src/main/frontend/components/container.css @@ -64,7 +64,7 @@ } #main-content-container { - @apply p-4 sm:p-8; + @apply p-4 sm:px-8 sm:py-10; font-size: 1em; } From d8c52c35f0c775fc7c1dfd0ff1ab0d39fab53a44 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Tue, 1 Aug 2023 12:35:09 +0300 Subject: [PATCH 04/32] add clear recent button --- src/main/frontend/components/container.cljs | 12 ++++++++++-- src/main/frontend/handler/recent.cljs | 4 ++++ src/resources/dicts/en.edn | 3 ++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/main/frontend/components/container.cljs b/src/main/frontend/components/container.cljs index 2d0a3463547f..8f27b4b71deb 100644 --- a/src/main/frontend/components/container.cljs +++ b/src/main/frontend/components/container.cljs @@ -21,6 +21,7 @@ [frontend.handler.common :as common-handler] [frontend.handler.editor :as editor-handler] [frontend.handler.page :as page-handler] + [frontend.handler.recent :as recent-handler] [frontend.handler.route :as route-handler] [frontend.handler.user :as user-handler] [frontend.handler.whiteboard :as whiteboard-handler] @@ -91,7 +92,7 @@ (if whiteboard-page? (route-handler/redirect-to-whiteboard! name) (route-handler/redirect-to-page! name {:click-from-recent? recent?})))))} - [:span.page-icon.ml-3 (if whiteboard-page? (ui/icon "whiteboard" {:extension? true}) icon)] + [:span.page-icon.ml-3..justify-center (if whiteboard-page? (ui/icon "whiteboard" {:extension? true}) icon)] [:span.page-title {:class (when untitiled? "opacity-50")} (if untitiled? (t :untitled) (pdf-utils/fix-local-asset-pagename original-name))]])) @@ -186,7 +187,14 @@ :draggable true :on-drag-start (fn [event] (editor-handler/block->data-transfer! name event)) :data-ref name} - (page-name name (get-page-icon entity) true)]))]))) + (page-name name (get-page-icon entity) true)])) + + (when-not (empty? pages) + [:li.recent-item.select-none + [:a.flex.items-center + {:on-click #(recent-handler/clear-recent! (state/get-current-repo))} + [:span.page-icon.ml-3.opacity-50.justify-center (ui/icon "trash-x")] + [:span.page-title.opacity-50 (t :left-side-bar/clear-recent)]]])]))) (rum/defcs flashcards < db-mixins/query rum/reactive {:did-mount (fn [state] diff --git a/src/main/frontend/handler/recent.cljs b/src/main/frontend/handler/recent.cljs index 07624390b733..f1e8c7a797b8 100644 --- a/src/main/frontend/handler/recent.cljs +++ b/src/main/frontend/handler/recent.cljs @@ -19,3 +19,7 @@ updated-pages (cons new-page-name updated-pages))] (db/set-key-value repo :recent/pages updated-pages*))) + +(defn clear-recent! + [repo] + (db/set-key-value repo :recent/pages {})) diff --git a/src/resources/dicts/en.edn b/src/resources/dicts/en.edn index 656de41f8ca0..b1cc06cccef9 100644 --- a/src/resources/dicts/en.edn +++ b/src/resources/dicts/en.edn @@ -149,7 +149,7 @@ :right-side-bar/separator "Right sidebar resize handler" :right-side-bar/toggle-right-sidebar "Toggle right sidebar" :right-side-bar/pane-close "Close" - :right-side-bar/pane-clese-others "Close others" + :right-side-bar/pane-clese-others "Close others" :right-side-bar/pane-clese-all "Close all" :right-side-bar/pane-collapse "Collapse" :right-side-bar/pane-collapse-others "Collapse others" @@ -165,6 +165,7 @@ :left-side-bar/new-whiteboard "New whiteboard" :left-side-bar/nav-favorites "Favorites" :left-side-bar/nav-recent-pages "Recent" + :left-side-bar/clear-recent "Clear recent" :page/something-went-wrong "Something went wrong" :page/logseq-is-having-a-problem "Logseq is having a problem. To try to get it back to a working state, please try the following safe steps in order:" :page/step "Step {1}" From 98a569be15dc2e6085c329942a152af7a1c01b6a Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Tue, 1 Aug 2023 12:41:29 +0300 Subject: [PATCH 05/32] fix typo --- src/main/frontend/components/container.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/frontend/components/container.cljs b/src/main/frontend/components/container.cljs index 8f27b4b71deb..1cd45f869ba2 100644 --- a/src/main/frontend/components/container.cljs +++ b/src/main/frontend/components/container.cljs @@ -92,7 +92,7 @@ (if whiteboard-page? (route-handler/redirect-to-whiteboard! name) (route-handler/redirect-to-page! name {:click-from-recent? recent?})))))} - [:span.page-icon.ml-3..justify-center (if whiteboard-page? (ui/icon "whiteboard" {:extension? true}) icon)] + [:span.page-icon.ml-3.justify-center (if whiteboard-page? (ui/icon "whiteboard" {:extension? true}) icon)] [:span.page-title {:class (when untitiled? "opacity-50")} (if untitiled? (t :untitled) (pdf-utils/fix-local-asset-pagename original-name))]])) From b08fa17645ebe0776b81547001a3587d26c732a2 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Wed, 2 Aug 2023 12:14:22 +0300 Subject: [PATCH 06/32] fix sticky position of actions on all pages --- src/main/frontend/components/page.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/frontend/components/page.css b/src/main/frontend/components/page.css index 5428daf61174..f95bd4b3debe 100644 --- a/src/main/frontend/components/page.css +++ b/src/main/frontend/components/page.css @@ -102,7 +102,7 @@ background-color: var(--color-level-1); white-space: nowrap; - top: -32px; + top: -40px; z-index: 1; @screen md { From 8a0b4927490c71862ca089833e3f8b54537e8fc9 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Wed, 2 Aug 2023 12:37:32 +0300 Subject: [PATCH 07/32] hide scrollbars --- src/main/frontend/components/container.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/frontend/components/container.css b/src/main/frontend/components/container.css index fd4a2c018fca..94aae916cb1a 100644 --- a/src/main/frontend/components/container.css +++ b/src/main/frontend/components/container.css @@ -183,6 +183,16 @@ .nav-content-item { @apply overflow-hidden; + transition: all 0.3s; + + &:not(:hover) { + ::-webkit-scrollbar-thumb, + ::-webkit-scrollbar, + ::-webkit-scrollbar-thumb:active { + background-color: transparent; + } + } + .nav-content-item-inner { @apply flex flex-col h-full overflow-hidden; } From 2e7901ec7a861a578d2548c323f23c909cbd1a5a Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Wed, 2 Aug 2023 12:40:27 +0300 Subject: [PATCH 08/32] remove transition --- src/main/frontend/components/container.css | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/frontend/components/container.css b/src/main/frontend/components/container.css index 94aae916cb1a..85162af3d627 100644 --- a/src/main/frontend/components/container.css +++ b/src/main/frontend/components/container.css @@ -183,8 +183,6 @@ .nav-content-item { @apply overflow-hidden; - transition: all 0.3s; - &:not(:hover) { ::-webkit-scrollbar-thumb, ::-webkit-scrollbar, From 1218e412a6b531b6058268f1d063f499204864d0 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Wed, 2 Aug 2023 13:36:19 +0300 Subject: [PATCH 09/32] color level route fix --- src/main/frontend/components/container.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/frontend/components/container.cljs b/src/main/frontend/components/container.cljs index 40875d86693a..58351a3c1b89 100644 --- a/src/main/frontend/components/container.cljs +++ b/src/main/frontend/components/container.cljs @@ -533,7 +533,7 @@ (action-bar/action-bar)) [:div.rounded-xl.cp__sidebar-main-content - {:class (when (not= route-name :whiteboards) "color-level") + {:class (when-not (contains? #{:whiteboard :whiteboards :graph} route-name) "color-level") :data-is-margin-less-pages margin-less-pages? :data-is-full-width (or margin-less-pages? (contains? #{:all-files :all-pages :my-publishing} route-name))} From d021195b6cd4b63832fe5da2b69ca14f59e2e31b Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Wed, 2 Aug 2023 14:05:14 +0300 Subject: [PATCH 10/32] move page menu next to page title --- resources/css/common.css | 5 - src/main/frontend/components/header.cljs | 119 +++++++++++------------ src/main/frontend/components/page.cljs | 77 ++++++++------- 3 files changed, 99 insertions(+), 102 deletions(-) diff --git a/resources/css/common.css b/resources/css/common.css index d49ca8b72bbe..5c730bce1b42 100644 --- a/resources/css/common.css +++ b/resources/css/common.css @@ -520,7 +520,6 @@ i.ti { /* region FIXME: override elements (?) */ h1.title { - margin-bottom: 1.5rem; color: var(--ls-title-text-color, #222); font-size: var(--ls-page-title-size, 36px); font-weight: 500; @@ -897,10 +896,6 @@ html[data-theme='dark'] .keyboard-shortcut > code { } html.is-mobile { - h1.title { - margin-bottom: 10px; - } - #journals .journal-item:first-child { margin-top: 5px; } diff --git a/src/main/frontend/components/header.cljs b/src/main/frontend/components/header.cljs index bb20b6892263..071978223a3d 100644 --- a/src/main/frontend/components/header.cljs +++ b/src/main/frontend/components/header.cljs @@ -1,7 +1,6 @@ (ns frontend.components.header (:require [cljs-bean.core :as bean] [frontend.components.export :as export] - [frontend.components.page-menu :as page-menu] [frontend.components.plugins :as plugins] [frontend.components.server :as server] [frontend.components.right-sidebar :as sidebar] @@ -79,67 +78,63 @@ (rum/defc dropdown-menu < rum/reactive < {:key-fn #(identity "repos-dropdown-menu")} [{:keys [current-repo t]}] - (let [page-menu (page-menu/page-menu nil) - page-menu-and-hr (when (seq page-menu) - (concat page-menu [{:hr true}]))] - (ui/dropdown-with-links - (fn [{:keys [toggle-fn]}] - [:button.button.icon.toolbar-dots-btn - {:on-click toggle-fn - :title (t :header/more)} - (ui/icon "dots" {:size ui/icon-size})]) - (->> - [(when (state/enable-editing?) - {:title (t :settings) - :options {:on-click state/open-settings!} - :icon (ui/icon "settings")}) - - (when config/lsp-enabled? - {:title (t :plugins) - :options {:on-click #(plugin-handler/goto-plugins-dashboard!)} - :icon (ui/icon "apps")}) - - (when config/lsp-enabled? - {:title (t :themes) - :options {:on-click #(plugins/open-select-theme!)} - :icon (ui/icon "palette")}) - - (when current-repo - {:title (t :export-graph) - :options {:on-click #(state/set-modal! export/export)} - :icon (ui/icon "database-export")}) - - (when (and current-repo (state/enable-editing?)) - {:title (t :import) - :options {:href (rfe/href :import)} - :icon (ui/icon "file-upload")}) - - (when-not config/publishing? - {:title [:div.flex-row.flex.justify-between.items-center - [:span (t :join-community)]] - :options {:href "https://discuss.logseq.com" - :title (t :discourse-title) - :target "_blank"} - :icon (ui/icon "brand-discord")}) - - (when-not config/publishing? - {:title [:div.flex-row.flex.justify-between.items-center - [:span (t :help/bug)]] - :options {:href (rfe/href :bug-report)} - :icon (ui/icon "bug")}) - - (when config/publishing? - {:title (t :toggle-theme) - :options {:on-click #(state/toggle-theme!)} - :icon (ui/icon "bulb")}) - - (when (and (state/sub :auth/id-token) (user-handler/logged-in?)) - {:title (t :logout-user (user-handler/email)) - :options {:on-click #(user-handler/logout)} - :icon (ui/icon "logout")})] - (concat page-menu-and-hr) - (remove nil?)) - {}))) + (ui/dropdown-with-links + (fn [{:keys [toggle-fn]}] + [:button.button.icon.toolbar-dots-btn + {:on-click toggle-fn + :title (t :header/more)} + (ui/icon "dots" {:size ui/icon-size})]) + (->> + [(when (state/enable-editing?) + {:title (t :settings) + :options {:on-click state/open-settings!} + :icon (ui/icon "settings")}) + + (when config/lsp-enabled? + {:title (t :plugins) + :options {:on-click #(plugin-handler/goto-plugins-dashboard!)} + :icon (ui/icon "apps")}) + + (when config/lsp-enabled? + {:title (t :themes) + :options {:on-click #(plugins/open-select-theme!)} + :icon (ui/icon "palette")}) + + (when current-repo + {:title (t :export-graph) + :options {:on-click #(state/set-modal! export/export)} + :icon (ui/icon "database-export")}) + + (when (and current-repo (state/enable-editing?)) + {:title (t :import) + :options {:href (rfe/href :import)} + :icon (ui/icon "file-upload")}) + + (when-not config/publishing? + {:title [:div.flex-row.flex.justify-between.items-center + [:span (t :join-community)]] + :options {:href "https://discuss.logseq.com" + :title (t :discourse-title) + :target "_blank"} + :icon (ui/icon "brand-discord")}) + + (when-not config/publishing? + {:title [:div.flex-row.flex.justify-between.items-center + [:span (t :help/bug)]] + :options {:href (rfe/href :bug-report)} + :icon (ui/icon "bug")}) + + (when config/publishing? + {:title (t :toggle-theme) + :options {:on-click #(state/toggle-theme!)} + :icon (ui/icon "bulb")}) + + (when (and (state/sub :auth/id-token) (user-handler/logged-in?)) + {:title (t :logout-user (user-handler/email)) + :options {:on-click #(user-handler/logout)} + :icon (ui/icon "logout")})] + (remove nil?)) + {})) (rum/defc back-and-forward < {:key-fn #(identity "nav-history-buttons")} diff --git a/src/main/frontend/components/page.cljs b/src/main/frontend/components/page.cljs index ae5ec742167a..127e5262dbd3 100644 --- a/src/main/frontend/components/page.cljs +++ b/src/main/frontend/components/page.cljs @@ -6,6 +6,7 @@ [frontend.components.content :as content] [frontend.components.editor :as editor] [frontend.components.hierarchy :as hierarchy] + [frontend.components.page-menu :as page-menu] [frontend.components.plugins :as plugins] [frontend.components.reference :as reference] [frontend.components.svg :as svg] @@ -447,8 +448,16 @@ (page-mouse-leave e *control-show?))} (page-blocks-collapse-control title *control-show? *all-collapsed?)]) (when-not whiteboard? - [:div.ls-page-title.flex-1.flex-row.w-full - (page-title page-name icon title format fmt-journal?)]) + [:div.ls-page-title.flex-1.flex.w-full.items-center.sm:mb-8.mb-8 + (page-title page-name icon title format fmt-journal?) + (ui/dropdown-with-links + (fn [{:keys [toggle-fn]}] + [:button.button.icon.toolbar-dots-btn + {:on-click toggle-fn + :title (t :header/more)} + (ui/icon "dots" {:size ui/icon-size})]) + (page-menu/page-menu nil) + {})]) (when (not config/publishing?) (when config/lsp-enabled? [:div.flex.flex-row @@ -733,27 +742,25 @@ (rum/defc page-graph-inner < rum/reactive [_page graph dark?] - (let [ show-journals-in-page-graph? (rum/react *show-journals-in-page-graph?) ] - [:div.sidebar-item.flex-col - [:div.flex.items-center.justify-between.mb-0 - [:span (t :right-side-bar/show-journals)] - [:div.mt-1 - (ui/toggle show-journals-in-page-graph? ;my-val; - (fn [] - (let [value (not show-journals-in-page-graph?)] - (reset! *show-journals-in-page-graph? value) - )) - true)] - ] - - (graph/graph-2d {:nodes (:nodes graph) - :links (:links graph) - :width 600 - :height 600 - :dark? dark? - :register-handlers-fn - (fn [graph] - (graph-register-handlers graph (atom nil) (atom nil) dark?))})])) + (let [show-journals-in-page-graph? (rum/react *show-journals-in-page-graph?)] + [:div.sidebar-item.flex-col + [:div.flex.items-center.justify-between.mb-0 + [:span (t :right-side-bar/show-journals)] + [:div.mt-1 + (ui/toggle show-journals-in-page-graph? ;my-val; + (fn [] + (let [value (not show-journals-in-page-graph?)] + (reset! *show-journals-in-page-graph? value))) + true)]] + + (graph/graph-2d {:nodes (:nodes graph) + :links (:links graph) + :width 600 + :height 600 + :dark? dark? + :register-handlers-fn + (fn [graph] + (graph-register-handlers graph (atom nil) (atom nil) dark?))})])) (rum/defc page-graph < db-mixins/query rum/reactive [] @@ -800,8 +807,8 @@ [:th {:class [(name key)]} [:a.fade-link {:on-click (fn [] - (reset! by-item key) - (swap! desc? not))} + (reset! by-item key) + (swap! desc? not))} [:span.flex.items-center [:span.mr-1 title] (when (= @by-item key) @@ -845,18 +852,18 @@ [:span.pr-2 (ui/button - (t :cancel) - :intent "logseq" - :on-click close-fn)] + (t :cancel) + :intent "logseq" + :on-click close-fn)] (ui/button - (t :yes) - :on-click (fn [] - (close-fn) - (doseq [page-name (map :block/name pages)] - (page-handler/delete! page-name #())) - (notification/show! (t :tips/all-done) :success) - (js/setTimeout #(refresh-fn) 200)))]])) + (t :yes) + :on-click (fn [] + (close-fn) + (doseq [page-name (map :block/name pages)] + (page-handler/delete! page-name #())) + (notification/show! (t :tips/all-done) :success) + (js/setTimeout #(refresh-fn) 200)))]])) (rum/defc pagination "Pagination component, like `<< >>`. From d2cb247e369b03e378f43159af774f433507fdbc Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Wed, 2 Aug 2023 14:13:52 +0300 Subject: [PATCH 11/32] overflow fix --- src/main/frontend/components/page.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/frontend/components/page.cljs b/src/main/frontend/components/page.cljs index 127e5262dbd3..4f09f8a3c563 100644 --- a/src/main/frontend/components/page.cljs +++ b/src/main/frontend/components/page.cljs @@ -438,7 +438,7 @@ [:div ((state/get-component :whiteboard/tldraw-preview) page-name)] ;; FIXME: this is not reactive [:div.relative (when (and (not sidebar?) (not block?)) - [:div.flex.flex-row.space-between + [:div.flex.flex-row.overflow-hidden (when (or (mobile-util/native-platform?) (util/mobile?)) [:div.flex.flex-row.pr-2 {:style {:margin-left -15} @@ -448,7 +448,7 @@ (page-mouse-leave e *control-show?))} (page-blocks-collapse-control title *control-show? *all-collapsed?)]) (when-not whiteboard? - [:div.ls-page-title.flex-1.flex.w-full.items-center.sm:mb-8.mb-8 + [:div.ls-page-title.flex-1.flex.items-center.sm:mb-8.mb-8 (page-title page-name icon title format fmt-journal?) (ui/dropdown-with-links (fn [{:keys [toggle-fn]}] From b807718cf0057c7a84d0b820c576c0fa92f8e1ff Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Wed, 2 Aug 2023 14:24:26 +0300 Subject: [PATCH 12/32] fix loading position --- src/main/frontend/components/container.cljs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/frontend/components/container.cljs b/src/main/frontend/components/container.cljs index 58351a3c1b89..0368260d02fe 100644 --- a/src/main/frontend/components/container.cljs +++ b/src/main/frontend/components/container.cljs @@ -532,7 +532,7 @@ (when show-action-bar? (action-bar/action-bar)) - [:div.rounded-xl.cp__sidebar-main-content + [:div.rounded-xl.cp__sidebar-main-content.relative {:class (when-not (contains? #{:whiteboard :whiteboards :graph} route-name) "color-level") :data-is-margin-less-pages margin-less-pages? :data-is-full-width (or margin-less-pages? @@ -553,7 +553,9 @@ nil db-restoring? - (ui/loading) + [:div.mt-20 + [:div.ls-center + (ui/loading)]] :else [:div From 7bdb9b6b693c796473aa57f6005946ec2335df6a Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Wed, 2 Aug 2023 16:32:14 +0300 Subject: [PATCH 13/32] enhance journals --- src/main/frontend/components/container.cljs | 2 +- src/main/frontend/components/journal.cljs | 51 +++++++++++---------- src/main/frontend/components/journal.css | 8 +--- src/main/frontend/components/page.cljs | 3 +- 4 files changed, 29 insertions(+), 35 deletions(-) diff --git a/src/main/frontend/components/container.cljs b/src/main/frontend/components/container.cljs index 0368260d02fe..604007fb2702 100644 --- a/src/main/frontend/components/container.cljs +++ b/src/main/frontend/components/container.cljs @@ -533,7 +533,7 @@ (action-bar/action-bar)) [:div.rounded-xl.cp__sidebar-main-content.relative - {:class (when-not (contains? #{:whiteboard :whiteboards :graph} route-name) "color-level") + {:class (when-not (contains? #{:whiteboard :whiteboards :graph :all-journals} route-name) "color-level") :data-is-margin-less-pages margin-less-pages? :data-is-full-width (or margin-less-pages? (contains? #{:all-files :all-pages :my-publishing} route-name))} diff --git a/src/main/frontend/components/journal.cljs b/src/main/frontend/components/journal.cljs index 9aefd88c5015..89ab9c5832c5 100644 --- a/src/main/frontend/components/journal.cljs +++ b/src/main/frontend/components/journal.cljs @@ -1,15 +1,16 @@ (ns frontend.components.journal (:require [clojure.string :as string] [frontend.components.page :as page] + [frontend.components.page-menu :as page-menu] [frontend.components.reference :as reference] [frontend.components.scheduled-deadlines :as scheduled] + [frontend.context.i18n :refer [t]] [frontend.date :as date] [frontend.db :as db] [frontend.db-mixins :as db-mixins] [frontend.db.model :as model] [frontend.handler.page :as page-handler] [frontend.state :as state] - [logseq.graph-parser.util :as gp-util] [frontend.ui :as ui] [frontend.util :as util] [frontend.util.text :as text-util] @@ -34,34 +35,34 @@ data-page-tags (when (seq (:block/tags page-entity)) (let [page-names (model/get-page-names-by-ids (map :db/id (:block/tags page)))] (text-util/build-data-value page-names)))] - [:div.flex-1.journal.page (cond-> {} + [:div.flex.flex-col.journal.page (cond-> {} data-page-tags (assoc :data-page-tags data-page-tags)) - (ui/foldable - [:a.initial-color.title.journal-title - {:href (rfe/href :page {:name page}) - :on-mouse-down (fn [e] - (when (util/right-click? e) - (state/set-state! :page-title/context {:page page}))) - :on-click (fn [e] - (when (gobj/get e "shiftKey") - (when-let [page page-entity] - (state/sidebar-add-block! - (state/get-current-repo) - (:db/id page) - :page)) - (.preventDefault e)))} - [:h1.title - (gp-util/capitalize-all title)]] + [:a.flex-1 + (ui/foldable + [:div.ls-page-title.flex-1.flex.items-center + [:a.flex-1 + {:href (rfe/href :page {:name page})} + (page/page-title (:block/name page-entity) "" title (db/get-page-format page-entity) true)] + (ui/dropdown-with-links + (fn [{:keys [toggle-fn]}] + [:button.button.icon.toolbar-dots-btn + {:on-click toggle-fn + :title (t :header/more)} + (ui/icon "dots" {:size ui/icon-size})]) + (page-menu/page-menu page) + {})] - (if today? - (blocks-cp repo page) - (ui/lazy-visible - (fn [] (blocks-cp repo page)) - {:debug-id (str "journal-blocks " page)})) - {}) + [:.sm:mt-8.mt-8 + (if today? + (blocks-cp repo page) + (ui/lazy-visible + (fn [] (blocks-cp repo page)) + {:debug-id (str "journal-blocks " page)}))] + + {})] (page/today-queries repo today? false) @@ -78,7 +79,7 @@ (ui/infinite-list "main-content-container" (for [{:block/keys [name]} latest-journals] - [:div.journal-item.content {:key name} + [:div.content.color-level.rounded-xl.p-6.sm:p-12.mb-4.journal-item {:key name} (journal-cp name)]) {:has-more (page-handler/has-more-journals?) :more-class "text-4xl" diff --git a/src/main/frontend/components/journal.css b/src/main/frontend/components/journal.css index 395aa7dd0ff2..4f7bd6a305c1 100644 --- a/src/main/frontend/components/journal.css +++ b/src/main/frontend/components/journal.css @@ -6,14 +6,8 @@ } .journal-item { - border-top: 1px solid; - border-top-color: var(--ls-border-color, #738694); - padding: 24px 0; - min-height: 250px; - &:first-child { - padding-top: 0; - border-top: none; + &:first-child .journal.page { min-height: 500px; } } diff --git a/src/main/frontend/components/page.cljs b/src/main/frontend/components/page.cljs index 4f09f8a3c563..13a2be69018b 100644 --- a/src/main/frontend/components/page.cljs +++ b/src/main/frontend/components/page.cljs @@ -317,7 +317,6 @@ (state/set-state! :page-title/context {:page page-name}))) :on-click (fn [e] (when-not (= (.-nodeName (.-target e)) "INPUT") - (.preventDefault e) (if (gobj/get e "shiftKey") (when-let [page (db/pull repo '[*] [:block/name page-name])] (state/sidebar-add-block! @@ -438,7 +437,7 @@ [:div ((state/get-component :whiteboard/tldraw-preview) page-name)] ;; FIXME: this is not reactive [:div.relative (when (and (not sidebar?) (not block?)) - [:div.flex.flex-row.overflow-hidden + [:div.flex.flex-row (when (or (mobile-util/native-platform?) (util/mobile?)) [:div.flex.flex-row.pr-2 {:style {:margin-left -15} From 946a15843c84698e80050ac14c23b1a4ab695494 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Wed, 2 Aug 2023 17:13:29 +0300 Subject: [PATCH 14/32] add page menu to whiteboards and refactor --- src/main/frontend/components/journal.cljs | 11 ++--------- src/main/frontend/components/page.cljs | 9 +-------- src/main/frontend/components/page_menu.cljs | 11 +++++++++++ src/main/frontend/components/whiteboard.cljs | 3 +++ src/main/frontend/components/whiteboard.css | 6 +----- src/resources/dicts/de.edn | 17 +++++++++-------- 6 files changed, 27 insertions(+), 30 deletions(-) diff --git a/src/main/frontend/components/journal.cljs b/src/main/frontend/components/journal.cljs index 89ab9c5832c5..be9b643e255a 100644 --- a/src/main/frontend/components/journal.cljs +++ b/src/main/frontend/components/journal.cljs @@ -39,20 +39,13 @@ data-page-tags (assoc :data-page-tags data-page-tags)) - [:a.flex-1 + [:.flex-1 (ui/foldable [:div.ls-page-title.flex-1.flex.items-center [:a.flex-1 {:href (rfe/href :page {:name page})} (page/page-title (:block/name page-entity) "" title (db/get-page-format page-entity) true)] - (ui/dropdown-with-links - (fn [{:keys [toggle-fn]}] - [:button.button.icon.toolbar-dots-btn - {:on-click toggle-fn - :title (t :header/more)} - (ui/icon "dots" {:size ui/icon-size})]) - (page-menu/page-menu page) - {})] + (page-menu/page-actions-dropdown page)] [:.sm:mt-8.mt-8 diff --git a/src/main/frontend/components/page.cljs b/src/main/frontend/components/page.cljs index 13a2be69018b..cecebe5abd98 100644 --- a/src/main/frontend/components/page.cljs +++ b/src/main/frontend/components/page.cljs @@ -449,14 +449,7 @@ (when-not whiteboard? [:div.ls-page-title.flex-1.flex.items-center.sm:mb-8.mb-8 (page-title page-name icon title format fmt-journal?) - (ui/dropdown-with-links - (fn [{:keys [toggle-fn]}] - [:button.button.icon.toolbar-dots-btn - {:on-click toggle-fn - :title (t :header/more)} - (ui/icon "dots" {:size ui/icon-size})]) - (page-menu/page-menu nil) - {})]) + (page-menu/page-actions-dropdown nil)]) (when (not config/publishing?) (when config/lsp-enabled? [:div.flex.flex-row diff --git a/src/main/frontend/components/page_menu.cljs b/src/main/frontend/components/page_menu.cljs index 82275925455a..218eb338dc5a 100644 --- a/src/main/frontend/components/page_menu.cljs +++ b/src/main/frontend/components/page_menu.cljs @@ -178,3 +178,14 @@ (:block/format page))))}})] (flatten) (remove nil?)))))) + +(defn page-actions-dropdown + [page-name] + (ui/dropdown-with-links + (fn [{:keys [toggle-fn]}] + [:button.button.icon.toolbar-dots-btn + {:on-click toggle-fn + :title (t :page/actions)} + (ui/icon "dots" {:size ui/icon-size})]) + (page-menu page-name) + {})) \ No newline at end of file diff --git a/src/main/frontend/components/whiteboard.cljs b/src/main/frontend/components/whiteboard.cljs index 0be02e436dc0..fe38487b4620 100644 --- a/src/main/frontend/components/whiteboard.cljs +++ b/src/main/frontend/components/whiteboard.cljs @@ -4,6 +4,7 @@ [frontend.components.content :as content] [frontend.components.onboarding.quick-tour :as quick-tour] [frontend.components.page :as page] + [frontend.components.page-menu :as page-menu] [frontend.components.reference :as reference] [frontend.context.i18n :refer [t]] [frontend.db-mixins :as db-mixins] @@ -281,6 +282,8 @@ nil false)] + (page-menu/page-actions-dropdown page-name) + [:div.whiteboard-page-refs (references-count page-name "text-md px-3 py-2 cursor-default whiteboard-page-refs-count" diff --git a/src/main/frontend/components/whiteboard.css b/src/main/frontend/components/whiteboard.css index e6f6184ab36a..041125796bb5 100644 --- a/src/main/frontend/components/whiteboard.css +++ b/src/main/frontend/components/whiteboard.css @@ -146,6 +146,7 @@ input.tl-text-input { z-index: 2000; gap: 4px; line-height: 1.4; + max-width: 70%; } .whiteboard-page-title { @@ -156,11 +157,6 @@ input.tl-text-input { border: 1px solid transparent; background: var(--ls-secondary-background-color); - &-root { - max-width: 70%; - overflow: hidden; - } - .page-title-sizer-wrapper { width: calc(100% - 20px); diff --git a/src/resources/dicts/de.edn b/src/resources/dicts/de.edn index bf9d862de5e3..20e0f5559023 100644 --- a/src/resources/dicts/de.edn +++ b/src/resources/dicts/de.edn @@ -83,7 +83,7 @@ :asset/show-in-folder "Bild im Ordner anzeigen" :block/name "Seitenname" - + :bug-report/main-title "Bug melden" :bug-report/clipboard-inspector-title "Untersuchung der Zwischenablage" :bug-report/main-desc "Können Sie uns mit einer Fehlermeldung helfen? Wir werden es schnellstmöglich beheben." @@ -192,7 +192,7 @@ :graph/save "Speichern..." :graph/save-error "Speichern fehlgeschlagen" :graph/save-success "Erfolgreich gespeichert" - + :header/go-back "Zurück" :header/go-forward "Vorwärts" :header/more "Weitere Optionen" @@ -328,6 +328,7 @@ :page/updated-at "Aktualisiert am" :page/version-history "Seitenverlauf anzeigen" :page/whiteboard-to-journal-error "Whiteboards können nicht den gleichen Namen wie ein Journal verwenden" + :page/actions "Page actions" :paginates/next "Weiter" :paginates/pages "Total {1} Seiten" @@ -388,7 +389,7 @@ :plugin.install-from-file/title "Plugins aus plugins.edn installieren" :plugin.install-from-file/notice "Die folgenden Plugins werden Ihre Plugins ersetzen:" :plugin.install-from-file/success "Alle Plugins installiert!" - + :query/config-property-settings "Einstellungen für diese Query:" :right-side-bar/all-pages "Alle Seiten" @@ -408,9 +409,9 @@ :right-side-bar/show-journals "Zeige Journale" :right-side-bar/switch-theme "Zu {1} Thema wechseln" :right-side-bar/toggle-right-sidebar "Rechte Seitenleiste umschalten" - + :select/default-select-multiple "Ein oder mehrere auswählen" - + :settings-page/app-updated "Ihre Version ist aktuell 🎉" :settings-page/auto-expand-block-refs "Automatisch beim Heranzoomen Blockreferenzen erweitern..." :settings-page/auto-expand-block-refs-tip "Diese Option steuert, ob Blockreferenzen beim Heranzoomen automatisch ausgeklappt werden." @@ -439,9 +440,9 @@ :settings-page/update-available "Neue Version gefunden: " :settings-page/update-error-1 "⚠️ Ups, Etwas ist schiefgelaufen!" :settings-page/update-error-2 " Überprüfen Sie den " - + :settings-permission/start-granting "Erlauben" - + :tips/all-done "Alles erledigt!" :tutorial/text #resource "tutorials/tutorial-de.md" @@ -536,7 +537,7 @@ :whiteboard/zoom-in "Heranzoomen" :whiteboard/zoom-out "Herauszoomen" :whiteboard/zoom-to-fit "Zoom an Zeichnung anpassen" - + :window/minimize "Minimieren" :window/maximize "Maximieren" :window/restore "Wiederherstellen" From fd06706e2128892ace147b252dbdd0a78dda6d64 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Wed, 2 Aug 2023 17:28:57 +0300 Subject: [PATCH 15/32] fix: translation --- src/resources/dicts/de.edn | 1 - src/resources/dicts/en.edn | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resources/dicts/de.edn b/src/resources/dicts/de.edn index 20e0f5559023..b9a176ae197c 100644 --- a/src/resources/dicts/de.edn +++ b/src/resources/dicts/de.edn @@ -328,7 +328,6 @@ :page/updated-at "Aktualisiert am" :page/version-history "Seitenverlauf anzeigen" :page/whiteboard-to-journal-error "Whiteboards können nicht den gleichen Namen wie ein Journal verwenden" - :page/actions "Page actions" :paginates/next "Weiter" :paginates/pages "Total {1} Seiten" diff --git a/src/resources/dicts/en.edn b/src/resources/dicts/en.edn index b1cc06cccef9..de1bfaa0864c 100644 --- a/src/resources/dicts/en.edn +++ b/src/resources/dicts/en.edn @@ -184,6 +184,7 @@ :page/unfavorite "Unfavorite page" :page/show-journals "Show journals" :page/show-whiteboards "Show whiteboards" + :page/actions "Page actions" :block/name "Page name" :page/earlier "Earlier" :page/copy-page-url "Copy page URL" From ccd811c32a3e12445f0ba528d63b586ea8f86cdb Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Wed, 2 Aug 2023 18:56:46 +0300 Subject: [PATCH 16/32] fix: favorites --- src/main/frontend/components/container.cljs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/frontend/components/container.cljs b/src/main/frontend/components/container.cljs index 1cd45f869ba2..434a012d349c 100644 --- a/src/main/frontend/components/container.cljs +++ b/src/main/frontend/components/container.cljs @@ -140,25 +140,26 @@ [t] (let [favorites (->> (:favorites (state/sub-config)) (remove string/blank?) - (filter string?))] + (filter string?)) + favorite-entities (->> favorites + (mapv #(db/entity [:block/name (util/safe-page-name-sanity-lc %)])) + (remove nil?))] (nav-content-item [:a.flex.items-center.text-sm.font-medium.rounded-md.wrap-th (ui/icon "star" {:size 16}) [:span.flex-1.ml-2 (string/upper-case (t :left-side-bar/nav-favorites))]] {:class "favorites" - :count (count favorites) + :count (count favorite-entities) :edit-fn (fn [e] (rfe/push-state :page {:name "Favorites"}) (util/stop e))} - (when (seq favorites) + (when (seq favorite-entities) [:ul.favorites.text-sm - (for [name favorites] - (when-not (string/blank? name) - (when-let [entity (db/entity [:block/name (util/safe-page-name-sanity-lc name)])] - (let [icon (get-page-icon entity)] - (favorite-item t name icon)))))])))) + (for [entity favorite-entities] + (let [icon (get-page-icon entity)] + (favorite-item t (:block/name entity) icon)))])))) (rum/defc recent-pages < rum/reactive db-mixins/query [t] From d55cc7a58e73aff80a4e2b84a3ffeaf6b65e8b27 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Thu, 3 Aug 2023 11:00:41 +0300 Subject: [PATCH 17/32] fix: border and rounded corners --- src/main/frontend/components/container.css | 2 -- src/main/frontend/components/right_sidebar.cljs | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/frontend/components/container.css b/src/main/frontend/components/container.css index a97fdc816021..4b777856f8cb 100644 --- a/src/main/frontend/components/container.css +++ b/src/main/frontend/components/container.css @@ -642,8 +642,6 @@ html[data-theme='dark'] { @apply relative; flex: 1 1; min-height: 100px; - border: 1px solid transparent; - transition: border-color 0.1s; .sidebar-item-header { white-space: nowrap; diff --git a/src/main/frontend/components/right_sidebar.cljs b/src/main/frontend/components/right_sidebar.cljs index e4443b350665..6ccea545552f 100644 --- a/src/main/frontend/components/right_sidebar.cljs +++ b/src/main/frontend/components/right_sidebar.cljs @@ -229,8 +229,9 @@ (when collapsed? "collapsed")]} (let [[title component] item] [:div.flex.flex-col.w-full.relative - [:.flex.flex-row.justify-between.pr-2.sidebar-item-header.color-level - {:draggable true + [:.flex.flex-row.justify-between.pr-2.sidebar-item-header.color-level.rounded-t-md + {:class (when collapsed? "rounded-b-md") + :draggable true :on-drag-start (fn [event] (editor-handler/block->data-transfer! (:block/name (db/entity db-id)) event) (reset! *drag-from idx)) From 620cede56b0f90c2d637f2a825bda29e52b67154 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Thu, 3 Aug 2023 11:14:47 +0300 Subject: [PATCH 18/32] fix: dnd delay --- src/main/frontend/components/right_sidebar.cljs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/frontend/components/right_sidebar.cljs b/src/main/frontend/components/right_sidebar.cljs index 6ccea545552f..94b0b6b54692 100644 --- a/src/main/frontend/components/right_sidebar.cljs +++ b/src/main/frontend/components/right_sidebar.cljs @@ -389,6 +389,7 @@ [:div.cp__right-sidebar-inner.flex.flex-col.h-full#right-sidebar-container [:div.cp__right-sidebar-scrollable + {:on-drag-over util/stop} [:div.cp__right-sidebar-topbar.flex.flex-row.justify-between.items-center.px-2.h-12 [:div.cp__right-sidebar-settings.hide-scrollbar.gap-1 {:key "right-sidebar-settings"} [:div.text-sm From 43bdee9ea3e7fbca01137a7704e040edac044126 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Thu, 3 Aug 2023 11:27:11 +0300 Subject: [PATCH 19/32] Revert "add clear recent button" This reverts commit d8c52c35f0c775fc7c1dfd0ff1ab0d39fab53a44. --- src/main/frontend/components/container.cljs | 10 +--------- src/main/frontend/handler/recent.cljs | 4 ---- src/resources/dicts/en.edn | 3 +-- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/main/frontend/components/container.cljs b/src/main/frontend/components/container.cljs index 434a012d349c..8c073f329952 100644 --- a/src/main/frontend/components/container.cljs +++ b/src/main/frontend/components/container.cljs @@ -21,7 +21,6 @@ [frontend.handler.common :as common-handler] [frontend.handler.editor :as editor-handler] [frontend.handler.page :as page-handler] - [frontend.handler.recent :as recent-handler] [frontend.handler.route :as route-handler] [frontend.handler.user :as user-handler] [frontend.handler.whiteboard :as whiteboard-handler] @@ -188,14 +187,7 @@ :draggable true :on-drag-start (fn [event] (editor-handler/block->data-transfer! name event)) :data-ref name} - (page-name name (get-page-icon entity) true)])) - - (when-not (empty? pages) - [:li.recent-item.select-none - [:a.flex.items-center - {:on-click #(recent-handler/clear-recent! (state/get-current-repo))} - [:span.page-icon.ml-3.opacity-50.justify-center (ui/icon "trash-x")] - [:span.page-title.opacity-50 (t :left-side-bar/clear-recent)]]])]))) + (page-name name (get-page-icon entity) true)]))]))) (rum/defcs flashcards < db-mixins/query rum/reactive {:did-mount (fn [state] diff --git a/src/main/frontend/handler/recent.cljs b/src/main/frontend/handler/recent.cljs index f1e8c7a797b8..07624390b733 100644 --- a/src/main/frontend/handler/recent.cljs +++ b/src/main/frontend/handler/recent.cljs @@ -19,7 +19,3 @@ updated-pages (cons new-page-name updated-pages))] (db/set-key-value repo :recent/pages updated-pages*))) - -(defn clear-recent! - [repo] - (db/set-key-value repo :recent/pages {})) diff --git a/src/resources/dicts/en.edn b/src/resources/dicts/en.edn index b1cc06cccef9..656de41f8ca0 100644 --- a/src/resources/dicts/en.edn +++ b/src/resources/dicts/en.edn @@ -149,7 +149,7 @@ :right-side-bar/separator "Right sidebar resize handler" :right-side-bar/toggle-right-sidebar "Toggle right sidebar" :right-side-bar/pane-close "Close" - :right-side-bar/pane-clese-others "Close others" + :right-side-bar/pane-clese-others "Close others" :right-side-bar/pane-clese-all "Close all" :right-side-bar/pane-collapse "Collapse" :right-side-bar/pane-collapse-others "Collapse others" @@ -165,7 +165,6 @@ :left-side-bar/new-whiteboard "New whiteboard" :left-side-bar/nav-favorites "Favorites" :left-side-bar/nav-recent-pages "Recent" - :left-side-bar/clear-recent "Clear recent" :page/something-went-wrong "Something went wrong" :page/logseq-is-having-a-problem "Logseq is having a problem. To try to get it back to a working state, please try the following safe steps in order:" :page/step "Step {1}" From 086eda814dfcf7efbe2ab3e879a7fdee1a2cfe09 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Thu, 3 Aug 2023 11:54:25 +0300 Subject: [PATCH 20/32] overflow fix --- src/main/frontend/components/page.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/frontend/components/page.cljs b/src/main/frontend/components/page.cljs index cecebe5abd98..ee8e0981b111 100644 --- a/src/main/frontend/components/page.cljs +++ b/src/main/frontend/components/page.cljs @@ -447,7 +447,7 @@ (page-mouse-leave e *control-show?))} (page-blocks-collapse-control title *control-show? *all-collapsed?)]) (when-not whiteboard? - [:div.ls-page-title.flex-1.flex.items-center.sm:mb-8.mb-8 + [:div.flex-1.flex.items-center.sm:mb-8.mb-8.w-full.ls-page-title. (page-title page-name icon title format fmt-journal?) (page-menu/page-actions-dropdown nil)]) (when (not config/publishing?) From 9ead5be4600006db9a5c173b18242a90db01da29 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Thu, 3 Aug 2023 15:42:27 +0300 Subject: [PATCH 21/32] fix: keyboard shortcuts --- src/main/frontend/components/content.cljs | 4 ++-- src/main/frontend/extensions/tldraw.cljs | 2 +- src/main/frontend/ui.cljs | 2 +- .../tldraw-logseq/src/components/ContextMenu/ContextMenu.tsx | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/frontend/components/content.cljs b/src/main/frontend/components/content.cljs index 29eaca88f62a..037821c72bc9 100644 --- a/src/main/frontend/components/content.cljs +++ b/src/main/frontend/components/content.cljs @@ -185,7 +185,7 @@ {:key "Open in sidebar" :on-click (fn [_e] (editor-handler/open-block-in-sidebar! block-id)) - :shortcut ["⇧" "click"]} + :shortcut ["⇧+click"]} (t :content/open-in-sidebar)) [:hr.menu-separator] @@ -306,7 +306,7 @@ (state/get-current-repo) block-ref-id :block-ref)) - :shortcut ["⇧" "click"]} + :shortcut ["⇧+click"]} (t :content/open-in-sidebar)) (ui/menu-link {:key "copy" diff --git a/src/main/frontend/extensions/tldraw.cljs b/src/main/frontend/extensions/tldraw.cljs index 7c98994c0431..85fa0814c967 100644 --- a/src/main/frontend/extensions/tldraw.cljs +++ b/src/main/frontend/extensions/tldraw.cljs @@ -80,7 +80,7 @@ (rum/defc keyboard-shortcut [props] - (let [shortcut (shortcut-helper/gen-shortcut-seq (keyword (gobj/get props "action")))] + (let [shortcut (ui/keyboard-shortcut-from-config (keyword (gobj/get props "action")))] (ui/render-keyboard-shortcut shortcut))) (def tldraw-renderers {:Page page-cp diff --git a/src/main/frontend/ui.cljs b/src/main/frontend/ui.cljs index 8ed62791dc64..c9fff87ddcf3 100644 --- a/src/main/frontend/ui.cljs +++ b/src/main/frontend/ui.cljs @@ -163,7 +163,7 @@ (-> sequence ;; turn string into sequence (string/trim) (string/lower-case) - (string/split #" |\+")) + (string/split #" ")) sequence)] [:span.keyboard-shortcut (map-indexed (fn [i key] diff --git a/tldraw/apps/tldraw-logseq/src/components/ContextMenu/ContextMenu.tsx b/tldraw/apps/tldraw-logseq/src/components/ContextMenu/ContextMenu.tsx index 95ecf2c615b3..cd48bb453ebf 100644 --- a/tldraw/apps/tldraw-logseq/src/components/ContextMenu/ContextMenu.tsx +++ b/tldraw/apps/tldraw-logseq/src/components/ContextMenu/ContextMenu.tsx @@ -204,7 +204,7 @@ export const ContextMenu = observer(function ContextMenu({ {t('whiteboard/paste')}
- {MOD_KEY} v + {MOD_KEY}+v
@@ -217,7 +217,7 @@ export const ContextMenu = observer(function ContextMenu({ {t('whiteboard/paste-as-link')}
- {MOD_KEY} v + {MOD_KEY}+⇧+v
From b1025c5b08dfa6963ca4d2d0d09bf737b69e0691 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Thu, 3 Aug 2023 16:37:49 +0300 Subject: [PATCH 22/32] fix: shortcuts --- src/main/frontend/extensions/tldraw.cljs | 4 +++- src/main/frontend/ui.cljs | 5 ++--- .../tldraw-logseq/src/components/ToolButton/ToolButton.tsx | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/frontend/extensions/tldraw.cljs b/src/main/frontend/extensions/tldraw.cljs index 85fa0814c967..5efbc7f73259 100644 --- a/src/main/frontend/extensions/tldraw.cljs +++ b/src/main/frontend/extensions/tldraw.cljs @@ -81,7 +81,9 @@ (rum/defc keyboard-shortcut [props] (let [shortcut (ui/keyboard-shortcut-from-config (keyword (gobj/get props "action")))] - (ui/render-keyboard-shortcut shortcut))) + (cond + (string? shortcut) (ui/render-keyboard-shortcut shortcut) + :else (interpose " | " (map ui/render-keyboard-shortcut shortcut))))) (def tldraw-renderers {:Page page-cp :Block block-cp diff --git a/src/main/frontend/ui.cljs b/src/main/frontend/ui.cljs index c9fff87ddcf3..0101f550fe7c 100644 --- a/src/main/frontend/ui.cljs +++ b/src/main/frontend/ui.cljs @@ -568,9 +568,8 @@ (defn keyboard-shortcut-from-config [shortcut-name] (let [default-binding (:binding (get shortcut-config/all-default-keyboard-shortcuts shortcut-name)) - custom-binding (when (state/shortcuts) (get (state/shortcuts) shortcut-name)) - binding (or custom-binding default-binding)] - (shortcut-helper/decorate-binding binding))) + custom-binding (when (state/shortcuts) (get (state/shortcuts) shortcut-name))] + (or custom-binding default-binding))) (rum/defc modal-overlay [state close-fn close-backdrop?] diff --git a/tldraw/apps/tldraw-logseq/src/components/ToolButton/ToolButton.tsx b/tldraw/apps/tldraw-logseq/src/components/ToolButton/ToolButton.tsx index e34c1fa5df69..f7e0377594ee 100644 --- a/tldraw/apps/tldraw-logseq/src/components/ToolButton/ToolButton.tsx +++ b/tldraw/apps/tldraw-logseq/src/components/ToolButton/ToolButton.tsx @@ -22,13 +22,13 @@ export const ToolButton = observer( // Tool must exist const Tool = [...app.Tools, TLSelectTool, TLMoveTool]?.find(T => T.id === id) - const shortcuts = (Tool as any)?.['shortcut'] + const shortcut = (Tool as any)?.['shortcut'] const tooltipContent = - shortcuts && tooltip ? ( + shortcut && tooltip ? (
{tooltip} - +
) : ( tooltip From 7fb2d7e040cf5a3f9abaf59503d59085a9096cd7 Mon Sep 17 00:00:00 2001 From: charlie Date: Fri, 4 Aug 2023 13:07:24 +0800 Subject: [PATCH 23/32] fix(pdf): highlights text layer is overlaid by the pdfjs built-in annotation layer --- src/main/frontend/extensions/pdf/pdf.css | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/main/frontend/extensions/pdf/pdf.css b/src/main/frontend/extensions/pdf/pdf.css index 215087f2a523..56033e11b446 100644 --- a/src/main/frontend/extensions/pdf/pdf.css +++ b/src/main/frontend/extensions/pdf/pdf.css @@ -1000,11 +1000,6 @@ html.is-system-window { } .annotationLayer { - position: absolute; - top: 0; - - z-index: 3; - .highlightAnnotation, .underlineAnnotation { display: none; } From 53c11c5c53df731c34ae4c852b80929a3554e8cd Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Fri, 4 Aug 2023 11:17:17 +0300 Subject: [PATCH 24/32] remove unused require --- src/main/frontend/extensions/tldraw.cljs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/frontend/extensions/tldraw.cljs b/src/main/frontend/extensions/tldraw.cljs index 5efbc7f73259..a77617e9d8d7 100644 --- a/src/main/frontend/extensions/tldraw.cljs +++ b/src/main/frontend/extensions/tldraw.cljs @@ -12,7 +12,6 @@ [frontend.handler.route :as route-handler] [frontend.handler.whiteboard :as whiteboard-handler] [frontend.handler.history :as history] - [frontend.modules.shortcut.data-helper :as shortcut-helper] [frontend.rum :as r] [frontend.search :as search] [frontend.state :as state] From f46adbbfa32b03c7bbd683661ba89c0114c994c6 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Fri, 4 Aug 2023 13:38:00 +0300 Subject: [PATCH 25/32] fix padding and color level --- src/main/frontend/components/container.cljs | 5 ++--- src/main/frontend/components/container.css | 6 +----- src/main/frontend/components/page.cljs | 4 ++-- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/main/frontend/components/container.cljs b/src/main/frontend/components/container.cljs index 1fdb57d4633c..b5b7019f2ec4 100644 --- a/src/main/frontend/components/container.cljs +++ b/src/main/frontend/components/container.cljs @@ -525,9 +525,8 @@ (when show-action-bar? (action-bar/action-bar)) - [:div.rounded-xl.cp__sidebar-main-content.relative - {:class (when-not (contains? #{:whiteboard :whiteboards :graph :all-journals} route-name) "color-level") - :data-is-margin-less-pages margin-less-pages? + [:div.cp__sidebar-main-content + {:data-is-margin-less-pages margin-less-pages? :data-is-full-width (or margin-less-pages? (contains? #{:all-files :all-pages :my-publishing} route-name))} diff --git a/src/main/frontend/components/container.css b/src/main/frontend/components/container.css index fb52590c713d..30b3053cb599 100644 --- a/src/main/frontend/components/container.css +++ b/src/main/frontend/components/container.css @@ -505,11 +505,7 @@ html[data-theme='dark'] { } .cp__sidebar-main-content { - @apply w-full h-fit p-6 sm:p-12; - - body[data-page=whiteboard] & { - @apply h-auto p-0; - } + @apply w-full h-fit; max-width: var(--ls-main-content-max-width); flex: 1; diff --git a/src/main/frontend/components/page.cljs b/src/main/frontend/components/page.cljs index ee8e0981b111..baec19416773 100644 --- a/src/main/frontend/components/page.cljs +++ b/src/main/frontend/components/page.cljs @@ -424,7 +424,7 @@ *all-collapsed? (::all-collapsed? state) *current-block-page (::current-page state) block-or-whiteboard? (or block? whiteboard?)] - [:div.flex-1.page.relative + [:div.flex-1.relative.p-6.sm:p-12.rounded-xl.color-level.page (merge (if (seq (:block/tags page)) (let [page-names (model/get-page-names-by-ids (map :db/id (:block/tags page)))] {:data-page-tags (text-util/build-data-value page-names)}) @@ -946,7 +946,7 @@ (reset! *pages nil) (reset! *current-page 1))] - [:div.flex-1.cp__all_pages + [:div.flex-1.cp__all_pages.relative.p-6.sm:p-12.rounded-xl.color-level.page [:h1.title (t :all-pages)] [:div.text-sm.opacity-70 (t :paginates/pages total-items)] From 2fc29109e9769231c18e500ec33232ea0eecec0c Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Fri, 4 Aug 2023 13:38:29 +0300 Subject: [PATCH 26/32] add page menus to whiteboards' dashboard --- src/main/frontend/components/page_menu.cljs | 2 +- src/main/frontend/components/whiteboard.cljs | 61 ++++++++++---------- src/main/frontend/components/whiteboard.css | 4 +- 3 files changed, 34 insertions(+), 33 deletions(-) diff --git a/src/main/frontend/components/page_menu.cljs b/src/main/frontend/components/page_menu.cljs index 218eb338dc5a..30729f135465 100644 --- a/src/main/frontend/components/page_menu.cljs +++ b/src/main/frontend/components/page_menu.cljs @@ -136,7 +136,7 @@ {:title (t :page/open-with-default-app) :options {:on-click #(js/window.apis.openPath file-fpath)}}])) - (when (or (state/get-current-page) whiteboard?) + (when (or (state/get-current-page) (and whiteboard? (not (state/whiteboard-dashboard?)))) {:title (t :export-page) :options {:on-click #(state/set-modal! (fn [] diff --git a/src/main/frontend/components/whiteboard.cljs b/src/main/frontend/components/whiteboard.cljs index fe38487b4620..e1aa011cd12d 100644 --- a/src/main/frontend/components/whiteboard.cljs +++ b/src/main/frontend/components/whiteboard.cljs @@ -152,35 +152,36 @@ (rum/defc dashboard-preview-card [page-name {:keys [checked on-checked-change show-checked?]}] - [:div.dashboard-card.dashboard-preview-card.cursor-pointer.hover:shadow-lg - {:data-checked checked - :style {:filter (if (and show-checked? (not checked)) "opacity(0.5)" "none")} - :on-click - (fn [e] - (util/stop e) - (if show-checked? - (on-checked-change (not checked)) - (route-handler/redirect-to-whiteboard! page-name)))} - [:div.dashboard-card-title - [:div.flex.w-full.items-center - [:div.dashboard-card-title-name.font-bold - (if (model/untitled-page? page-name) - [:span.opacity-50 (t :untitled)] - (get-page-display-name page-name))] - [:div.flex-1] - [:div.dashboard-card-checkbox - {:tab-index -1 - :style {:visibility (when show-checked? "visible")} - :on-click util/stop-propagation} - (ui/checkbox {:checked checked - :on-change (fn [] (on-checked-change (not checked)))})]] - [:div.flex.w-full.opacity-50 - [:div (get-page-human-update-time page-name)] - [:div.flex-1] - (references-count page-name nil {:hover? true})]] - (ui/lazy-visible - (fn [] [:div.p-4.h-64.flex.justify-center - (tldraw-preview page-name)]))]) + (let [redirect-to-whiteboard (fn [e] + (util/stop e) + (if show-checked? + (on-checked-change (not checked)) + (route-handler/redirect-to-whiteboard! page-name)))] + [:div.dashboard-card.dashboard-preview-card.hover:shadow-lg + {:data-checked checked + :style {:filter (if (and show-checked? (not checked)) "opacity(0.5)" "none")}} + [:div.dashboard-card-title + [:div.flex.w-full.items-center + [:div.font-bold.cursor-pointer.dashboard-card-title-name + {:on-click redirect-to-whiteboard} + (if (model/untitled-page? page-name) + [:span.opacity-50 (t :untitled)] + (get-page-display-name page-name))] + [:.mx-2.flex-1 (references-count page-name nil {:hover? true})] + (page-menu/page-actions-dropdown page-name)] + [:div.flex.w-full.opacity-50 + [:div.flex-1 (get-page-human-update-time page-name)] + [:div.dashboard-card-checkbox + {:tab-index -1 + :style {:visibility (when show-checked? "visible")} + :on-click util/stop-propagation} + (ui/checkbox {:checked checked + :on-change (fn [] (on-checked-change (not checked)))})]]] + [:div.cursor-pointer + {:on-click redirect-to-whiteboard} + (ui/lazy-visible + (fn [] [:div.p-4.h-64.flex.justify-center + (tldraw-preview page-name)]))]])) (rum/defc dashboard-create-card [] @@ -211,7 +212,7 @@ (inc total-whiteboards)) [checked-page-names set-checked-page-names] (rum/use-state #{}) has-checked? (not-empty checked-page-names)] - [:<> + [:.p-6.sm:p-12 [:h1.select-none.flex.items-center.whiteboard-dashboard-title.title [:div (t :all-whiteboards) [:span.opacity-50 diff --git a/src/main/frontend/components/whiteboard.css b/src/main/frontend/components/whiteboard.css index 041125796bb5..08333e4a6851 100644 --- a/src/main/frontend/components/whiteboard.css +++ b/src/main/frontend/components/whiteboard.css @@ -18,7 +18,7 @@ h1.title.whiteboard-dashboard-title { } .dashboard-card { - @apply rounded-lg flex flex-col gap-1 overflow-hidden font-medium; + @apply rounded-lg flex flex-col gap-1 font-medium; height: 300px; .dashboard-card-checkbox { @@ -27,7 +27,7 @@ h1.title.whiteboard-dashboard-title { visibility: hidden; width: 24px; height: 24px; - transform: translateX(4px); + margin-right: 3px; &:focus-within { border-color: var(--ls-border-color); From 74b1c380865b4e76554f23b6db8e68eafb150ed5 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Fri, 4 Aug 2023 13:40:52 +0300 Subject: [PATCH 27/32] overflow fix --- src/main/frontend/components/whiteboard.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/frontend/components/whiteboard.cljs b/src/main/frontend/components/whiteboard.cljs index e1aa011cd12d..bca87c260119 100644 --- a/src/main/frontend/components/whiteboard.cljs +++ b/src/main/frontend/components/whiteboard.cljs @@ -177,7 +177,7 @@ :on-click util/stop-propagation} (ui/checkbox {:checked checked :on-change (fn [] (on-checked-change (not checked)))})]]] - [:div.cursor-pointer + [:div.cursor-pointer.overflow-hidden {:on-click redirect-to-whiteboard} (ui/lazy-visible (fn [] [:div.p-4.h-64.flex.justify-center From e3ed6f5b7af3fb8bad578789af31b1862544458d Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Fri, 4 Aug 2023 14:24:26 +0300 Subject: [PATCH 28/32] revert dict changes --- src/resources/dicts/de.edn | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/resources/dicts/de.edn b/src/resources/dicts/de.edn index b9a176ae197c..bf9d862de5e3 100644 --- a/src/resources/dicts/de.edn +++ b/src/resources/dicts/de.edn @@ -83,7 +83,7 @@ :asset/show-in-folder "Bild im Ordner anzeigen" :block/name "Seitenname" - + :bug-report/main-title "Bug melden" :bug-report/clipboard-inspector-title "Untersuchung der Zwischenablage" :bug-report/main-desc "Können Sie uns mit einer Fehlermeldung helfen? Wir werden es schnellstmöglich beheben." @@ -192,7 +192,7 @@ :graph/save "Speichern..." :graph/save-error "Speichern fehlgeschlagen" :graph/save-success "Erfolgreich gespeichert" - + :header/go-back "Zurück" :header/go-forward "Vorwärts" :header/more "Weitere Optionen" @@ -388,7 +388,7 @@ :plugin.install-from-file/title "Plugins aus plugins.edn installieren" :plugin.install-from-file/notice "Die folgenden Plugins werden Ihre Plugins ersetzen:" :plugin.install-from-file/success "Alle Plugins installiert!" - + :query/config-property-settings "Einstellungen für diese Query:" :right-side-bar/all-pages "Alle Seiten" @@ -408,9 +408,9 @@ :right-side-bar/show-journals "Zeige Journale" :right-side-bar/switch-theme "Zu {1} Thema wechseln" :right-side-bar/toggle-right-sidebar "Rechte Seitenleiste umschalten" - + :select/default-select-multiple "Ein oder mehrere auswählen" - + :settings-page/app-updated "Ihre Version ist aktuell 🎉" :settings-page/auto-expand-block-refs "Automatisch beim Heranzoomen Blockreferenzen erweitern..." :settings-page/auto-expand-block-refs-tip "Diese Option steuert, ob Blockreferenzen beim Heranzoomen automatisch ausgeklappt werden." @@ -439,9 +439,9 @@ :settings-page/update-available "Neue Version gefunden: " :settings-page/update-error-1 "⚠️ Ups, Etwas ist schiefgelaufen!" :settings-page/update-error-2 " Überprüfen Sie den " - + :settings-permission/start-granting "Erlauben" - + :tips/all-done "Alles erledigt!" :tutorial/text #resource "tutorials/tutorial-de.md" @@ -536,7 +536,7 @@ :whiteboard/zoom-in "Heranzoomen" :whiteboard/zoom-out "Herauszoomen" :whiteboard/zoom-to-fit "Zoom an Zeichnung anpassen" - + :window/minimize "Minimieren" :window/maximize "Maximieren" :window/restore "Wiederherstellen" From a9dbd25deefea324913f2644d9eaa04473b03cd7 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Fri, 4 Aug 2023 14:29:05 +0300 Subject: [PATCH 29/32] overflow fix --- src/main/frontend/components/page.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/frontend/components/page.cljs b/src/main/frontend/components/page.cljs index baec19416773..51ab42cffe26 100644 --- a/src/main/frontend/components/page.cljs +++ b/src/main/frontend/components/page.cljs @@ -447,7 +447,7 @@ (page-mouse-leave e *control-show?))} (page-blocks-collapse-control title *control-show? *all-collapsed?)]) (when-not whiteboard? - [:div.flex-1.flex.items-center.sm:mb-8.mb-8.w-full.ls-page-title. + [:div.flex-1.flex.items-center.sm:mb-8.mb-8.w-full.overflow-hidden.ls-page-title (page-title page-name icon title format fmt-journal?) (page-menu/page-actions-dropdown nil)]) (when (not config/publishing?) From 22a68e90cb4c87455ec1778071ee8ae762860511 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Fri, 4 Aug 2023 14:32:55 +0300 Subject: [PATCH 30/32] revert margin bottom changes --- src/main/frontend/components/container.cljs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/frontend/components/container.cljs b/src/main/frontend/components/container.cljs index b5b7019f2ec4..8c073f329952 100644 --- a/src/main/frontend/components/container.cljs +++ b/src/main/frontend/components/container.cljs @@ -551,7 +551,11 @@ :else [:div - {:class (if (or onboarding-and-home? margin-less-pages?) "" (util/hiccup->class "mx-auto"))} + {:class (if (or onboarding-and-home? margin-less-pages?) "" (util/hiccup->class "mx-auto.pb-24")) + :style {:margin-bottom (cond + margin-less-pages? 0 + onboarding-and-home? 0 + :else 120)}} main-content]) (when onboarding-and-home? From 261067220b987c75bb14727c991ccb39faa00f74 Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Fri, 4 Aug 2023 14:39:27 +0300 Subject: [PATCH 31/32] overflow fix --- src/main/frontend/components/page.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/frontend/components/page.cljs b/src/main/frontend/components/page.cljs index 51ab42cffe26..5dfebe1aa222 100644 --- a/src/main/frontend/components/page.cljs +++ b/src/main/frontend/components/page.cljs @@ -310,7 +310,7 @@ (date/journal-title->custom-format title) title)) old-name (or title page-name)] - [:h1.page-title.flex.cursor-pointer.gap-1.w-full + [:h1.page-title.flex.cursor-pointer.gap-1.w-full.overflow-hidden {:class (when-not whiteboard-page? "title") :on-mouse-down (fn [e] (when (util/right-click? e) @@ -447,7 +447,7 @@ (page-mouse-leave e *control-show?))} (page-blocks-collapse-control title *control-show? *all-collapsed?)]) (when-not whiteboard? - [:div.flex-1.flex.items-center.sm:mb-8.mb-8.w-full.overflow-hidden.ls-page-title + [:div.flex-1.flex.items-center.sm:mb-8.mb-8.w-full.ls-page-title (page-title page-name icon title format fmt-journal?) (page-menu/page-actions-dropdown nil)]) (when (not config/publishing?) From baa774cea61b8ddb9a0e29e342addf0a94a6c34f Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Fri, 4 Aug 2023 19:37:26 +0300 Subject: [PATCH 32/32] title margin fix --- src/main/frontend/components/whiteboard.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/frontend/components/whiteboard.cljs b/src/main/frontend/components/whiteboard.cljs index bca87c260119..b05e75f88c97 100644 --- a/src/main/frontend/components/whiteboard.cljs +++ b/src/main/frontend/components/whiteboard.cljs @@ -213,7 +213,7 @@ [checked-page-names set-checked-page-names] (rum/use-state #{}) has-checked? (not-empty checked-page-names)] [:.p-6.sm:p-12 - [:h1.select-none.flex.items-center.whiteboard-dashboard-title.title + [:h1.select-none.flex.items-center.mb-6.whiteboard-dashboard-title.title [:div (t :all-whiteboards) [:span.opacity-50 (str " · " total-whiteboards)]]