diff --git a/src/main/frontend/components/repo.cljs b/src/main/frontend/components/repo.cljs index 5e76285af6..372b551ce6 100644 --- a/src/main/frontend/components/repo.cljs +++ b/src/main/frontend/components/repo.cljs @@ -107,23 +107,24 @@ (ui/icon "dots" {:size 15}))) (shui/dropdown-menu-content {:align "end"} - (shui/dropdown-menu-item - {:key "delete-locally" - :class "delete-local-graph-menu-item" - :on-click (fn [] - (let [prompt-str (if db-based? - (str "Are you sure you want to permanently delete the graph \"" graph-name "\" from Logseq?") - (str "Are you sure you want to unlink the graph \"" url "\" from local folder?"))] - (-> (shui/dialog-confirm! - [:p.font-medium.-my-4 prompt-str - [:span.my-2.flex.font-normal.opacity-75 - (if db-based? - [:small "⚠️ Notice that we can't recover this graph after being deleted. Make sure you have backups before deleting it."] - [:small "⚠️ It won't remove your local files!"])]]) - (p/then (fn [] - (repo-handler/remove-repo! repo) - (state/pub-event! [:graph/unlinked repo (state/get-current-repo)]))))))} - "Delete local graph") + (when root + (shui/dropdown-menu-item + {:key "delete-locally" + :class "delete-local-graph-menu-item" + :on-click (fn [] + (let [prompt-str (if db-based? + (str "Are you sure you want to permanently delete the graph \"" graph-name "\" from Logseq?") + (str "Are you sure you want to unlink the graph \"" url "\" from local folder?"))] + (-> (shui/dialog-confirm! + [:p.font-medium.-my-4 prompt-str + [:span.my-2.flex.font-normal.opacity-75 + (if db-based? + [:small "⚠️ Notice that we can't recover this graph after being deleted. Make sure you have backups before deleting it."] + [:small "⚠️ It won't remove your local files!"])]]) + (p/then (fn [] + (repo-handler/remove-repo! repo) + (state/pub-event! [:graph/unlinked repo (state/get-current-repo)]))))))} + "Delete local graph")) (when (and remote? (or (and db-based? manager?) (not db-based?))) (shui/dropdown-menu-item {:key "delete-remotely" diff --git a/src/main/mobile/components/popup.cljs b/src/main/mobile/components/popup.cljs index 6faa91c04d..3d2308450f 100644 --- a/src/main/mobile/components/popup.cljs +++ b/src/main/mobile/components/popup.cljs @@ -81,7 +81,9 @@ (rum/defc popup < rum/reactive [] (let [{:keys [open? content-fn opts]} (rum/react mobile-state/*popup-data) - initial-breakpoint (if (= (:id opts) :ls-quick-add) 1 0.75)] + [initial-breakpoint breakpoints] (if (= (:id opts) :ls-quick-add) + [1 #js [0 1]] + [0.75 #js [0 0.75 1]])] (when open? (if (= :ls-quick-add (:id opts)) (when-let [add-page (ldb/get-built-in-page (db/get-db) common-config/quick-add-page-name)] @@ -98,7 +100,7 @@ (merge {:isOpen (boolean open?) :initialBreakpoint initial-breakpoint - :breakpoints #js [0 0.75 1] + :breakpoints breakpoints :onDidDismiss (fn [] (mobile-state/set-popup! nil)) :expand "block"} (:modal-props opts))