mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
Merge branch 'master' into enhance/ios-folder-picker
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
[electron.search :as search]
|
||||
[electron.updater :refer [init-updater] :as updater]
|
||||
[electron.utils :refer [*win mac? linux? dev? get-win-from-sender restore-user-fetch-agent
|
||||
decode-protected-assets-schema-path get-graph-name send-to-renderer]]
|
||||
decode-protected-assets-schema-path get-graph-name send-to-renderer]
|
||||
:as utils]
|
||||
[electron.url :refer [logseq-url-handler]]
|
||||
[electron.logger :as logger]
|
||||
[clojure.string :as string]
|
||||
@@ -20,7 +21,7 @@
|
||||
[electron.git :as git]
|
||||
[electron.window :as win]
|
||||
[electron.exceptions :as exceptions]
|
||||
["/electron/utils" :as utils]))
|
||||
["/electron/utils" :as js-utils]))
|
||||
|
||||
;; Keep same as main/frontend.util.url
|
||||
(defonce LSP_SCHEME "logseq")
|
||||
@@ -301,7 +302,7 @@
|
||||
|
||||
(restore-user-fetch-agent)
|
||||
|
||||
(utils/disableXFrameOptions win)
|
||||
(js-utils/disableXFrameOptions win)
|
||||
|
||||
(search/ensure-search-dir!)
|
||||
|
||||
|
||||
@@ -375,6 +375,8 @@
|
||||
(rum/defc hiccup-content < rum/static
|
||||
(mixins/event-mixin
|
||||
(fn [state]
|
||||
;; fixme: this mixin will register global event listeners on window
|
||||
;; which might cause unexpected issues
|
||||
(mixins/listen state js/window "contextmenu"
|
||||
(fn [e]
|
||||
(let [target (gobj/get e "target")
|
||||
|
||||
@@ -287,19 +287,19 @@
|
||||
old-name (or title page-name)]
|
||||
[:h1.page-title.flex.cursor-pointer.gap-1.w-full
|
||||
{:on-mouse-down (fn [e]
|
||||
(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?))
|
||||
(reset! *input-value (if untitled? "" old-name))
|
||||
(reset! *edit? true))))}
|
||||
(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?))
|
||||
(reset! *input-value (if untitled? "" old-name))
|
||||
(reset! *edit? true))))}
|
||||
(when (not= icon "") [:span.page-icon icon])
|
||||
[:div.page-title-sizer-wrapper.relative
|
||||
(when (rum/react *edit?)
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
(ns frontend.components.whiteboard
|
||||
"Whiteboard related components"
|
||||
(:require [cljs.math :as math]
|
||||
[frontend.components.content :as content]
|
||||
[frontend.components.page :as page]
|
||||
[frontend.components.reference :as reference]
|
||||
[frontend.context.i18n :refer [t]]
|
||||
[frontend.db.model :as model]
|
||||
[frontend.handler.common :as common-handler]
|
||||
[frontend.handler.route :as route-handler]
|
||||
[frontend.handler.user :as user-handler]
|
||||
[frontend.handler.whiteboard :as whiteboard-handler]
|
||||
[frontend.rum :refer [use-bounding-client-rect use-click-outside]]
|
||||
[frontend.rum :refer [use-bounding-client-rect use-breakpoint
|
||||
use-click-outside]]
|
||||
[frontend.state :as state]
|
||||
[frontend.ui :as ui]
|
||||
[frontend.util :as util]
|
||||
@@ -93,7 +96,7 @@
|
||||
(util/stop e)
|
||||
(d-open-flag (fn [o] (if (not= o 2) 2 0))))}
|
||||
[:div.open-page-ref-link refs-count]
|
||||
(when render-fn (render-fn open?))]
|
||||
(when render-fn (render-fn open? refs-count))]
|
||||
(reference/block-linked-references block-uuid)
|
||||
open?
|
||||
#(set-open-flag 0))))))
|
||||
@@ -207,39 +210,51 @@
|
||||
:checked (boolean (checked-page-names whiteboard-name))
|
||||
:on-checked-change (fn [checked]
|
||||
(set-checked-page-names (if checked
|
||||
(conj checked-page-names whiteboard-name)
|
||||
(disj checked-page-names whiteboard-name))))})])
|
||||
(conj checked-page-names whiteboard-name)
|
||||
(disj checked-page-names whiteboard-name))))})])
|
||||
(for [n (range empty-cards)]
|
||||
[:div.dashboard-card.dashboard-bg-card {:key n}])]]])
|
||||
[:div "This feature is not publicly available yet."]))
|
||||
|
||||
(rum/defc whiteboard-page
|
||||
[name block-id]
|
||||
[:div.absolute.w-full.h-full.whiteboard-page
|
||||
[page-name block-id]
|
||||
(let [[ref bp] (use-breakpoint)]
|
||||
[:div.absolute.w-full.h-full.whiteboard-page
|
||||
|
||||
;; makes sure the whiteboard will not cover the borders
|
||||
{:key name
|
||||
:style {:padding "0.5px" :z-index 0
|
||||
:transform "translateZ(0)"
|
||||
:text-rendering "geometricPrecision"
|
||||
:-webkit-font-smoothing "subpixel-antialiased"}}
|
||||
;; makes sure the whiteboard will not cover the borders
|
||||
{:key page-name
|
||||
:ref ref
|
||||
:data-breakpoint (name bp)
|
||||
:style {:padding "0.5px" :z-index 0
|
||||
:transform "translateZ(0)"
|
||||
:text-rendering "geometricPrecision"
|
||||
:-webkit-font-smoothing "subpixel-antialiased"}}
|
||||
|
||||
[:div.whiteboard-page-title-root
|
||||
[:span.whiteboard-page-title
|
||||
{:style {:color "var(--ls-primary-text-color)"
|
||||
:user-select "none"}}
|
||||
(page/page-title name
|
||||
[:span.tie.tie-whiteboard
|
||||
{:style {:font-size "0.9em"}}]
|
||||
(get-page-display-name name)
|
||||
nil
|
||||
false)]
|
||||
[:div.whiteboard-page-title-root
|
||||
[:div.whiteboard-page-title
|
||||
{:style {:color "var(--ls-primary-text-color)"
|
||||
:user-select "none"}
|
||||
:on-context-menu (fn [e]
|
||||
(util/stop e)
|
||||
(common-handler/show-custom-context-menu!
|
||||
e
|
||||
(content/page-title-custom-context-menu-content page-name))
|
||||
(state/set-state! :page-title/context nil))}
|
||||
(page/page-title page-name
|
||||
[:span.text-lg
|
||||
(ui/icon "whiteboard" {:extension? true})]
|
||||
(get-page-display-name page-name)
|
||||
nil
|
||||
false)]
|
||||
|
||||
(page-refs-count name
|
||||
"text-md px-3 py-2 cursor-default whiteboard-page-refs-count"
|
||||
(fn [open?] [:<> "References" (ui/icon (if open? "references-hide" "references-show")
|
||||
{:extension? true})]))]
|
||||
(tldraw-app name block-id)])
|
||||
[:div.whiteboard-page-refs
|
||||
(page-refs-count page-name
|
||||
"text-md px-3 py-2 cursor-default whiteboard-page-refs-count"
|
||||
(fn [open? refs-count] [:span.whiteboard-page-refs-count-label
|
||||
(if (> refs-count 1) "References" "Reference")
|
||||
(ui/icon (if open? "references-hide" "references-show")
|
||||
{:extension? true})]))]]
|
||||
(tldraw-app page-name block-id)]))
|
||||
|
||||
(rum/defc whiteboard-route
|
||||
[route-match]
|
||||
|
||||
@@ -125,6 +125,7 @@ input.tl-text-input {
|
||||
}
|
||||
|
||||
.whiteboard-page-refs-count {
|
||||
@apply whitespace-nowrap;
|
||||
border-radius: 8px;
|
||||
background: var(--ls-primary-background-color);
|
||||
}
|
||||
@@ -137,7 +138,7 @@ input.tl-text-input {
|
||||
.whiteboard-page-title-root {
|
||||
@apply shadow-md flex items-center;
|
||||
position: absolute;
|
||||
left: 53px;
|
||||
left: 2.5rem;
|
||||
top: 0;
|
||||
background: var(--ls-primary-background-color);
|
||||
padding: 4px;
|
||||
@@ -148,7 +149,7 @@ input.tl-text-input {
|
||||
}
|
||||
|
||||
.whiteboard-page-title {
|
||||
@apply inline-flex px-2 py-1 w-full;
|
||||
@apply px-2 py-1 flex-1 overflow-ellipsis overflow-hidden;
|
||||
|
||||
font-size: 20px;
|
||||
border-radius: 8px;
|
||||
@@ -161,7 +162,7 @@ input.tl-text-input {
|
||||
}
|
||||
|
||||
.page-title-sizer-wrapper {
|
||||
width: 98%;
|
||||
width: calc(100% - 20px);
|
||||
|
||||
> .title {
|
||||
@apply whitespace-nowrap min-w-[80px];
|
||||
@@ -184,3 +185,30 @@ input.tl-text-input {
|
||||
border: 1px solid var(--ls-border-color);
|
||||
box-shadow: 0 0 0 4px var(--ls-focus-ring-color);
|
||||
}
|
||||
|
||||
.whiteboard-page-refs-count-label {
|
||||
@apply flex gap-1 items-center;
|
||||
}
|
||||
|
||||
.whiteboard-page-refs {
|
||||
@apply flex-shrink-0;
|
||||
}
|
||||
|
||||
.whiteboard-page[data-breakpoint=sm] {
|
||||
.whiteboard-page-refs-count-label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.whiteboard-page-title-root {
|
||||
left: 0.5rem;
|
||||
}
|
||||
|
||||
.tl-action-bar {
|
||||
left: 0.5rem;
|
||||
bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.tl-primary-tools {
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,6 +128,12 @@
|
||||
formats))))
|
||||
|
||||
(def mobile?
|
||||
"Triggering condition: Mobile phones
|
||||
*** Warning!!! ***
|
||||
For UX logic only! Don't use for FS logic
|
||||
iPad / Android Pad doesn't trigger!
|
||||
|
||||
Same as config/mobile?"
|
||||
(when-not util/node-test?
|
||||
(util/safe-re-find #"Mobi" js/navigator.userAgent)))
|
||||
|
||||
|
||||
@@ -4459,7 +4459,8 @@
|
||||
:settings-page/enable-flashcards "Flashcard"
|
||||
:settings-page/export-theme "Esporta tema"}
|
||||
|
||||
:tr {:tutorial/text #?(:cljs (rc/inline "tutorial-tr.md")
|
||||
:tr {:accessibility/skip-to-main-content "Ana içeriğe geç"
|
||||
:tutorial/text #?(:cljs (rc/inline "tutorial-tr.md")
|
||||
:default "tutorial-tr.md")
|
||||
:tutorial/dummy-notes #?(:cljs (rc/inline "dummy-notes-tr.md")
|
||||
:default "dummy-notes-tr.md")
|
||||
@@ -4501,6 +4502,10 @@
|
||||
:search/result-for "Arama sonucu: "
|
||||
:search/items "öğe"
|
||||
:search/page-names "Sayfa adlarında ara"
|
||||
:search-item/whiteboard "Beyaz tahta"
|
||||
:search-item/page "Sayfa"
|
||||
:search-item/file "Dosya"
|
||||
:search-item/block "Blok"
|
||||
:help/context-menu "Blok kısayol menüsü"
|
||||
:help/fold-unfold "Blokları katla/aç (düzenleme modunda değilken)"
|
||||
:help/markdown-syntax "Markdown sözdizimi"
|
||||
@@ -4511,6 +4516,7 @@
|
||||
:highlight "Vurgulu"
|
||||
:strikethrough "Üstü çizili"
|
||||
:code "Kod"
|
||||
:untitled "Adsız"
|
||||
:right-side-bar/help "Yardım"
|
||||
:right-side-bar/switch-theme "Tema modları"
|
||||
:right-side-bar/theme "{1} tema"
|
||||
@@ -4521,11 +4527,15 @@
|
||||
:right-side-bar/block-ref "Blok referansı"
|
||||
:right-side-bar/graph-view "Graf görünümü"
|
||||
:right-side-bar/all-pages "Bütün sayfalar"
|
||||
:right-side-bar/whiteboards "Beyaz tahtalar"
|
||||
:right-side-bar/flashcards "Bilgi kartları"
|
||||
:right-side-bar/new-page "Yeni sayfa"
|
||||
:right-side-bar/show-journals "Günlükleri Göster"
|
||||
:right-side-bar/separator "Sağ kenar çubuğu yeniden boyutlandırma işleyicisi"
|
||||
:left-side-bar/journals "Günlük"
|
||||
:left-side-bar/create "Oluştur"
|
||||
:left-side-bar/new-page "Yeni sayfa"
|
||||
:left-side-bar/new-whiteboard "Yeni beyaz tahta"
|
||||
:left-side-bar/nav-favorites "Sık kullanılanlar"
|
||||
:left-side-bar/nav-shortcuts "Kısa yollar"
|
||||
:left-side-bar/nav-recent-pages "En son"
|
||||
@@ -4553,6 +4563,7 @@
|
||||
:page/add-to-favorites "Sık kullanılanlara ekle"
|
||||
:page/unfavorite "Sayfayı sık kullanılanlardan kaldır"
|
||||
:page/show-journals "Günlükleri göster"
|
||||
:page/show-whiteboards "Beyaz tahtaları göster"
|
||||
:page/show-name "Sayfa adını göster"
|
||||
:page/hide-name "Sayfa adını gizle"
|
||||
:block/name "Sayfa adı"
|
||||
@@ -4568,6 +4579,33 @@
|
||||
:file/last-modified-at "Son değiştirilme tarihi"
|
||||
:file/no-data "Veri yok"
|
||||
:file/format-not-supported ".{1} biçimi desteklenmiyor."
|
||||
:file-rn/re-index "Dosyalar yeniden adlandırıldıktan ve diğer cihazlarla eşitledikten sonra yeniden dizin oluşturma önerilir."
|
||||
:file-rn/need-action "Yeni biçime uyması için dosya yeniden adlandırma eylemleri önerilir. Yeniden adlandırılan dosyalar eşitlendiğinde tüm cihazlarda yeniden dizin oluşturma gerekir."
|
||||
:file-rn/or-select-actions " veya aşağıdaki dosyaları tek tek yeniden adlandırın, ardından "
|
||||
:file-rn/or-select-actions-2 ". Bu paneli kapattığınızda bu eylemler kullanılamaz."
|
||||
:file-rn/legend "🟢 İsteğe bağlı yeniden adlandırma eylemleri; 🟡 Başlık değişikliğini önlemek için gereken yeniden adlandırma eylemi; 🔴 Hataya neden olan değişiklik."
|
||||
:file-rn/close-panel "Paneli Kapat"
|
||||
:file-rn/all-action "Tüm Eylemleri Uygula!"
|
||||
:file-rn/select-format "(Geliştirici Modu Seçeneği, Tehlikeli!) Dosya adı biçimini seçin"
|
||||
:file-rn/rename "\"{1}\" dosyasını \"{2}\" olarak yeniden adlandır"
|
||||
:file-rn/rename-sm "Yeniden adlandır"
|
||||
:file-rn/apply-rename "Dosya yeniden adlandırma işlemini uygula"
|
||||
:file-rn/affected-pages "Biçim değişikliğinden sonra Etkilenen Sayfalar"
|
||||
:file-rn/suggest-rename "Eylem gereklidir: "
|
||||
:file-rn/otherwise-breaking "Veya başlık şöyle olacaktır:"
|
||||
:file-rn/no-action "Tebrikler! Gereken başka işlem yok."
|
||||
:file-rn/confirm-proceed "Biçimi güncelle!"
|
||||
:file-rn/select-confirm-proceed "Geliştirici: biçimi yaz"
|
||||
:file-rn/unreachable-title "Uyarı! `title::` özelliği el ile ayarlanmadıkça, sayfa adı geçerli dosya adı biçiminde {1} olur."
|
||||
:file-rn/optional-rename "Öneri: "
|
||||
:file-rn/format-deprecated "Şu anda güncel olmayan bir biçim kullanıyorsunuz. En son biçime güncellemeniz kesinlikle önerilir. Lütfen işlemden önce verilerinizi yedekleyin ve Logseq istemcilerini diğer cihazlarda kapatın."
|
||||
:file-rn/filename-desc-1 "Bu ayar, bir sayfanın bir dosyaya nasıl saklanacağını yapılandırır. Logseq, aynı ada sahip bir dosyaya bir sayfa depolar."
|
||||
:file-rn/filename-desc-2 "\"/\" vaya \"?\" gibi bazı karakterler bir dosya adı için geçersizdir."
|
||||
:file-rn/filename-desc-3 "Logseq, geçersiz karakterleri geçerli kılmak için URL kodlu eşdeğerleriyle değiştirir (ör. \"?\", \"%3F\" olur)."
|
||||
:file-rn/filename-desc-4 "Ad boşluğu ayırıcısı \"/\", estetik değerlendirme için \"___\" (üçlü altçizgi) ile de değiştirilir."
|
||||
:file-rn/instruct-1 "Dosya adı biçimini güncellemek 2 adımlı bir işlemdir:"
|
||||
:file-rn/instruct-2 "1. Tıklayın "
|
||||
:file-rn/instruct-3 "2. Dosyaları yeni biçimde yeniden adlandırmak için aşağıdaki talimatları izleyin:"
|
||||
:page/created-at "Oluşturulma Zamanı"
|
||||
:page/updated-at "Güncellenme Zamanı"
|
||||
:page/backlinks "Geri Bağlantılar"
|
||||
@@ -4594,6 +4632,13 @@
|
||||
:asset/maximize "Resim ekranı kaplasın"
|
||||
:asset/confirm-delete "Bu resmi silmek istediğinizden emin misiniz?"
|
||||
:asset/physical-delete "Dosyayı da kaldırın (geri getirilemeyeceğine dikkat edin)"
|
||||
:color/gray "Gri"
|
||||
:color/red "Kırmızı"
|
||||
:color/yellow "Sarı"
|
||||
:color/green "Yeşil"
|
||||
:color/blue "Mavi"
|
||||
:color/purple "Mor"
|
||||
:color/pink "Pembe"
|
||||
:content/copy "Kopyala"
|
||||
:content/cut "Kes"
|
||||
:content/make-todos "{1} yap"
|
||||
@@ -4611,6 +4656,7 @@
|
||||
:settings-page/edit-global-config-edn "Genel config.edn dosyasını düzenle"
|
||||
:settings-page/edit-custom-css "custom.css dosyasını düzenle"
|
||||
:settings-page/edit-export-css "export.css dosyasını düzenle"
|
||||
:settings-page/edit-setting "Düzenle"
|
||||
:settings-page/custom-configuration "Özel yapılandırma"
|
||||
:settings-page/custom-global-configuration "Özel genel yapılandırma"
|
||||
:settings-page/custom-theme "Özel tema"
|
||||
@@ -4645,11 +4691,17 @@
|
||||
:settings-page/tab-shortcuts "Kısayollar"
|
||||
:settings-page/tab-version-control "Sürüm denetimi"
|
||||
:settings-page/tab-advanced "Gelişmiş"
|
||||
:settings-page/tab-assets "Varlıklar"
|
||||
:settings-page/tab-features "Özellikler"
|
||||
:settings-page/plugin-system "Eklentiler"
|
||||
:settings-page/enable-flashcards "Bilgi kartları"
|
||||
:settings-page/network-proxy "Ağ ara sunucusu"
|
||||
:settings-page/filename-format "Dosya adı biçimi"
|
||||
:settings-page/alpha-features "Alpha özellikleri"
|
||||
:settings-page/beta-features "Beta özellikleri"
|
||||
:settings-page/login-prompt "Yeni özelliklere herkesten önce erişmek için bir Open Collective Sponsoru veya Logseq'in Destekçisi olmanız ve oturum açmanız gerekir."
|
||||
:settings-page/sync "Eşitle"
|
||||
:settings-page/enable-whiteboards "Beyaz tahtalar"
|
||||
:logseq "Logseq"
|
||||
:on "AÇIK"
|
||||
:more-options "Diğer seçenekler"
|
||||
@@ -4676,9 +4728,12 @@
|
||||
:unlink "bağlantıyı kaldır"
|
||||
:search/publishing "Ara"
|
||||
:search "Ara veya sayfa oluştur"
|
||||
:whiteboard/link-whiteboard-or-block "Beyaz tahta/sayfa/blok bağlantısı"
|
||||
:page-search "Geçerli sayfada ara"
|
||||
:graph-search "Grafta ara"
|
||||
:new-page "Yeni sayfa"
|
||||
:new-whiteboard "Yeni beyaz tahta"
|
||||
:go-to-whiteboard "Beyaz tahtaya git"
|
||||
:new-file "Yeni dosya"
|
||||
:new-graph "Yeni graf ekle"
|
||||
:graph "Graf"
|
||||
@@ -4706,6 +4761,7 @@
|
||||
:convert-markdown "Markdown başlıklarını sırasız listelere dönüştürün (# -> -)"
|
||||
:all-graphs "Tüm graflar"
|
||||
:all-pages "Tüm sayfalar"
|
||||
:all-whiteboards "Tüm beyaz tahtalar"
|
||||
:all-files "Tüm dosyalar"
|
||||
:remove-orphaned-pages "Yalnız bırakılmış sayfaları kaldır"
|
||||
:all-journals "Bütün günlükler"
|
||||
@@ -4737,6 +4793,10 @@
|
||||
:white "Açık"
|
||||
:dark "Koyu"
|
||||
:remove-background "Arka planı kaldır"
|
||||
:remove-heading "Başlığı kaldır"
|
||||
:heading "Başlık {1}"
|
||||
:auto-heading "Otomatik başlık"
|
||||
:not-available-in-mode "{1} modunda kullanılamıyor"
|
||||
:open "Aç"
|
||||
:open-a-directory "Yerel bir dizin aç"
|
||||
:user/delete-account "Hesabı sil"
|
||||
@@ -4776,11 +4836,17 @@
|
||||
:plugin/marketplace-tips "Eklenti ilk kurulduğunda düzgün çalışmıyorsa Logseq'i yeniden başlatmayı deneyin."
|
||||
:plugin/up-to-date "Güncel"
|
||||
:plugin/custom-js-alert "custom.js dosyası bulundu, çalıştırılmasına izin veriliyor mu? (Bu dosyanın içeriğini anlamadıysanız, belirli güvenlik riskleri olduğu için çalıştırmaya izin vermemeniz önerilir.)"
|
||||
:plugin.install-from-file/menu-title "plugins.edn dosyasından yükle"
|
||||
:plugin.install-from-file/title "Eklentileri plugins.edn dosyasından yükle"
|
||||
:plugin.install-from-file/notice "Aşağıdaki eklentiler yüklü olan eklentilerinizin yerini alacak:"
|
||||
:plugin.install-from-file/success "Tüm eklentiler yüklendi!"
|
||||
|
||||
:pdf/copy-ref "Referansı kopyala"
|
||||
:pdf/copy-text "Metni kopyala"
|
||||
:pdf/linked-ref "Bağlantılı referans"
|
||||
:pdf/toggle-dashed "Alan vurgusu için çizgili stil"
|
||||
:pdf/hl-block-colored "Vurgulu blok için renkli etiket"
|
||||
:pdf/doc-metadata "Belge meta verileri"
|
||||
|
||||
:updater/new-version-install "Yeni bir sürüm indirildi."
|
||||
:updater/quit-and-install "Yüklemek için yeniden başlatın"
|
||||
@@ -4798,7 +4864,11 @@
|
||||
:select.graph/add-graph "Evet, başka bir graf ekle"
|
||||
|
||||
:file-sync/other-user-graph "Geçerli yerel graf, diğer kullanıcının uzak grafına bağlıdır. Bu yüzden senkronizasyon başlatılamıyor."
|
||||
:file-sync/graph-deleted "Geçerli uzak graf silindi"}
|
||||
:file-sync/graph-deleted "Geçerli uzak graf silindi"
|
||||
|
||||
:conversion/non-desktop "Eski sürümlerdeki graf dizininin yeni biçime dönüştürülmesi gerekiyor.
|
||||
Lütfen dönüştürmeyi yapmak için masaüstü uygulamasını kullanın."
|
||||
:conversion/write-filename-format "Gelen dosyalar için biçimi uygula"}
|
||||
|
||||
:ko {:tutorial/text #?(:cljs (rc/inline "tutorial-ko.md")
|
||||
:default "tutorial-ko.md")
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
:date-formatter (state/get-date-formatter)
|
||||
:block-pattern (config/get-block-pattern (gp-util/get-format file))
|
||||
:supported-formats (gp-config/supported-formats)
|
||||
:uri-encoded? (boolean (util/mobile?))
|
||||
:uri-encoded? (boolean (mobile-util/native-platform?))
|
||||
:filename-format (state/get-filename-format repo-url)}
|
||||
(when (some? verbose) {:verbose verbose}))})]
|
||||
(:tx (graph-parser/parse-file (db/get-db repo-url false) file content options)))))
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
"For conversion logic between old version and new version"
|
||||
(:require [logseq.graph-parser.util :as gp-util]
|
||||
[frontend.util.fs :as fs-util]
|
||||
[frontend.handler.config :refer [set-config!]]))
|
||||
[frontend.handler.config :refer [set-config!]]
|
||||
[frontend.util :as util]))
|
||||
|
||||
(defn write-filename-format!
|
||||
"Return:
|
||||
@@ -58,6 +59,8 @@
|
||||
;; - the special rule in `is-manual-title-prop?`
|
||||
(defonce supported-filename-formats [:triple-lowbar :legacy])
|
||||
|
||||
;; In case of recovering this check in future
|
||||
#_:clj-kondo/ignore
|
||||
(defn- is-manual-title-prop?
|
||||
"If it's an user defined title property instead of the generated one"
|
||||
[format file-body prop-title]
|
||||
@@ -74,14 +77,17 @@
|
||||
;; and it includes reserved characters, format config change / file renaming is required.
|
||||
;; It's about user's own data management decision and should be handled
|
||||
;; by user manually.
|
||||
;; Don't rename page that with a custom setup `title` property
|
||||
(when (not (is-manual-title-prop? old-format file-body prop-title))
|
||||
;; the 'expected' title of the user when updating from the previous format, or title will be broken in new format
|
||||
(or (when (and (nil? prop-title)
|
||||
(not= old-format new-format))
|
||||
(calc-previous-name old-format new-format file-body))
|
||||
;; if no break-change conversion triggered, check if file name is in an informal / outdated style.
|
||||
(calc-current-name new-format file-body prop-title))))
|
||||
;; the 'expected' title of the user when updating from the previous format, or title will be broken in new format
|
||||
(let [ret (or (when (and (nil? prop-title)
|
||||
(not= old-format new-format))
|
||||
(calc-previous-name old-format new-format file-body))
|
||||
;; if no break-change conversion triggered, check if file name is in an informal / outdated style.
|
||||
(calc-current-name new-format file-body prop-title))]
|
||||
(when (and ret
|
||||
;; Return only when the target is different from the original file body, not only capitalization difference
|
||||
(not= (util/page-name-sanity-lc (:target ret))
|
||||
(util/page-name-sanity-lc file-body)))
|
||||
ret)))
|
||||
|
||||
(defn calc-rename-target
|
||||
"Return the renaming status and new file body to recover the original title of the file in previous version.
|
||||
|
||||
@@ -1395,6 +1395,7 @@
|
||||
:command.pdf/previous-page "Geçerli pdf belgesinin önceki sayfası"
|
||||
:command.pdf/next-page "Geçerli pdf belgesinin sonraki sayfası"
|
||||
:command.pdf/close "Geçerli pdf görüntüleyiciyi kapat"
|
||||
:command.pdf/find "Pdf: Geçerli pdf belgesinde aranacak metin"
|
||||
:command.auto-complete/complete "Otomatik tamamlama: Seçili öğeyi seç"
|
||||
:command.auto-complete/prev "Otomatik tamamlama: Önceki öğeyi seç"
|
||||
:command.auto-complete/next "Otomatik tamamlama: Sonraki öğeyi seç"
|
||||
@@ -1410,6 +1411,7 @@
|
||||
:command.editor/delete "Silme tuşu (Delete) / İleriye doğru sil"
|
||||
:command.editor/new-block "Yeni blok oluştur"
|
||||
:command.editor/new-line "Geçerli blokta yeni satır"
|
||||
:command.editor/new-whiteboard "Yeni beyaz tahta"
|
||||
:command.editor/follow-link "İmlecin altındaki bağlantıyı takip et"
|
||||
:command.editor/open-link-in-sidebar "Bağlantıyı kenar çubuğunda aç"
|
||||
:command.editor/bold "Kalın"
|
||||
@@ -1469,6 +1471,7 @@
|
||||
:command.sidebar/clear "Sağ kenar çubuğundaki herşeyi temizle"
|
||||
:command.misc/copy "mod+c"
|
||||
:command.command-palette/toggle "Komut paletini aç"
|
||||
:command.graph/export-as-html "Herkese açık graf sayfalarını html olarak dışarı aktar"
|
||||
:command.graph/open "Açılacak grafı seçin"
|
||||
:command.graph/remove "Bir grafı kaldır"
|
||||
:command.graph/add "Graf ekle"
|
||||
@@ -1477,6 +1480,7 @@
|
||||
:command.command/run "Git komutunu çalıştır"
|
||||
:command.go/home "Ana sayfaya git"
|
||||
:command.go/all-graphs "Bütün graflara git"
|
||||
:command.go/whiteboards "Beyaz tahtalara git"
|
||||
:command.go/all-pages "Bütün sayfalara git"
|
||||
:command.go/graph-view "Graf görünümüne git"
|
||||
:command.go/keyboard-shortcuts "Klavye kısayollarına git"
|
||||
@@ -1499,6 +1503,7 @@
|
||||
:command.ui/toggle-wide-mode "Geniş modu aç/kapat"
|
||||
:command.ui/select-theme-color "Kullanılabilir tema renklerini seçin"
|
||||
:command.ui/goto-plugins "Eklentiler panosuna git"
|
||||
:command.ui/install-plugins-from-file "Eklentileri plugins.edn dosyasından yükleyin"
|
||||
:command.editor/toggle-open-blocks "Açık blokları kapat/aç (tüm blokları daralt veya genişlet)"
|
||||
:command.ui/toggle-cards "Kartları aç/kapat"
|
||||
:command.git/commit "Git commit mesajı"}
|
||||
|
||||
@@ -119,6 +119,28 @@
|
||||
[ref tick])
|
||||
[set-ref rect])))
|
||||
|
||||
(defn ->breakpoint
|
||||
"Converts a number to a breakpoint string
|
||||
Values come from https://tailwindcss.com/docs/responsive-design"
|
||||
[size]
|
||||
(cond
|
||||
(nil? size) :md
|
||||
(<= size 640) :sm
|
||||
(<= size 768) :md
|
||||
(<= size 1024) :lg
|
||||
(<= size 1280) :xl
|
||||
(<= size 1536) :xl
|
||||
:else :2xl))
|
||||
|
||||
(defn use-breakpoint
|
||||
"Returns the current breakpoint
|
||||
You can manually change the tick value, if you want to force refresh the value, you can manually change the tick value"
|
||||
([] (use-breakpoint nil))
|
||||
([tick]
|
||||
(let [[ref rect] (use-bounding-client-rect tick)
|
||||
bp (->breakpoint (when (some? rect) (.-width rect)))]
|
||||
[ref bp])))
|
||||
|
||||
(defn use-click-outside
|
||||
"Returns a function that can be used to register a callback
|
||||
that will be called when the user clicks outside the given dom node"
|
||||
|
||||
@@ -698,7 +698,7 @@ Similar to re-frame subscriptions"
|
||||
|
||||
(defn get-current-page
|
||||
[]
|
||||
(when (= :page (get-current-route))
|
||||
(when (#{:page :whiteboard} (get-current-route))
|
||||
(get-in (get-route-match)
|
||||
[:path-params :name])))
|
||||
|
||||
|
||||
@@ -91,6 +91,10 @@
|
||||
|
||||
#?(:cljs
|
||||
(defn mobile?
|
||||
"Triggering condition: Mobile phones
|
||||
*** Warning!!! ***
|
||||
For UX logic only! Don't use for FS logic
|
||||
iPad / Android Pad doesn't trigger!"
|
||||
[]
|
||||
(when-not node-test?
|
||||
(safe-re-find #"Mobi" js/navigator.userAgent))))
|
||||
|
||||
@@ -21,12 +21,21 @@
|
||||
seconds (mod seconds 60)]
|
||||
(util/format "%02d:%02d:%02d" hours minutes seconds)))
|
||||
|
||||
(defn seconds->days:hours:minutes:seconds
|
||||
(defn s->dhms-util
|
||||
"A function that returns the values for easier testing.
|
||||
Always in the order [days, hours, minutes, seconds]"
|
||||
[seconds]
|
||||
(let [days (quot (quot seconds 3600) 24)
|
||||
hours (quot seconds 3600)
|
||||
minutes (quot (- seconds (* hours 3600)) 60)
|
||||
seconds (mod seconds 60)]
|
||||
n (mod seconds (* 24 3600))
|
||||
hours (quot n 3600)
|
||||
n (mod n 3600)
|
||||
minutes (quot n 60)
|
||||
secs (mod n 60)]
|
||||
[days hours minutes secs]))
|
||||
|
||||
(defn seconds->days:hours:minutes:seconds
|
||||
[seconds]
|
||||
(let [[days hours minutes seconds] (s->dhms-util seconds)]
|
||||
(util/format "%s%s%s%s"
|
||||
(if (zero? days) "" (str days "d"))
|
||||
(if (zero? hours) "" (str hours "h"))
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
(deftest rename-tests
|
||||
;; z: new title structure; x: old ver title; y: title property (if available)
|
||||
(are [x y z] (= z (#'conversion-handler/calc-rename-target-impl :legacy :triple-lowbar x y))
|
||||
"aaBBcc" "aabbcc" nil
|
||||
"aaa.bbb.ccc" "aaa/bbb/ccc" {:status :informal,
|
||||
:target "aaa___bbb___ccc",
|
||||
:old-title "aaa/bbb/ccc",
|
||||
@@ -114,13 +115,28 @@
|
||||
:target "aa%3F%23___bbb___ccc",
|
||||
:old-title "aa?#/bbb/ccc",
|
||||
:changed-title "aa?#/bbb/ccc"}
|
||||
"aa?#.bbb.ccc" "aa__/bbb/ccc" nil
|
||||
"aaa__bbb__ccc" "aaa/bbb/ccc" nil
|
||||
"aaa__bbb__cccon" "aaa/bbb/cccon" nil
|
||||
"aa?#.bbb.ccc" "aa__/bbb/ccc" {:status :informal,
|
||||
:target "aa_%5F___bbb___ccc",
|
||||
:old-title "aa__/bbb/ccc",
|
||||
:changed-title "aa__/bbb/ccc"}
|
||||
"aaa__bbb__ccc" "aaa/bbb/ccc" {:status :informal,
|
||||
:target "aaa___bbb___ccc",
|
||||
:old-title "aaa/bbb/ccc",
|
||||
:changed-title "aaa/bbb/ccc"}
|
||||
"aaa__bbb__cccon" "aaa/bbb/cccon" {:status :informal,
|
||||
:target "aaa___bbb___cccon",
|
||||
:old-title "aaa/bbb/cccon",
|
||||
:changed-title "aaa/bbb/cccon"}
|
||||
"aaa__bbb__ccc" nil nil
|
||||
"aaa_bbb_ccc" nil nil
|
||||
"aaa.bbb.ccc" "adbcde/aks/sdf" nil
|
||||
"a__.bbb.ccc" "adbcde/aks/sdf" nil
|
||||
"aaa.bbb.ccc" "adbcde/aks/sdf" {:status :informal,
|
||||
:target "adbcde___aks___sdf",
|
||||
:old-title "adbcde/aks/sdf",
|
||||
:changed-title "adbcde/aks/sdf"}
|
||||
"a__.bbb.ccc" "adbcde/aks/sdf" {:status :informal,
|
||||
:target "adbcde___aks___sdf",
|
||||
:old-title "adbcde/aks/sdf",
|
||||
:changed-title "adbcde/aks/sdf"}
|
||||
"CON" "CON" {:status :informal,
|
||||
:target "CON___",
|
||||
:old-title "CON",
|
||||
|
||||
17
src/test/frontend/util/clocktime_test.cljs
Normal file
17
src/test/frontend/util/clocktime_test.cljs
Normal file
@@ -0,0 +1,17 @@
|
||||
(ns frontend.util.clocktime-test
|
||||
(:require [cljs.test :refer [deftest is]]
|
||||
[frontend.util.clock :as clock]))
|
||||
|
||||
|
||||
(deftest test-seconds->days:hours:minutes:seconds
|
||||
(let [inputs [0, 1, 10, 60, 123 ,5432, 63953, 484882, 2394503]
|
||||
want [[0, 0, 0, 0],
|
||||
[0, 0, 0, 1],
|
||||
[0, 0, 0, 10],
|
||||
[0, 0, 1, 0],
|
||||
[0, 0, 2, 3],
|
||||
[0, 1, 30, 32],
|
||||
[0, 17, 45, 53],
|
||||
[5, 14, 41, 22],
|
||||
[27, 17, 8, 23]]]
|
||||
(map #(is (= (clock/s->dhms-util %1) %2)) inputs want)))
|
||||
Reference in New Issue
Block a user