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 [] (defn repos-list []
(let [repos (rf/subscribe [:repos]) (let [repos (rf/subscribe [:repos])
user (rf/subscribe [:user]) user (rf/subscribe [:user])]
repo-groups (keys @repos)]
(fn [] (fn []
(let [repo-groups (sort-by identity (fn [a _] (= a (:login @user)))
(keys @repos))]
(println repo-groups)
(into [:div] (into [:div]
(for [[group group-repos] (for [[group group-repos]
(map (fn [group] [group (get @repos group)]) repo-groups)] (map (fn [group] [group (get @repos group)])
[:div [repo-group-title group (:login @user)] repo-groups)]
[:div.repo-group-title [repo-group-title group (:login @user)]
(into [:div.ui.cards] (into [:div.ui.cards]
(map repo-card group-repos))]))))) (map repo-card group-repos))]))))))
(defn repos-page [] (defn repos-page []

View File

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