diff --git a/capacitor.config.ts b/capacitor.config.ts index bc0f8ea896..ace938708e 100644 --- a/capacitor.config.ts +++ b/capacitor.config.ts @@ -9,8 +9,7 @@ const config: CapacitorConfig = { webDir: 'static/capacitor', loggingBehavior: 'debug', server: { - url: "https://192.168.10.208:3002", - cleartext: true + androidScheme: 'http', }, plugins: { StatusBar: { diff --git a/src/main/capacitor/app.cljs b/src/main/capacitor/app.cljs index 5a3a196812..bf66fd0270 100644 --- a/src/main/capacitor/app.cljs +++ b/src/main/capacitor/app.cljs @@ -36,29 +36,29 @@ "Select a Graph")] [:<> (ionic/ion-button - {:fill "clear" :mode "ios" - :class "border-none w-full rounded-lg font-semibold pt-2" + {:fill "clear" + :mode "ios" + :class "border-none w-full rounded-lg" :on-click (fn [] - (ui/open-modal! "Switch graph" - {:type :action-sheet - :buttons (for [repo graphs] - {:text (some-> (:url repo) (string/replace #"^logseq_db_" "")) - :role (:url repo)}) - :inputs [] - :on-action (fn [e] - (when-let [url (:role e)] - (when (string/starts-with? url "logseq_db_") - (fstate/pub-event! [:graph/switch url]))))}))} - short-repo-name) - - (ionic/ion-button - {:class "relative -left-2 pt-1.5 opacity-50" - :on-click (fn [] - (when-let [db-name (js/prompt "Create new db")] - (when-not (string/blank? db-name) - (-> (repo-handler/new-db! db-name) - (p/then #())))))} - (ionic/tabler-icon "plus" {:size 24}))])) + (let [buttons (concat + (for [repo graphs] + {:text (some-> (:url repo) (string/replace #"^logseq_db_" "")) + :role (:url repo)}) + [{:text "Add new graph" + :role "add-new-graph"}])] + (ui/open-modal! "Switch graph" + {:type :action-sheet + :buttons buttons + :inputs [] + :on-action (fn [e] + (when-let [role (:role e)] + (if (= "add-new-graph" role) + (when-let [db-name (js/prompt "Create new db")] + (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])))))})))} + short-repo-name)])) (rum/defc bottom-tabs [] @@ -157,14 +157,14 @@ (let [val (.-value (.-detail e))] (apply-date! val) (close!)))}))))))} - [:span {:slot "icon-only"} (ionic/tabler-icon "calendar-month" {:size 26})]) + [:span {:slot "icon-only"} (ionic/tabler-icon "calendar-month" {:size 24})]) (ionic/ion-button {:fill "clear"} (ionic/ion-nav-link {:routerDirection "forward" :class "w-full" :component settings/page} - [:span {:slot "icon-only"} (ionic/tabler-icon "dots-circle-horizontal" {:size 26})]))))) + [:span {:slot "icon-only"} (ionic/tabler-icon "dots" {:size 24})]))))) ;; main content (if db-restoring? diff --git a/src/main/capacitor/app.css b/src/main/capacitor/app.css index 869d4cb203..bf54fcf0c4 100644 --- a/src/main/capacitor/app.css +++ b/src/main/capacitor/app.css @@ -133,4 +133,5 @@ ion-textarea { :root { --ls-page-title-size: 26px; + --ion-color-primary: #000000; }