mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
Merge branch 'master' into enhance/keymaps-manager-x
This commit is contained in:
@@ -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]]
|
||||
|
||||
@@ -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?]
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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?"
|
||||
|
||||
@@ -3118,7 +3118,7 @@
|
||||
(state/selection?)
|
||||
(shortcut-delete-selection e)
|
||||
|
||||
(whiteboard?)
|
||||
(and (whiteboard?) (not (state/editing?)))
|
||||
(.deleteShapes (.-api ^js (state/active-tldraw-app)))
|
||||
|
||||
:else
|
||||
|
||||
@@ -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))]
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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?]
|
||||
|
||||
Reference in New Issue
Block a user