From f75af88877c814f3b371258ddfc367cfa145da9d Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Thu, 29 Dec 2022 09:35:35 +0100 Subject: [PATCH] :bug: Fix missing loading icon on shared libraries --- CHANGES.md | 1 + frontend/resources/styles/main/partials/modal.scss | 7 +++++++ frontend/src/app/main/ui/workspace/libraries.cljs | 11 +++++++---- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 07b6d810e..2753544db 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -30,6 +30,7 @@ - Fix display type of component library not persistent [Taiga #4512](https://tree.taiga.io/project/penpot/issue/4512) - Fix problem when moving texts with keyboard [#2690](https://github.com/penpot/penpot/issues/2690) - Fix problem when drawing boxes won't detect mouse-up [Taiga #4618](https://tree.taiga.io/project/penpot/issue/4618) +- Fix missing loading icon on shared libraries [Taiga #4148](https://tree.taiga.io/project/penpot/issue/4148) ### :arrow_up: Deps updates diff --git a/frontend/resources/styles/main/partials/modal.scss b/frontend/resources/styles/main/partials/modal.scss index b89217442..90b917c99 100644 --- a/frontend/resources/styles/main/partials/modal.scss +++ b/frontend/resources/styles/main/partials/modal.scss @@ -736,6 +736,13 @@ width: 50px; margin-bottom: $size-4; } + + & svg#loader-pencil { + fill: $color-gray-20; + height: 75px; + width: 75px; + margin-bottom: $size-4; + } } .libraries-search { diff --git a/frontend/src/app/main/ui/workspace/libraries.cljs b/frontend/src/app/main/ui/workspace/libraries.cljs index 11d3aa465..1e6cdb160 100644 --- a/frontend/src/app/main/ui/workspace/libraries.cljs +++ b/frontend/src/app/main/ui/workspace/libraries.cljs @@ -146,11 +146,14 @@ [:input.item-button {:type "button" :value (tr "workspace.libraries.add") :on-click #(link-library (:id file))}]])] + [:div.section-list-empty - i/library - (if (str/empty? @search-term) - (tr "workspace.libraries.no-shared-libraries-available") - (tr "workspace.libraries.no-matches-for" @search-term))])]])) + (if (nil? shared-files) + i/loader-pencil + [:* i/library + (if (str/empty? @search-term) + (tr "workspace.libraries.no-shared-libraries-available") + (tr "workspace.libraries.no-matches-for" @search-term))])])]])) (mf/defc updates-tab