mirror of
https://github.com/penpot/penpot.git
synced 2025-05-13 10:36:38 +02:00
commit
bcd859ca4c
10 changed files with 48 additions and 27 deletions
|
@ -47,6 +47,7 @@
|
||||||
(defn notify-start-loading
|
(defn notify-start-loading
|
||||||
[]
|
[]
|
||||||
(st/emit! (msg/show {:content (tr "media.loading")
|
(st/emit! (msg/show {:content (tr "media.loading")
|
||||||
|
:notification-type :toast
|
||||||
:type :info
|
:type :info
|
||||||
:timeout nil})))
|
:timeout nil})))
|
||||||
|
|
||||||
|
|
|
@ -211,6 +211,7 @@
|
||||||
(watch [_ _ _]
|
(watch [_ _ _]
|
||||||
(rx/concat
|
(rx/concat
|
||||||
(rx/of (msg/show {:content (tr "media.loading")
|
(rx/of (msg/show {:content (tr "media.loading")
|
||||||
|
:notification-type :toast
|
||||||
:type :info
|
:type :info
|
||||||
:timeout nil
|
:timeout nil
|
||||||
:tag :media-loading}))
|
:tag :media-loading}))
|
||||||
|
@ -440,6 +441,7 @@
|
||||||
|
|
||||||
(rx/concat
|
(rx/concat
|
||||||
(rx/of (msg/show {:content (tr "media.loading")
|
(rx/of (msg/show {:content (tr "media.loading")
|
||||||
|
:notification-type :toast
|
||||||
:type :info
|
:type :info
|
||||||
:timeout nil
|
:timeout nil
|
||||||
:tag :media-loading}))
|
:tag :media-loading}))
|
||||||
|
|
|
@ -124,6 +124,7 @@
|
||||||
(let [message (tr "errors.paste-data-validation")]
|
(let [message (tr "errors.paste-data-validation")]
|
||||||
(st/async-emit!
|
(st/async-emit!
|
||||||
(msg/show {:content message
|
(msg/show {:content message
|
||||||
|
:notification-type :toast
|
||||||
:type :error
|
:type :error
|
||||||
:timeout 3000})))
|
:timeout 3000})))
|
||||||
|
|
||||||
|
@ -138,6 +139,7 @@
|
||||||
[error]
|
[error]
|
||||||
(ts/schedule
|
(ts/schedule
|
||||||
#(st/emit! (msg/show {:content "Internal Assertion Error"
|
#(st/emit! (msg/show {:content "Internal Assertion Error"
|
||||||
|
:notification-type :toast
|
||||||
:type :error
|
:type :error
|
||||||
:timeout 3000})))
|
:timeout 3000})))
|
||||||
|
|
||||||
|
@ -153,6 +155,7 @@
|
||||||
(ts/schedule
|
(ts/schedule
|
||||||
#(st/emit!
|
#(st/emit!
|
||||||
(msg/show {:content "Something wrong has happened (on worker)."
|
(msg/show {:content "Something wrong has happened (on worker)."
|
||||||
|
:notification-type :toast
|
||||||
:type :error
|
:type :error
|
||||||
:timeout 3000})))
|
:timeout 3000})))
|
||||||
|
|
||||||
|
@ -166,6 +169,7 @@
|
||||||
[_]
|
[_]
|
||||||
(ts/schedule
|
(ts/schedule
|
||||||
#(st/emit! (msg/show {:content "SVG is invalid or malformed"
|
#(st/emit! (msg/show {:content "SVG is invalid or malformed"
|
||||||
|
:notification-type :toast
|
||||||
:type :error
|
:type :error
|
||||||
:timeout 3000}))))
|
:timeout 3000}))))
|
||||||
|
|
||||||
|
@ -174,6 +178,7 @@
|
||||||
[_]
|
[_]
|
||||||
(ts/schedule
|
(ts/schedule
|
||||||
#(st/emit! (msg/show {:content "There was an error with the comment"
|
#(st/emit! (msg/show {:content "There was an error with the comment"
|
||||||
|
:notification-type :toast
|
||||||
:type :error
|
:type :error
|
||||||
:timeout 3000}))))
|
:timeout 3000}))))
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,9 @@
|
||||||
|
|
||||||
[:div {:class (stl/css :modal-overlay)}
|
[:div {:class (stl/css :modal-overlay)}
|
||||||
[:div {:class (stl/css :modal-container)}
|
[:div {:class (stl/css :modal-container)}
|
||||||
[:& fm/form {:form form :on-submit on-submit}
|
[:& fm/form {:form form
|
||||||
|
:on-submit on-submit
|
||||||
|
:class (stl/css :team-form)}
|
||||||
|
|
||||||
[:div {:class (stl/css :modal-header)}
|
[:div {:class (stl/css :modal-header)}
|
||||||
(if team
|
(if team
|
||||||
|
|
|
@ -31,6 +31,10 @@
|
||||||
margin-bottom: $s-24;
|
margin-bottom: $s-24;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.team-form {
|
||||||
|
min-width: $s-400;
|
||||||
|
}
|
||||||
|
|
||||||
.group-name-input {
|
.group-name-input {
|
||||||
@extend .input-element-label;
|
@extend .input-element-label;
|
||||||
label {
|
label {
|
||||||
|
@ -44,7 +48,6 @@
|
||||||
|
|
||||||
input {
|
input {
|
||||||
@include bodySmallTypography;
|
@include bodySmallTypography;
|
||||||
margin-top: $s-8;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
:links (:links message)
|
:links (:links message)
|
||||||
:content (:content message)}
|
:content (:content message)}
|
||||||
|
|
||||||
|
is-context-msg (and (nil? (:timeout message)) (nil? (:actions message)))
|
||||||
is-toast-msg (or (= :toast (:notification-type message)) (some? (:timeout message)))
|
is-toast-msg (or (= :toast (:notification-type message)) (some? (:timeout message)))
|
||||||
is-inline-msg (or (= :inline (:notification-type message)) (and (some? (:position message)) (= :floating (:position message))))]
|
is-inline-msg (or (= :inline (:notification-type message)) (and (some? (:position message)) (= :floating (:position message))))]
|
||||||
|
|
||||||
|
@ -42,5 +43,7 @@
|
||||||
[:& toast-notification toast-message]
|
[:& toast-notification toast-message]
|
||||||
is-inline-msg
|
is-inline-msg
|
||||||
[:& inline-notification inline-message]
|
[:& inline-notification inline-message]
|
||||||
|
is-context-msg
|
||||||
|
[:& context-notification context-message]
|
||||||
:else
|
:else
|
||||||
[:& context-notification context-message]))))
|
[:& toast-notification toast-message]))))
|
||||||
|
|
|
@ -44,10 +44,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
--bg-color: var(--alert-background-color-info);
|
--toast-notification-bg-color: var(--alert-background-color-info);
|
||||||
--fg-color: var(--alert-text-foreground-color-info);
|
--toast-notification-fg-color: var(--alert-text-foreground-color-info);
|
||||||
--icon-color: var(--alert-icon-foreground-color-info);
|
--toast-notification-icon-color: var(--alert-icon-foreground-color-info);
|
||||||
--border-color: var(--alert-border-color-info);
|
--toast-notification-border-color: var(--alert-border-color-info);
|
||||||
}
|
}
|
||||||
|
|
||||||
.default {
|
.default {
|
||||||
|
|
|
@ -135,6 +135,7 @@
|
||||||
(fn [_]
|
(fn [_]
|
||||||
(wapi/write-to-clipboard current-link)
|
(wapi/write-to-clipboard current-link)
|
||||||
(st/emit! (msg/show {:type :info
|
(st/emit! (msg/show {:type :info
|
||||||
|
:notification-type :toast
|
||||||
:content (tr "common.share-link.link-copied-success")
|
:content (tr "common.share-link.link-copied-success")
|
||||||
:timeout 1000})))
|
:timeout 1000})))
|
||||||
|
|
||||||
|
|
|
@ -224,10 +224,10 @@
|
||||||
:on-double-click rename-color-clicked}
|
:on-double-click rename-color-clicked}
|
||||||
|
|
||||||
(if (= (:name color) default-name)
|
(if (= (:name color) default-name)
|
||||||
[:span {:class (stl/css :default-name-only)} default-name]
|
[:span {:class (stl/css :default-name)} default-name]
|
||||||
[:*
|
[:*
|
||||||
[:span {:class (stl/css :name)} (:name color)]
|
(:name color)
|
||||||
[:span {:class (stl/css :default-name)} default-name]])])
|
[:span {:class (stl/css :default-name :default-name-with-color)} default-name]])])
|
||||||
|
|
||||||
(when local?
|
(when local?
|
||||||
[:& cmm/assets-context-menu
|
[:& cmm/assets-context-menu
|
||||||
|
|
|
@ -6,10 +6,15 @@
|
||||||
|
|
||||||
@import "refactor/common-refactor.scss";
|
@import "refactor/common-refactor.scss";
|
||||||
|
|
||||||
|
// TODO: we should be using subgrid in the common "assets component" to avoid
|
||||||
|
// using this SCSS variable here (we cannot use a CSS var in this CSS module because
|
||||||
|
// the elements are not part of the same cascade).
|
||||||
|
$assets-button-width: $s-28;
|
||||||
|
|
||||||
.assets-btn {
|
.assets-btn {
|
||||||
@extend .button-tertiary;
|
@extend .button-tertiary;
|
||||||
height: $s-32;
|
height: $s-32;
|
||||||
width: $s-28;
|
width: $assets-button-width;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border-radius: $br-8;
|
border-radius: $br-8;
|
||||||
svg {
|
svg {
|
||||||
|
@ -28,10 +33,12 @@
|
||||||
|
|
||||||
.asset-list-item {
|
.asset-list-item {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: grid;
|
||||||
|
grid-template-columns: auto 1fr #{$assets-button-width};
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: $s-32;
|
height: $s-32;
|
||||||
padding: $s-8;
|
padding: $s-8;
|
||||||
|
padding-inline-end: 0;
|
||||||
margin-bottom: $s-4;
|
margin-bottom: $s-4;
|
||||||
border-radius: $br-8;
|
border-radius: $br-8;
|
||||||
background-color: var(--assets-item-background-color);
|
background-color: var(--assets-item-background-color);
|
||||||
|
@ -48,7 +55,6 @@
|
||||||
@include bodySmallTypography;
|
@include bodySmallTypography;
|
||||||
@include removeInputStyle;
|
@include removeInputStyle;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
height: $s-28;
|
|
||||||
max-width: calc(var(--parent-size) - (var(--depth) * var(--layer-indentation-size)));
|
max-width: calc(var(--parent-size) - (var(--depth) * var(--layer-indentation-size)));
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--layer-row-foreground-color);
|
color: var(--layer-row-foreground-color);
|
||||||
|
@ -63,25 +69,23 @@
|
||||||
@include flexCenter;
|
@include flexCenter;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
margin-right: $s-4;
|
margin-inline-end: $s-4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.name-block {
|
.name-block {
|
||||||
@include bodySmallTypography;
|
@include bodySmallTypography;
|
||||||
display: grid;
|
@include textEllipsis;
|
||||||
grid-template-columns: auto 1fr;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
overflow: hidden;
|
color: var(--assets-item-name-foreground-color);
|
||||||
.default-name-only,
|
}
|
||||||
.name {
|
|
||||||
color: var(--assets-item-name-foreground-color);
|
.default-name {
|
||||||
margin-right: $s-6;
|
margin-inline-start: $s-4;
|
||||||
@include textEllipsis;
|
color: var(--assets-item-name-foreground-color-rest);
|
||||||
}
|
}
|
||||||
.default-name {
|
|
||||||
min-width: 0;
|
.default-name-with-color {
|
||||||
color: var(--assets-item-name-foreground-color-rest);
|
margin-left: $s-6;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.element-name {
|
.element-name {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue