mirror of
https://github.com/penpot/penpot.git
synced 2025-01-04 13:50:12 -05:00
✨ Add test AB renaming "Libraries" to "Add library"
This commit is contained in:
parent
fffc3b1b58
commit
ec7f8a6aa7
4 changed files with 43 additions and 6 deletions
|
@ -8,6 +8,7 @@
|
|||
(:require-macros [app.main.style :as stl])
|
||||
(:require
|
||||
[app.common.data.macros :as dm]
|
||||
[app.config :as cf]
|
||||
[app.main.data.modal :as modal]
|
||||
[app.main.data.workspace :as dw]
|
||||
[app.main.data.workspace.assets :as dwa]
|
||||
|
@ -86,6 +87,7 @@
|
|||
section (:section filters)
|
||||
ordering (:ordering filters)
|
||||
reverse-sort? (= :desc ordering)
|
||||
num-libs (count (mf/deref refs/workspace-libraries))
|
||||
|
||||
toggle-ordering
|
||||
(mf/use-fn
|
||||
|
@ -155,12 +157,18 @@
|
|||
[:article {:class (stl/css :assets-bar)}
|
||||
[:div {:class (stl/css :assets-header)}
|
||||
(when-not ^boolean read-only?
|
||||
[:button {:class (stl/css :libraries-button)
|
||||
:on-click show-libraries-dialog
|
||||
:data-testid "libraries"}
|
||||
[:span {:class (stl/css :libraries-icon)}
|
||||
i/library]
|
||||
(tr "workspace.assets.libraries")])
|
||||
(if (and (cf/external-feature-flag "templates-02" "test")
|
||||
(zero? num-libs))
|
||||
[:button {:class (stl/css :add-library-button)
|
||||
:on-click show-libraries-dialog
|
||||
:data-testid "libraries"}
|
||||
(tr "workspace.assets.add-library")]
|
||||
[:button {:class (stl/css :libraries-button)
|
||||
:on-click show-libraries-dialog
|
||||
:data-testid "libraries"}
|
||||
[:span {:class (stl/css :libraries-icon)}
|
||||
i/library]
|
||||
(tr "workspace.assets.libraries")]))
|
||||
|
||||
[:div {:class (stl/css :search-wrapper)}
|
||||
[:& search-bar {:on-change on-search-term-change
|
||||
|
|
|
@ -25,34 +25,50 @@
|
|||
width: 100%;
|
||||
margin-bottom: $s-4;
|
||||
border-radius: $s-8;
|
||||
|
||||
.libraries-icon {
|
||||
@include flexCenter;
|
||||
width: $s-24;
|
||||
height: 100%;
|
||||
|
||||
svg {
|
||||
@include flexCenter;
|
||||
@extend .button-icon;
|
||||
stroke: var(--icon-foreground);
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--button-secondary-background-color-hover);
|
||||
color: var(--button-secondary-foreground-color-hover);
|
||||
border: $s-1 solid var(--button-secondary-border-color-hover);
|
||||
|
||||
svg {
|
||||
stroke: var(--button-secondary-foreground-color-hover);
|
||||
}
|
||||
}
|
||||
|
||||
&:focus {
|
||||
background-color: var(--button-secondary-background-color-focus);
|
||||
color: var(--button-secondary-foreground-color-focus);
|
||||
border: $s-1 solid var(--button-secondary-border-color-focus);
|
||||
|
||||
svg {
|
||||
stroke: var(--button-secondary-foreground-color-focus);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.add-library-button {
|
||||
@extend .button-primary;
|
||||
text-transform: uppercase;
|
||||
gap: $s-2;
|
||||
height: $s-32;
|
||||
width: 100%;
|
||||
margin-bottom: $s-4;
|
||||
border-radius: $s-8;
|
||||
}
|
||||
|
||||
.section-button {
|
||||
@include flexCenter;
|
||||
@include buttonStyle;
|
||||
|
@ -62,32 +78,39 @@
|
|||
border: $s-1 solid var(--input-border-color-rest);
|
||||
border-radius: $br-8 $br-2 $br-2 $br-8;
|
||||
background-color: var(--input-background-color-rest);
|
||||
|
||||
svg {
|
||||
height: $s-16;
|
||||
width: $s-16;
|
||||
stroke: var(--icon-foreground);
|
||||
}
|
||||
|
||||
&:focus {
|
||||
border: $s-1 solid var(--input-border-color-focus);
|
||||
outline: 0;
|
||||
background-color: var(--input-background-color-focus);
|
||||
color: var(--input-foreground-color-focus);
|
||||
|
||||
svg {
|
||||
background-color: var(--input-background-color-focus);
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
border: $s-1 solid var(--input-border-color-hover);
|
||||
background-color: var(--input-background-color-hover);
|
||||
|
||||
svg {
|
||||
background-color: var(--input-background-color-hover);
|
||||
stroke: var(--button-foreground-hover);
|
||||
}
|
||||
|
||||
&:focus {
|
||||
border: $s-1 solid var(--input-border-color-focus);
|
||||
outline: 0;
|
||||
background-color: var(--input-background-color-focus);
|
||||
color: var(--input-foreground-color-focus);
|
||||
|
||||
svg {
|
||||
background-color: var(--input-background-color-focus);
|
||||
}
|
||||
|
|
|
@ -4058,6 +4058,9 @@ msgstr "Group name"
|
|||
msgid "workspace.assets.libraries"
|
||||
msgstr "Libraries"
|
||||
|
||||
msgid "workspace.assets.add-library"
|
||||
msgstr "Add library"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/assets/components.cljs:523
|
||||
msgid "workspace.assets.list-view"
|
||||
msgstr "List view"
|
||||
|
|
|
@ -4058,6 +4058,9 @@ msgstr "Nombre del grupo"
|
|||
msgid "workspace.assets.libraries"
|
||||
msgstr "Bibliotecas"
|
||||
|
||||
msgid "workspace.assets.add-library"
|
||||
msgstr "Añadir biblioteca"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/assets/components.cljs:523
|
||||
msgid "workspace.assets.list-view"
|
||||
msgstr "Ver como lista"
|
||||
|
|
Loading…
Reference in a new issue