mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 12:21:38 +02:00
🐛 Fix import error messages (#6265)
This commit is contained in:
parent
6f2f1b7a76
commit
caf558f8dd
6 changed files with 83 additions and 18 deletions
|
@ -20,6 +20,7 @@
|
||||||
- Fix problem with error detail in toast [Taiga #10519](https://tree.taiga.io/project/penpot/issue/10519)
|
- Fix problem with error detail in toast [Taiga #10519](https://tree.taiga.io/project/penpot/issue/10519)
|
||||||
- Fix view mode error when an external user tries to export something from a prototype using a shared link [Taiga #10251](https://tree.taiga.io/project/penpot/issue/10251)
|
- Fix view mode error when an external user tries to export something from a prototype using a shared link [Taiga #10251](https://tree.taiga.io/project/penpot/issue/10251)
|
||||||
- Fix merge path nodes with only one node selected [Taiga #9626](https://tree.taiga.io/project/penpot/issue/9626)
|
- Fix merge path nodes with only one node selected [Taiga #9626](https://tree.taiga.io/project/penpot/issue/9626)
|
||||||
|
- Fix problem with import errors [Taiga #10040](https://tree.taiga.io/project/penpot/issue/10040)
|
||||||
|
|
||||||
## 2.6.1
|
## 2.6.1
|
||||||
|
|
||||||
|
|
|
@ -291,7 +291,7 @@
|
||||||
|
|
||||||
import-error?
|
import-error?
|
||||||
[:div {:class (stl/css :error-message)}
|
[:div {:class (stl/css :error-message)}
|
||||||
(tr "dashboard.import.import-error")]
|
(tr "labels.error")]
|
||||||
|
|
||||||
(and (not import-success?) (some? progress))
|
(and (not import-success?) (some? progress))
|
||||||
[:div {:class (stl/css :progress-message)} (parse-progress-message progress)])
|
[:div {:class (stl/css :progress-message)} (parse-progress-message progress)])
|
||||||
|
@ -443,7 +443,12 @@
|
||||||
|
|
||||||
(and (seq entries)
|
(and (seq entries)
|
||||||
(every? #(= :import-success (:status %)) entries))
|
(every? #(= :import-success (:status %)) entries))
|
||||||
(reset! status* :import-success)))
|
(reset! status* :import-success)
|
||||||
|
|
||||||
|
(and (seq entries)
|
||||||
|
(and (every? #(not= :import-ready (:status %)) entries)
|
||||||
|
(some #(= :import-error (:status %)) entries)))
|
||||||
|
(reset! status* :import-error)))
|
||||||
|
|
||||||
;; Run analyze operation on component mount
|
;; Run analyze operation on component mount
|
||||||
(mf/with-effect []
|
(mf/with-effect []
|
||||||
|
@ -469,6 +474,21 @@
|
||||||
{:level (if (zero? import-success-total) :warning :success)
|
{:level (if (zero? import-success-total) :warning :success)
|
||||||
:content (tr "dashboard.import.import-message" (i18n/c import-success-total))}])
|
:content (tr "dashboard.import.import-message" (i18n/c import-success-total))}])
|
||||||
|
|
||||||
|
(when (= :import-error status)
|
||||||
|
[:& context-notification
|
||||||
|
{:level :error
|
||||||
|
:class (stl/css :context-notification-error)
|
||||||
|
:content (tr "dashboard.import.import-error.disclaimer")}])
|
||||||
|
|
||||||
|
(if (= :import-error status)
|
||||||
|
[:div {:class (stl/css :import-error-disclaimer)}
|
||||||
|
[:div (tr "dashboard.import.import-error.message1")]
|
||||||
|
[:ul {:class (stl/css :import-error-list)}
|
||||||
|
(for [entry entries]
|
||||||
|
(when (= :import-error (:status entry))
|
||||||
|
[:li {:class (stl/css :import-error-list-enry)} (:name entry)]))]
|
||||||
|
[:div (tr "dashboard.import.import-error.message2")]]
|
||||||
|
|
||||||
(for [entry entries]
|
(for [entry entries]
|
||||||
[:> import-entry* {:edition edition
|
[:> import-entry* {:edition edition
|
||||||
:key (dm/str (:uri entry) "/" (:file-id entry))
|
:key (dm/str (:uri entry) "/" (:file-id entry))
|
||||||
|
@ -477,7 +497,7 @@
|
||||||
:on-edit on-edit
|
:on-edit on-edit
|
||||||
:on-change on-entry-change
|
:on-change on-entry-change
|
||||||
:on-delete on-entry-delete
|
:on-delete on-entry-delete
|
||||||
:can-be-deleted (> (count entries) 1)}])
|
:can-be-deleted (> (count entries) 1)}]))
|
||||||
|
|
||||||
(when (some? template)
|
(when (some? template)
|
||||||
[:> import-entry* {:entry (assoc template :status status)
|
[:> import-entry* {:entry (assoc template :status status)
|
||||||
|
@ -499,6 +519,7 @@
|
||||||
:on-click on-continue}])
|
:on-click on-continue}])
|
||||||
|
|
||||||
(when (or (= :import-success status)
|
(when (or (= :import-success status)
|
||||||
|
(= :import-error status)
|
||||||
(= :import-progress status))
|
(= :import-progress status))
|
||||||
[:input {:class (stl/css :accept-btn)
|
[:input {:class (stl/css :accept-btn)
|
||||||
:type "button"
|
:type "button"
|
||||||
|
|
17
frontend/src/app/main/ui/dashboard/import.scss
vendored
17
frontend/src/app/main/ui/dashboard/import.scss
vendored
|
@ -192,3 +192,20 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.context-notification-error {
|
||||||
|
--context-notification-bg-color: var(--modal-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.import-error-disclaimer {
|
||||||
|
color: var(--color-foreground-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.import-error-list {
|
||||||
|
padding: 0 var(--sp-l);
|
||||||
|
list-style: disc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.import-error-list-enry {
|
||||||
|
padding: var(--sp-xs) 0;
|
||||||
|
}
|
||||||
|
|
|
@ -38,13 +38,16 @@
|
||||||
"They are persistent, informative and non-actionable.
|
"They are persistent, informative and non-actionable.
|
||||||
They are contextual messages in specific areas off the app"
|
They are contextual messages in specific areas off the app"
|
||||||
{::mf/props :obj}
|
{::mf/props :obj}
|
||||||
[{:keys [level content links is-html] :as props}]
|
[{:keys [level content links is-html class] :as props}]
|
||||||
[:aside {:class (stl/css-case :context-notification true
|
[:aside {:class (dm/str
|
||||||
|
class
|
||||||
|
" "
|
||||||
|
(stl/css-case :context-notification true
|
||||||
:contain-html is-html
|
:contain-html is-html
|
||||||
:warning (= level :warning)
|
:warning (= level :warning)
|
||||||
:error (= level :error)
|
:error (= level :error)
|
||||||
:success (= level :success)
|
:success (= level :success)
|
||||||
:info (= level :info))}
|
:info (= level :info)))}
|
||||||
|
|
||||||
(get-icon-by-level level)
|
(get-icon-by-level level)
|
||||||
|
|
||||||
|
|
|
@ -1932,6 +1932,9 @@ msgstr "Drafts"
|
||||||
msgid "labels.edit"
|
msgid "labels.edit"
|
||||||
msgstr "Edit"
|
msgstr "Edit"
|
||||||
|
|
||||||
|
msgid "labels.error"
|
||||||
|
msgstr "Error"
|
||||||
|
|
||||||
#, unused
|
#, unused
|
||||||
msgid "labels.edit-file"
|
msgid "labels.edit-file"
|
||||||
msgstr "Edit file"
|
msgstr "Edit file"
|
||||||
|
@ -7276,3 +7279,11 @@ msgstr "Click to close the path"
|
||||||
msgid "workspace.notification-pill.detail"
|
msgid "workspace.notification-pill.detail"
|
||||||
msgstr "Details"
|
msgstr "Details"
|
||||||
|
|
||||||
|
msgid "dashboard.import.import-error.disclaimer"
|
||||||
|
msgstr "Not all files have been imported"
|
||||||
|
|
||||||
|
msgid "dashboard.import.import-error.message1"
|
||||||
|
msgstr "The following files have errors:"
|
||||||
|
|
||||||
|
msgid "dashboard.import.import-error.message2"
|
||||||
|
msgstr "Files with errors will not be uploaded."
|
||||||
|
|
|
@ -1955,6 +1955,9 @@ msgstr "Borradores"
|
||||||
msgid "labels.edit"
|
msgid "labels.edit"
|
||||||
msgstr "Editar"
|
msgstr "Editar"
|
||||||
|
|
||||||
|
msgid "labels.error"
|
||||||
|
msgstr "Error"
|
||||||
|
|
||||||
#, unused
|
#, unused
|
||||||
msgid "labels.edit-file"
|
msgid "labels.edit-file"
|
||||||
msgstr "Editar archivo"
|
msgstr "Editar archivo"
|
||||||
|
@ -7251,3 +7254,12 @@ msgstr "Pulsar para cerrar la ruta"
|
||||||
|
|
||||||
msgid "workspace.notification-pill.detail"
|
msgid "workspace.notification-pill.detail"
|
||||||
msgstr "Detalles"
|
msgstr "Detalles"
|
||||||
|
|
||||||
|
msgid "dashboard.import.import-error.disclaimer"
|
||||||
|
msgstr "No todos los ficheros han sido importados"
|
||||||
|
|
||||||
|
msgid "dashboard.import.import-error.message1"
|
||||||
|
msgstr "Estos ficheros tienen errores:"
|
||||||
|
|
||||||
|
msgid "dashboard.import.import-error.message2"
|
||||||
|
msgstr "Los ficheros con error no serán importados."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue