Просмотр исходного кода

enhance: set smaller font size for graph names

Tienson Qin 7 месяцев назад
Родитель
Сommit
fe5bf6cc06
2 измененных файлов с 9 добавлено и 4 удалено
  1. 4 3
      src/main/capacitor/components/app.cljs
  2. 5 1
      src/main/capacitor/components/app.css

+ 4 - 3
src/main/capacitor/components/app.cljs

@@ -49,7 +49,7 @@
                                   (for [repo graphs]
                                     {:text (some-> (:url repo) (string/replace #"^logseq_db_" ""))
                                      :role (:url repo)})
-                                  [{:text "+ Add new graph"
+                                  [{:text "Add new graph"
                                     :role "add-new-graph"}])]
                      (ui-component/open-modal! "Switch graph"
                                                {:type :action-sheet
@@ -58,11 +58,12 @@
                                                 :on-action (fn [e]
                                                              (when-let [role (:role e)]
                                                                (if (= "add-new-graph" role)
-                                                                 (when-let [db-name (js/prompt "Create new db")]
+                                                                 (when-let [db-name (js/prompt "Create new graph")]
                                                                    (when-not (string/blank? db-name)
                                                                      (repo-handler/new-db! db-name)))
                                                                  (when (string/starts-with? role "logseq_db_")
-                                                                   (fstate/pub-event! [:graph/switch role])))))})))}
+                                                                   (fstate/pub-event! [:graph/switch role])))))
+                                                :modal-props {:class "graph-switcher"}})))}
       [:span.flex.items-center.gap-2.opacity-80.pt-1
        [:strong.overflow-hidden.text-ellipsis.block.font-normal
         {:style {:max-width "40vw"}}

+ 5 - 1
src/main/capacitor/components/app.css

@@ -164,4 +164,8 @@ html[data-color=logseq] {
   &[data-theme=light] {
     --ion-color-primary:var(--rx-logseq-11);
   }
-}
+}
+
+.graph-switcher .action-sheet-button {
+  font-size: 1.125em;
+}