diff --git a/src/main/frontend/components/datetime.cljs b/src/main/frontend/components/datetime.cljs index 0c82c95a1a..a27642a6cf 100644 --- a/src/main/frontend/components/datetime.cljs +++ b/src/main/frontend/components/datetime.cljs @@ -46,7 +46,7 @@ (let [show? (rum/react *show-repeater?)] (if (or show? (and num duration kind)) [:div.w.full.flex.flex-row.justify-left - [:input#repeater-num.form-input.mt-1.w-8.px-1.sm:w-20.sm:px-2.text-center + [:input#repeater-num.form-input.w-8.mr-2.px-1.sm:w-20.sm:px-2.text-center {:default-value num :on-change (fn [event] (let [value (util/evalue event)] @@ -66,7 +66,7 @@ (swap! *timestamp assoc-in [:repeater :duration] value)) nil) - [:a.ml-1.self-center {:on-click (fn [] + [:a.ml-2.self-center {:on-click (fn [] (reset! *show-repeater? false) (swap! *timestamp assoc :repeater {}))} svg/close]] diff --git a/src/main/frontend/components/page.cljs b/src/main/frontend/components/page.cljs index 6484437179..5e09a8e44d 100644 --- a/src/main/frontend/components/page.cljs +++ b/src/main/frontend/components/page.cljs @@ -37,7 +37,9 @@ [logseq.graph-parser.util :as gp-util] [medley.core :as medley] [reitit.frontend.easy :as rfe] - [rum.core :as rum])) + [rum.core :as rum] + [logseq.graph-parser.util.page-ref :as page-ref] + [logseq.graph-parser.mldoc :as gp-mldoc])) (defn- get-page-name [state] @@ -295,7 +297,8 @@ (assoc state ::title-value (atom (nth (:rum/args state) 2))))} [state page-name icon title _format fmt-journal?] (when title - (let [*title-value (get state ::title-value) + (let [page (when page-name (db/entity [:block/name page-name])) + *title-value (get state ::title-value) *edit? (get state ::edit?) *input-value (get state ::input-value) repo (state/get-current-repo) @@ -304,7 +307,9 @@ untitled? (and whiteboard-page? (parse-uuid page-name)) ;; normal page cannot be untitled right? title (if hls-page? [:a.asset-ref (pdf-utils/fix-local-asset-pagename title)] - (if fmt-journal? (date/journal-title->custom-format title) title)) + (if fmt-journal? + (date/journal-title->custom-format title) + title)) old-name (or title page-name)] [:h1.page-title.flex.cursor-pointer.gap-1.w-full {:class (when-not whiteboard-page? "title") @@ -312,16 +317,16 @@ (when (util/right-click? e) (state/set-state! :page-title/context {:page page-name}))) :on-click (fn [e] - (.preventDefault e) - (if (gobj/get e "shiftKey") - (when-let [page (db/pull repo '[*] [:block/name page-name])] - (state/sidebar-add-block! - repo - (:db/id page) - :page)) - (when (and (not hls-page?) (not fmt-journal?) (not config/publishing?)) - (reset! *input-value (if untitled? "" old-name)) - (reset! *edit? true))))} + (.preventDefault e) + (if (gobj/get e "shiftKey") + (when-let [page (db/pull repo '[*] [:block/name page-name])] + (state/sidebar-add-block! + repo + (:db/id page) + :page)) + (when (and (not hls-page?) (not fmt-journal?) (not config/publishing?)) + (reset! *input-value (if untitled? "" old-name)) + (reset! *edit? true))))} (when (not= icon "") [:span.page-icon icon]) [:div.page-title-sizer-wrapper.relative (when @*edit? @@ -337,9 +342,13 @@ {:data-value @*input-value :data-ref page-name :style {:opacity (when @*edit? 0)}} - (cond @*edit? [:span {:style {:white-space "pre"}} (rum/react *input-value)] - untitled? [:span.opacity-50 (t :untitled)] - :else title)]]]))) + (let [nested? (and (string/includes? title page-ref/left-brackets) + (string/includes? title page-ref/right-brackets))] + (cond @*edit? [:span {:style {:white-space "pre"}} (rum/react *input-value)] + untitled? [:span.opacity-50 (t :untitled)] + nested? (component-block/map-inline {} (gp-mldoc/inline->edn title (gp-mldoc/default-config + (:block/format page)))) + :else title))]]]))) (defn- page-mouse-over [e *control-show? *all-collapsed?] diff --git a/src/main/frontend/components/page.css b/src/main/frontend/components/page.css index 43ff0d6f57..a0bbc5df8a 100644 --- a/src/main/frontend/components/page.css +++ b/src/main/frontend/components/page.css @@ -276,7 +276,7 @@ a.page-title { } > .title { - @apply w-full pointer-events-none overflow-hidden overflow-ellipsis; + @apply w-full overflow-hidden overflow-ellipsis; } .edit-input { diff --git a/src/main/frontend/dicts.cljc b/src/main/frontend/dicts.cljc index 0c4d181640..5869b543b0 100644 --- a/src/main/frontend/dicts.cljc +++ b/src/main/frontend/dicts.cljc @@ -4518,6 +4518,7 @@ :content/open-in-sidebar "Kenar çubuğunda aç" :content/click-to-edit "Düzenlemek için tıklayın" :context-menu/make-a-flashcard "Bilgi Kartı Oluştur" + :context-menu/toggle-number-list "Numaralı liste olarak değiştir" :context-menu/preview-flashcard "Bilgi Kartını Önizle" :context-menu/make-a-template "Bir Şablon Oluştur" :context-menu/input-template-name "Şablonun adı nedir?" diff --git a/src/main/frontend/handler/editor.cljs b/src/main/frontend/handler/editor.cljs index a160eb1b67..a42434a931 100644 --- a/src/main/frontend/handler/editor.cljs +++ b/src/main/frontend/handler/editor.cljs @@ -3118,7 +3118,7 @@ (state/selection?) (shortcut-delete-selection e) - (whiteboard?) + (and (whiteboard?) (not (state/editing?))) (.deleteShapes (.-api ^js (state/active-tldraw-app))) :else diff --git a/src/main/frontend/handler/paste.cljs b/src/main/frontend/handler/paste.cljs index 2ae65968b8..90cdef121c 100644 --- a/src/main/frontend/handler/paste.cljs +++ b/src/main/frontend/handler/paste.cljs @@ -84,7 +84,9 @@ ;; See https://developer.chrome.com/blog/web-custom-formats-for-the-async-clipboard-api/ ;; for a similar example (defn get-copied-blocks [] - (p/let [clipboard-items (when (and js/window (gobj/get js/window "navigator") js/navigator.clipboard) + ;; NOTE: Avoid using navigator clipboard API on Android, it will report a permission error + (p/let [clipboard-items (when (and (not (mobile-util/native-android?)) + js/window (gobj/get js/window "navigator") js/navigator.clipboard) (js/navigator.clipboard.read)) blocks-blob ^js (when clipboard-items (let [types (.-types ^js (first clipboard-items))] diff --git a/src/main/frontend/modules/shortcut/dicts.cljc b/src/main/frontend/modules/shortcut/dicts.cljc index 8cedcb23a5..5ebbd48586 100644 --- a/src/main/frontend/modules/shortcut/dicts.cljc +++ b/src/main/frontend/modules/shortcut/dicts.cljc @@ -1695,6 +1695,7 @@ :shortcut.category/block-command-editing "Blok düzenleme komutuları" :shortcut.category/block-selection "Blok seçimi (seçimden çıkmak için Esc tuşuna basın)" :shortcut.category/toggle "Aç/Kapat" + :shortcut.category/whiteboard "Beyaz tahta" :shortcut.category/others "Diğer" :command.date-picker/complete "Tarih seçici: Seçilen günü seç" :command.date-picker/prev-day "Tarih seçici: Önceki günü seç" @@ -1767,6 +1768,31 @@ :command.editor/zoom-in "Düzenlenen bloğu yakınlaştır / Aksi takdirde ileri git" :command.editor/zoom-out "Düzenlenen bloğu uzaklaştır / Aksi takdirde geri git" :command.editor/toggle-undo-redo-mode "Geri alma / yineleme modunu değiştir (yalnızca sayfa veya genel)" + :command.editor/toggle-number-list "Numaralı liste olarak değiştir" + :command.whiteboard/select "Seçim aracı" + :command.whiteboard/pan "Kaydırma aracı" + :command.whiteboard/portal "Portal aracı" + :command.whiteboard/pencil "Kalem aracı" + :command.whiteboard/highlighter "Vurgulayıcı aracı" + :command.whiteboard/eraser "Silgi aracı" + :command.whiteboard/connector "Bağlayıcı aracı" + :command.whiteboard/text "Metin aracı" + :command.whiteboard/rectangle "Dikdörtgen aracı" + :command.whiteboard/ellipse "Elips aracı" + :command.whiteboard/reset-zoom "Yakınlaştırmayı sıfırla" + :command.whiteboard/zoom-to-fit "Çizimi yakınlaştır" + :command.whiteboard/zoom-to-selection "Seçimi sığacak kadar yakınlaştır" + :command.whiteboard/zoom-out "Uzaklaştır" + :command.whiteboard/zoom-in "Yakınlaştır" + :command.whiteboard/send-backward "Geriye git" + :command.whiteboard/send-to-back "Geriye taşı" + :command.whiteboard/bring-forward "İleriye git" + :command.whiteboard/bring-to-front "Öne taşı" + :command.whiteboard/lock "Seçimi kilitle" + :command.whiteboard/unlock "Seçimin Kilidini aç" + :command.whiteboard/group "Seçimi gruplandır" + :command.whiteboard/ungroup "Seçimi gruptan çıkar" + :command.whiteboard/toggle-grid "Tuval ızgarasını değiştir" :command.ui/toggle-brackets "Köşeli ayraçların görüntülenip görüntülenmeyeceğini değiştir" :command.go/search-in-page "Geçerli sayfada ara" :command.go/electron-find-in-page "Sayfada bul" diff --git a/src/main/frontend/schema/handler/common_config.cljc b/src/main/frontend/schema/handler/common_config.cljc index 4aae6697a8..15d96da531 100644 --- a/src/main/frontend/schema/handler/common_config.cljc +++ b/src/main/frontend/schema/handler/common_config.cljc @@ -62,6 +62,7 @@ :string]] [:ref/default-open-blocks-level :int] [:ref/linked-references-collapsed-threshold :int] + [:graph/settings [:map-of :keyword :boolean]] [:favorites [:vector :string]] ;; There isn't a :float yet [:srs/learning-fraction float?] diff --git a/templates/config.edn b/templates/config.edn index ec213b7bfc..e6f083f3d2 100644 --- a/templates/config.edn +++ b/templates/config.edn @@ -283,6 +283,14 @@ ;; Default value: 100 :ref/linked-references-collapsed-threshold 50 + ;; Graph view configuration. + ;; Example usage: + ;; :graph/settings + ;; {:orphan-pages? true ; Default value: true + ;; :builtin-pages? false ; Default value: false + ;; :excluded-pages? false ; Default value: false + ;; :journal? false} ; Default value: false + ;; Favorites to list on the left sidebar :favorites [] @@ -362,7 +370,6 @@ ;; You can also reorder them or use only one or two of them in the template. ;; You can also insert or format any text in the template, as shown in the following examples. ;; :quick-capture-templates - ;; :quick-capture-templates ;; {:text "[[quick capture]] **{time}**: {text} from {url}" ;; :media "[[quick capture]] **{time}**: {url}"} @@ -375,7 +382,6 @@ ;; :redirect-page? false ;; Default value: false ;; :default-page "quick capture"} ;; Default page: "quick capture" - ;; File sync options ;; Ignore these files when syncing, regexp is supported. ;; :file-sync/ignore-files [] diff --git a/tldraw/apps/tldraw-logseq/src/components/inputs/SelectInput.tsx b/tldraw/apps/tldraw-logseq/src/components/inputs/SelectInput.tsx index be24bb2a8f..f992d16aa1 100644 --- a/tldraw/apps/tldraw-logseq/src/components/inputs/SelectInput.tsx +++ b/tldraw/apps/tldraw-logseq/src/components/inputs/SelectInput.tsx @@ -56,6 +56,7 @@ export function SelectInput({ position="popper" sideOffset={14} align="center" + onKeyDown={e => e.stopPropagation()} >