فهرست منبع

improve(marketplace): add indicator for sorter

charlie 4 سال پیش
والد
کامیت
9a7698c966
2فایلهای تغییر یافته به همراه16 افزوده شده و 2 حذف شده
  1. 2 2
      src/main/frontend/components/plugins.cljs
  2. 14 0
      src/main/frontend/components/plugins.css

+ 2 - 2
src/main/frontend/components/plugins.cljs

@@ -355,8 +355,8 @@
       (ui/dropdown-with-links
         (fn [{:keys [toggle-fn]}]
           (ui/button
-            [:span (ui/icon "arrows-sort") ""]
-            :class "sort-by"
+            [:span (ui/icon "arrows-sort")]
+            :class (str (when-not (contains? #{:enabled :downloads} sort-by) "picked ") "sort-by")
             :on-click toggle-fn
             :intent "link"))
         (let [aim-icon #(if (= sort-by %) "check" "circle")]

+ 14 - 0
src/main/frontend/components/plugins.css

@@ -79,6 +79,7 @@
     }
 
     .ui__button {
+      position: relative;
       border: none;
 
       &:active {
@@ -107,6 +108,19 @@
       &.sort-by, &.more-do {
         padding: 0 4px;
       }
+
+      &.picked {
+        &:after {
+          content: " ";
+          position: absolute;
+          top: -2px;
+          right: 4px;
+          background-color: red;
+          width: 4px;
+          height: 4px;
+          border-radius: 50%;
+        }
+      }
     }
 
     .search-ctls {