0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 16:00:19 -05:00

🐛 fix naming convention of swap

This commit is contained in:
Pablo Alba 2024-04-09 19:25:09 +02:00
parent c94478c9bb
commit 9d7e8cf4e6
2 changed files with 6 additions and 23 deletions

View file

@ -248,18 +248,13 @@
{::mf/props :obj} {::mf/props :obj}
[{:keys [item on-enter-group]}] [{:keys [item on-enter-group]}]
(let [group-name (:name item) (let [group-name (:name item)
path (cfh/butlast-path-with-dots group-name)
on-group-click #(on-enter-group group-name)] on-group-click #(on-enter-group group-name)]
[:div {:class (stl/css :component-group) [:div {:class (stl/css :component-group)
:on-click on-group-click :on-click on-group-click
:title group-name} :title group-name}
[:div {:class (stl/css :path-wrapper)} [:span {:class (stl/css :component-group-name)}
(when-not (str/blank? path) (cfh/last-path group-name)]
[:span {:class (stl/css :component-group-path)}
(str "\u00A0\u2022\u00A0" path)])
[:span {:class (stl/css :component-group-name)}
(cfh/last-path group-name)]]
[:span {:class (stl/css :arrow-icon)} [:span {:class (stl/css :arrow-icon)}
i/arrow]])) i/arrow]]))
@ -416,10 +411,7 @@
(mf/use-fn (mf/use-fn
(fn [style] (fn [style]
(swap! filters* assoc :listing-thumbs? (= style "grid")))) (swap! filters* assoc :listing-thumbs? (= style "grid"))))
filter-path-with-dots (->> (:path filters) (cfh/split-path) (cfh/join-path-with-dot))]
filters-but-last (cfh/butlast-path (:path filters))
last-filters (cfh/last-path (:path filters))
filter-path-with-dots (->> filters-but-last (cfh/split-path) (cfh/join-path-with-dot))]
[:div {:class (stl/css :component-swap)} [:div {:class (stl/css :component-swap)}
[:div {:class (stl/css :element-set-title)} [:div {:class (stl/css :element-set-title)}
@ -462,10 +454,8 @@
:on-click on-go-back :on-click on-go-back
:title filter-path-with-dots} :title filter-path-with-dots}
[:span {:class (stl/css :back-arrow)} i/arrow] [:span {:class (stl/css :back-arrow)} i/arrow]
(when-not (= "" filter-path-with-dots) [:span {:class (stl/css :path-name)}
[:span {:class (stl/css :path-name)} filter-path-with-dots]])
(dm/str "\u00A0\u2022\u00A0" filter-path-with-dots)])
[:span {:class (stl/css :path-name-last)} last-filters]])
(when (empty? items) (when (empty? items)
[:div {:class (stl/css :component-list-empty)} [:div {:class (stl/css :component-list-empty)}

View file

@ -254,14 +254,7 @@
direction: rtl; direction: rtl;
height: $s-32; height: $s-32;
padding: $s-8 0 $s-8 $s-2; padding: $s-8 0 $s-8 $s-2;
} margin-right: $s-4;
.path-name-last {
@include bodySmallTypography;
@include textEllipsis;
height: $s-32;
padding: $s-8 0 $s-8 $s-2;
color: white;
} }
.component-list-empty { .component-list-empty {