mirror of
https://github.com/penpot/penpot.git
synced 2025-02-18 13:04:38 -05:00
🐛 Fix importzip file modal
This commit is contained in:
parent
e92932b4f9
commit
a3a7c597b5
2 changed files with 39 additions and 20 deletions
|
@ -216,7 +216,9 @@
|
||||||
|
|
||||||
[:div {:class (stl/css :file-name-label)}
|
[:div {:class (stl/css :file-name-label)}
|
||||||
(:name file)
|
(:name file)
|
||||||
(when is-shared? i/library-refactor)])
|
(when is-shared?
|
||||||
|
[:span {:class (stl/css :icon)}
|
||||||
|
i/library-refactor])])
|
||||||
|
|
||||||
[:div {:class (stl/css :edit-entry-buttons)}
|
[:div {:class (stl/css :edit-entry-buttons)}
|
||||||
(when (= "application/zip" (:type file))
|
(when (= "application/zip" (:type file))
|
||||||
|
@ -242,9 +244,10 @@
|
||||||
(let [library-data (->> @state :files (d/seek #(= library-id (:file-id %))))
|
(let [library-data (->> @state :files (d/seek #(= library-id (:file-id %))))
|
||||||
error? (or (:deleted? library-data) (:import-error library-data))]
|
error? (or (:deleted? library-data) (:import-error library-data))]
|
||||||
(when (some? library-data)
|
(when (some? library-data)
|
||||||
[:div {:class (stl/css-case :linked-library-tag true
|
[:div {:class (stl/css :linked-library)}
|
||||||
:error error?)}
|
(:name library-data)
|
||||||
i/detach-refactor (:name library-data)])))]]))
|
[:span {:class (stl/css-case :linked-library-tag true
|
||||||
|
:error error?)} i/detach-refactor]])))]]))
|
||||||
|
|
||||||
(mf/defc import-dialog
|
(mf/defc import-dialog
|
||||||
{::mf/register modal/components
|
{::mf/register modal/components
|
||||||
|
|
48
frontend/src/app/main/ui/dashboard/import.scss
vendored
48
frontend/src/app/main/ui/dashboard/import.scss
vendored
|
@ -107,7 +107,19 @@
|
||||||
}
|
}
|
||||||
.file-name-label {
|
.file-name-label {
|
||||||
@include titleTipography;
|
@include titleTipography;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: $s-12;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
.icon {
|
||||||
|
@include flexCenter;
|
||||||
|
height: $s-16;
|
||||||
|
width: $s-16;
|
||||||
|
svg {
|
||||||
|
@extend .button-icon-small;
|
||||||
|
stroke: var(--icon-foreground);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.edit-entry-buttons {
|
.edit-entry-buttons {
|
||||||
@include flexRow;
|
@include flexRow;
|
||||||
|
@ -128,18 +140,22 @@
|
||||||
color: var(--modal-text-foreground-color);
|
color: var(--modal-text-foreground-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.linked-libraries {
|
.linked-library {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: $s-12;
|
||||||
|
color: var(--modal-text-foreground-color);
|
||||||
.linked-library-tag {
|
.linked-library-tag {
|
||||||
@include flexCenter;
|
@include flexCenter;
|
||||||
height: $s-24;
|
height: $s-24;
|
||||||
width: $s-16;
|
width: $s-24;
|
||||||
svg {
|
svg {
|
||||||
@extend .button-icon;
|
@extend .button-icon;
|
||||||
stroke: var(--icon-foreground);
|
stroke: var(--icon-foreground);
|
||||||
}
|
}
|
||||||
&.error {
|
&.error {
|
||||||
svg {
|
svg {
|
||||||
stroke: var(--error-color);
|
stroke: var(--status-error-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -147,46 +163,46 @@
|
||||||
|
|
||||||
&.loading {
|
&.loading {
|
||||||
.file-name {
|
.file-name {
|
||||||
color: var(--pending-color);
|
color: var(--status-pending-color);
|
||||||
.file-icon {
|
.file-icon {
|
||||||
:global(#loader-pencil) {
|
:global(#loader-pencil) {
|
||||||
color: var(--pending-color);
|
color: var(--status-pending-color);
|
||||||
stroke: var(--pending-color);
|
stroke: var(--status-pending-color);
|
||||||
fill: var(--pending-color);
|
fill: var(--status-pending-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.warning {
|
&.warning {
|
||||||
.file-name {
|
.file-name {
|
||||||
color: var(--warning-color);
|
color: var(--status-warning-color);
|
||||||
.file-icon svg {
|
.file-icon svg {
|
||||||
stroke: var(--warning-color);
|
stroke: var(--status-warning-color);
|
||||||
}
|
}
|
||||||
.file-icon.icon-fill svg {
|
.file-icon.icon-fill svg {
|
||||||
fill: var(--warning-color);
|
fill: var(--status-warning-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.success {
|
&.success {
|
||||||
.file-name {
|
.file-name {
|
||||||
color: var(--ok-color);
|
color: var(--status-success-color);
|
||||||
.file-icon svg {
|
.file-icon svg {
|
||||||
stroke: var(--ok-color);
|
stroke: var(--status-success-color);
|
||||||
}
|
}
|
||||||
.file-icon.icon-fill svg {
|
.file-icon.icon-fill svg {
|
||||||
fill: var(--ok-color);
|
fill: var(--status-success-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.error {
|
&.error {
|
||||||
.file-name {
|
.file-name {
|
||||||
color: var(--error-color);
|
color: var(--status-error-color);
|
||||||
.file-icon svg {
|
.file-icon svg {
|
||||||
stroke: var(--error-color);
|
stroke: var(--status-error-color);
|
||||||
}
|
}
|
||||||
.file-icon.icon-fill svg {
|
.file-icon.icon-fill svg {
|
||||||
fill: var(--error-color);
|
fill: var(--status-error-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue