Skip to content

Commit

Permalink
fix(sync): address fn name and indentation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tiensonqin committed Nov 3, 2020
1 parent 7494c66 commit b6ad2aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/main/frontend/components/repo.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
(let [current-repo (state/sub :git/current-repo)
logged? (state/logged?)
local-repo? (= current-repo config/local-repo)
get-repo-name-f (fn [repo]
get-repo-name (fn [repo]
(if head?
(db/get-repo-path repo)
(util/take-at-most (db/get-repo-name repo) 20)))]
Expand All @@ -139,11 +139,11 @@
(ui/dropdown-with-links
(fn [{:keys [toggle-fn]}]
[:a#repo-switch {:on-click toggle-fn}
[:span (get-repo-name-f current-repo)]
[:span (get-repo-name current-repo)]
[:span.dropdown-caret.ml-1 {:style {:border-top-color "#6b7280"}}]])
(mapv
(fn [{:keys [id url]}]
{:title (get-repo-name-f url)
{:title (get-repo-name url)
:options {:on-click (fn []
(state/set-current-repo! url)
(when-not (= :draw (state/get-current-route))
Expand All @@ -156,8 +156,8 @@
{:modal-class (util/hiccup->class
"origin-top-right.absolute.left-0.mt-2.w-48.rounded-md.shadow-lg ")})
(if local-repo?
[:span (get-repo-name-f current-repo)]
[:span (get-repo-name current-repo)]
[:a
{:href current-repo
:target "_blank"}
(get-repo-name-f current-repo)])))))))
(get-repo-name current-repo)])))))))
4 changes: 2 additions & 2 deletions src/main/frontend/handler/git.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
(git-add repo-url file true))
([repo-url file update-status?]
(-> (p/let [_result (git/add repo-url file)]
(when update-status?
(common-handler/check-changed-files-status)))
(when update-status?
(common-handler/check-changed-files-status)))
(p/catch (fn [error]
(println "git add '" file "' failed: " error)
(js/console.error error))))))
Expand Down

0 comments on commit b6ad2aa

Please sign in to comment.