mirror of
https://github.com/penpot/penpot.git
synced 2025-02-08 16:18:11 -05:00
✨ Show loading message in Libraries modal
This commit is contained in:
parent
8bd10c3c04
commit
d70fc33689
2 changed files with 20 additions and 11 deletions
|
@ -123,11 +123,12 @@
|
||||||
|
|
||||||
shared-libraries
|
shared-libraries
|
||||||
(mf/with-memo [shared-libraries linked-libraries file-id search-term]
|
(mf/with-memo [shared-libraries linked-libraries file-id search-term]
|
||||||
(->> shared-libraries
|
(when shared-libraries
|
||||||
(remove #(= (:id %) file-id))
|
(->> shared-libraries
|
||||||
(remove #(contains? linked-libraries (:id %)))
|
(remove #(= (:id %) file-id))
|
||||||
(filter #(matches-search (:name %) search-term))
|
(remove #(contains? linked-libraries (:id %)))
|
||||||
(sort-by (comp str/lower :name))))
|
(filter #(matches-search (:name %) search-term))
|
||||||
|
(sort-by (comp str/lower :name)))))
|
||||||
|
|
||||||
linked-libraries
|
linked-libraries
|
||||||
(mf/with-memo [linked-libraries]
|
(mf/with-memo [linked-libraries]
|
||||||
|
@ -275,12 +276,17 @@
|
||||||
:on-click link-library}
|
:on-click link-library}
|
||||||
i/add-refactor]])]
|
i/add-refactor]])]
|
||||||
|
|
||||||
[:div {:class (stl/css :section-list-empty)}
|
(when (empty? shared-libraries)
|
||||||
(if (nil? shared-libraries)
|
[:div {:class (stl/css :section-list-empty)}
|
||||||
i/loader-pencil
|
(cond
|
||||||
(if (str/empty? search-term)
|
(nil? shared-libraries)
|
||||||
|
(tr "workspace.libraries.loading")
|
||||||
|
|
||||||
|
(str/empty? search-term)
|
||||||
(tr "workspace.libraries.no-shared-libraries-available")
|
(tr "workspace.libraries.no-shared-libraries-available")
|
||||||
(tr "workspace.libraries.no-matches-for" search-term)))])]]))
|
|
||||||
|
:else
|
||||||
|
(tr "workspace.libraries.no-matches-for" search-term))]))]]))
|
||||||
|
|
||||||
(defn- extract-assets
|
(defn- extract-assets
|
||||||
[file-data library summary?]
|
[file-data library summary?]
|
||||||
|
@ -519,4 +525,3 @@
|
||||||
[:& updates-tab {:file-id file-id
|
[:& updates-tab {:file-id file-id
|
||||||
:file-data file-data
|
:file-data file-data
|
||||||
:libraries libraries}]]]]]]]]))
|
:libraries libraries}]]]]]]]]))
|
||||||
|
|
||||||
|
|
|
@ -3593,6 +3593,10 @@ msgstr "Search shared libraries"
|
||||||
msgid "workspace.libraries.shared-libraries"
|
msgid "workspace.libraries.shared-libraries"
|
||||||
msgstr "SHARED LIBRARIES"
|
msgstr "SHARED LIBRARIES"
|
||||||
|
|
||||||
|
#: src/app/main/ui/workspace/libraries.cljs
|
||||||
|
msgid "workspace.libraries.loading"
|
||||||
|
msgstr "Loading…"
|
||||||
|
|
||||||
#: src/app/main/ui/workspace/sidebar/options/menus/text.cljs
|
#: src/app/main/ui/workspace/sidebar/options/menus/text.cljs
|
||||||
msgid "workspace.libraries.text.multiple-typography"
|
msgid "workspace.libraries.text.multiple-typography"
|
||||||
msgstr "Multiple typographies"
|
msgstr "Multiple typographies"
|
||||||
|
|
Loading…
Add table
Reference in a new issue