mirror of
https://github.com/penpot/penpot.git
synced 2025-05-25 01:36:11 +02:00
✨ Add a warning tooltip over import tokens button
This commit is contained in:
parent
21b2c0c26a
commit
b46574bef6
4 changed files with 26 additions and 1 deletions
|
@ -22,6 +22,7 @@
|
||||||
[app.main.ui.context :as ctx]
|
[app.main.ui.context :as ctx]
|
||||||
[app.main.ui.ds.buttons.button :refer [button*]]
|
[app.main.ui.ds.buttons.button :refer [button*]]
|
||||||
[app.main.ui.ds.buttons.icon-button :refer [icon-button*]]
|
[app.main.ui.ds.buttons.icon-button :refer [icon-button*]]
|
||||||
|
[app.main.ui.ds.foundations.assets.icon :as i]
|
||||||
[app.main.ui.ds.foundations.typography.text :refer [text*]]
|
[app.main.ui.ds.foundations.typography.text :refer [text*]]
|
||||||
[app.main.ui.hooks :as h]
|
[app.main.ui.hooks :as h]
|
||||||
[app.main.ui.hooks.resize :refer [use-resize-hook]]
|
[app.main.ui.hooks.resize :refer [use-resize-hook]]
|
||||||
|
@ -408,7 +409,10 @@
|
||||||
(when can-edit?
|
(when can-edit?
|
||||||
[:> dropdown-menu-item* {:class (stl/css :import-export-menu-item)
|
[:> dropdown-menu-item* {:class (stl/css :import-export-menu-item)
|
||||||
:on-click on-display-file-explorer}
|
:on-click on-display-file-explorer}
|
||||||
(tr "labels.import")])
|
[:div {:class (stl/css :import-menu-item)}
|
||||||
|
[:div (tr "labels.import")]
|
||||||
|
[:div {:class (stl/css :import-export-menu-item-icon) :title (tr "workspace.token.import-tooltip")}
|
||||||
|
[:> i/icon* {:icon-id i/info :aria-label (tr "workspace.token.import-tooltip")}]]]])
|
||||||
[:> dropdown-menu-item* {:class (stl/css :import-export-menu-item)
|
[:> dropdown-menu-item* {:class (stl/css :import-export-menu-item)
|
||||||
:on-click on-export}
|
:on-click on-export}
|
||||||
(tr "labels.export")]]]))
|
(tr "labels.export")]]]))
|
||||||
|
|
|
@ -129,6 +129,19 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.import-export-menu-item-icon {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.import-menu-item {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
.theme-select-wrapper {
|
.theme-select-wrapper {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 0.28fr;
|
grid-template-columns: 1fr 0.28fr;
|
||||||
|
|
|
@ -6789,6 +6789,10 @@ msgstr "TOKENS - %s"
|
||||||
msgid "workspace.token.tools"
|
msgid "workspace.token.tools"
|
||||||
msgstr "Tools"
|
msgstr "Tools"
|
||||||
|
|
||||||
|
#: src/app/main/ui/workspace/tokens/sidebar.cljs:415
|
||||||
|
msgid "workspace.token.import-tooltip"
|
||||||
|
msgstr "Importing a JSON file will override all your current tokens, sets and themes"
|
||||||
|
|
||||||
#: src/app/main/ui/workspace/tokens/token_pill.cljs:123
|
#: src/app/main/ui/workspace/tokens/token_pill.cljs:123
|
||||||
msgid "workspace.token.value-not-valid"
|
msgid "workspace.token.value-not-valid"
|
||||||
msgstr "The value is not valid"
|
msgstr "The value is not valid"
|
||||||
|
|
|
@ -6782,6 +6782,10 @@ msgstr "Valor"
|
||||||
msgid "workspace.token.tools"
|
msgid "workspace.token.tools"
|
||||||
msgstr "Herramientas"
|
msgstr "Herramientas"
|
||||||
|
|
||||||
|
#: src/app/main/ui/workspace/tokens/sidebar.cljs:415
|
||||||
|
msgid "workspace.token.import-tooltip"
|
||||||
|
msgstr "Al importar un fichero JSON sobreescribirás todos tus tokens, sets y themes"
|
||||||
|
|
||||||
#: src/app/main/ui/workspace/tokens/token_pill.cljs:123
|
#: src/app/main/ui/workspace/tokens/token_pill.cljs:123
|
||||||
msgid "workspace.token.value-not-valid"
|
msgid "workspace.token.value-not-valid"
|
||||||
msgstr "El valor no es válido"
|
msgstr "El valor no es válido"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue