Browse Source

enhance(ios): show repo name instead of full-path

leizhe 4 years ago
parent
commit
3c0f3c2f1e
2 changed files with 4 additions and 2 deletions
  1. 1 1
      src/main/frontend/components/sidebar.cljs
  2. 3 1
      src/main/frontend/config.cljs

+ 1 - 1
src/main/frontend/components/sidebar.cljs

@@ -240,7 +240,7 @@
                                    [".favorites" ".recent" ".dropdown-wrapper" ".nav-header"])
                          (close-modal-fn)))}
          [:div.flex.flex-col.pb-4.wrap
-          {:style {:padding-top (when (mobile-util/is-native-platform?) 0)}}
+          {:style {:padding-top (when (mobile-util/is-native-platform?) 20)}}
           [:nav.px-2.space-y-1 {:aria-label "Sidebar"}
            (repo/repos-dropdown)
 

+ 3 - 1
src/main/frontend/config.cljs

@@ -333,7 +333,9 @@
 
 (defn get-local-dir
   [s]
-  (string/replace s local-db-prefix ""))
+  (if-not (mobile-util/is-native-platform?)
+    (string/replace s local-db-prefix "")
+    (util/node-path.name s)))
 
 (defn get-local-repo
   [dir]