From 6f415cc04644dfd9e001136c341e17f1a97e2c02 Mon Sep 17 00:00:00 2001 From: Eva Date: Wed, 10 Aug 2022 08:54:34 +0200 Subject: [PATCH] :rewind: Fix shared libraries placehoder --- .../styles/main/partials/dashboard-grid.scss | 22 ++++++++++++++++++- frontend/src/app/main/ui/dashboard/grid.cljs | 4 ++-- .../app/main/ui/dashboard/placeholder.cljs | 7 ++++-- frontend/translations/es.po | 3 +++ frontend/translations/he.po | 1 + frontend/translations/tr.po | 1 + frontend/translations/zh_Hant.po | 5 +---- 7 files changed, 34 insertions(+), 9 deletions(-) diff --git a/frontend/resources/styles/main/partials/dashboard-grid.scss b/frontend/resources/styles/main/partials/dashboard-grid.scss index 8c82652f9..881b75b35 100644 --- a/frontend/resources/styles/main/partials/dashboard-grid.scss +++ b/frontend/resources/styles/main/partials/dashboard-grid.scss @@ -338,7 +338,27 @@ background-color: rgba(227, 227, 227, 0.3); padding: 13px; margin-right: 13px; - + &.libs { + background-image: url(/images/ph-left.svg), url(/images/ph-right.svg); + background-position: 15% bottom, 85% top; + background-repeat: no-repeat; + align-items: center; + border: 1px dashed #b1b2b5; + border-radius: 3px; + display: flex; + flex-direction: column; + height: 200px; + margin: 1rem; + padding: 3rem; + justify-content: center; + .text { + p { + max-width: 360px; + text-align: center; + font-size: $fs16; + } + } + } .create-new { background-color: white; border: 2px solid $color-gray-10; diff --git a/frontend/src/app/main/ui/dashboard/grid.cljs b/frontend/src/app/main/ui/dashboard/grid.cljs index c51e1dbf9..07e15fdf8 100644 --- a/frontend/src/app/main/ui/dashboard/grid.cljs +++ b/frontend/src/app/main/ui/dashboard/grid.cljs @@ -273,12 +273,12 @@ :key (:id item) :navigate? true :origin origin}])] - :else [:& empty-placeholder {:default? (:is-default project) :on-create-clicked on-create-clicked :project project - :limit limit}])])) + :limit limit + :origin origin}])])) (mf/defc line-grid-row [{:keys [files selected-files dragging? limit] :as props}] diff --git a/frontend/src/app/main/ui/dashboard/placeholder.cljs b/frontend/src/app/main/ui/dashboard/placeholder.cljs index e0a83badc..f1c57fff6 100644 --- a/frontend/src/app/main/ui/dashboard/placeholder.cljs +++ b/frontend/src/app/main/ui/dashboard/placeholder.cljs @@ -11,13 +11,16 @@ [rumext.alpha :as mf])) (mf/defc empty-placeholder - [{:keys [dragging? on-create-clicked project limit] :as props}] + [{:keys [dragging? on-create-clicked project limit origin] :as props}] (cond (true? dragging?) [:div.grid-row.no-wrap {:style {:grid-template-columns (str "repeat(" limit ", 1fr)")}} [:div.grid-item]] - + (= :libraries origin) + [:div.grid-empty-placeholder.libs {:data-test "empty-placeholder"} + [:div.text + [:& i18n/tr-html {:label "dashboard.empty-placeholder-drafts"}]]] :else [:div.grid-empty-placeholder {:style {:grid-template-columns (str "repeat(" limit ", 1fr)")}} diff --git a/frontend/translations/es.po b/frontend/translations/es.po index ce84b24b5..57023a58c 100644 --- a/frontend/translations/es.po +++ b/frontend/translations/es.po @@ -277,6 +277,7 @@ msgid "dashboard.empty-files" msgstr "Todavía no hay ningún archivo aquí" #: src/app/main/ui/dashboard/grid.cljs +#, markdown msgid "dashboard.empty-placeholder-drafts" msgstr "" "¡Oh, no! ¡Aún no tienes archivos! Si quieres probar con alguna plantilla ve " @@ -378,6 +379,7 @@ msgid_plural "dashboard.fonts.fonts-added" msgstr[0] "1 fuente añadida" msgstr[1] "%s fuentes añadidas" +#, markdown msgid "dashboard.fonts.hero-text1" msgstr "" "Cualquier fuente personalizada añadida aquí aparecerá en la lista de " @@ -386,6 +388,7 @@ msgstr "" "como una **única familia de fuentes**. Se pueden cargar fuentes con los " "siguientes formatos: **TTF, OTF and WOFF** (con uno es suficiente)." +#, markdown msgid "dashboard.fonts.hero-text2" msgstr "" "Sólo deberías cargar fuentes que te pertenecen o de las que tienes una " diff --git a/frontend/translations/he.po b/frontend/translations/he.po index 9857730dc..a3de909ee 100644 --- a/frontend/translations/he.po +++ b/frontend/translations/he.po @@ -230,6 +230,7 @@ msgid "dashboard.empty-files" msgstr "עדיין אין לך כאן קבצים" #: src/app/main/ui/dashboard/grid.cljs +#, markdown msgid "dashboard.empty-placeholder-drafts" msgstr "" "אבוי! עדיין אין לך קבצים! כדי להתנסות עם כמה מהתבניות ניתן לגשת אל [הספריות " diff --git a/frontend/translations/tr.po b/frontend/translations/tr.po index c3bc1dfda..5eccc9966 100644 --- a/frontend/translations/tr.po +++ b/frontend/translations/tr.po @@ -237,6 +237,7 @@ msgid "dashboard.empty-files" msgstr "Burada hiç dosyan yok" #: src/app/main/ui/dashboard/grid.cljs +#, markdown msgid "dashboard.empty-placeholder-drafts" msgstr "" "Olamaz! Henüz dosyanız yok! Bazı şablonları denemek isterseniz " diff --git a/frontend/translations/zh_Hant.po b/frontend/translations/zh_Hant.po index 104ee5422..ba0303d33 100644 --- a/frontend/translations/zh_Hant.po +++ b/frontend/translations/zh_Hant.po @@ -227,18 +227,16 @@ msgid "dashboard.duplicate-multi" msgstr "複製 %s 個檔案" #: src/app/main/ui/dashboard/grid.cljs -#, fuzzy msgid "dashboard.empty-files" msgstr "你在這裡還沒有文件" #: src/app/main/ui/dashboard/grid.cljs -#, fuzzy, markdown +#, markdown msgid "dashboard.empty-placeholder-drafts" msgstr "" "這裡還沒有文件,如果你想嘗試一些模板,你可以前往 [資料庫 & " "模板區段](https://penpot.app/libraries-templates.html)" -#, fuzzy msgid "dashboard.export-frames" msgstr "將 artboards 匯出為 PDF..." @@ -251,7 +249,6 @@ msgstr "匯出檔案" msgid "dashboard.export.detail" msgstr "* 可能會包含元件、圖像、顏色及/或文字編排。" -#, fuzzy msgid "dashboard.export.explain" msgstr "你想匯出的單個或多個檔案中使用了共用資料庫,你想要如何處理它們的素材*?"