Repositories view improvements

* show personal repos group before other groups
* CSS tweaks
This commit is contained in:
Teemu Patja 2017-02-22 11:31:38 +02:00
parent 32392a4405
commit 1d49767da9
No known key found for this signature in database
GPG Key ID: F5B7035E6580FD4C
2 changed files with 15 additions and 8 deletions

View File

@ -38,15 +38,18 @@
(defn repos-list []
(let [repos (rf/subscribe [:repos])
user (rf/subscribe [:user])
repo-groups (keys @repos)]
user (rf/subscribe [:user])]
(fn []
(into [:div]
(for [[group group-repos]
(map (fn [group] [group (get @repos group)]) repo-groups)]
[:div [repo-group-title group (:login @user)]
(into [:div.ui.cards]
(map repo-card group-repos))])))))
(let [repo-groups (sort-by identity (fn [a _] (= a (:login @user)))
(keys @repos))]
(println repo-groups)
(into [:div]
(for [[group group-repos]
(map (fn [group] [group (get @repos group)])
repo-groups)]
[:div.repo-group-title [repo-group-title group (:login @user)]
(into [:div.ui.cards]
(map repo-card group-repos))]))))))
(defn repos-page []

View File

@ -149,6 +149,10 @@ span.dropdown.icon {
}
}
.repo-group-title {
margin-bottom: 1.5em;
}
.repo-label {
color: #1bb5c1;
font-family: 'postgrotesk-medium';