0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-15 01:01:30 -05:00

Merge remote-tracking branch 'origin/staging' into develop

This commit is contained in:
Alejandro Alonso 2023-03-08 07:25:19 +01:00
commit c3ce0eb794
18 changed files with 60 additions and 26 deletions

View file

@ -1,5 +1,6 @@
# CHANGELOG # CHANGELOG
<<<<<<< HEAD
## :rocket: Next ## :rocket: Next
### :boom: Breaking changes & Deprecations ### :boom: Breaking changes & Deprecations
@ -28,6 +29,8 @@
- To @ondrejkonec: for contributing to the code with: - To @ondrejkonec: for contributing to the code with:
- Refactor CSS variables [Github #2948](https://github.com/penpot/penpot/pull/2948) - Refactor CSS variables [Github #2948](https://github.com/penpot/penpot/pull/2948)
=======
>>>>>>> origin/staging
## 1.17.3 ## 1.17.3
### :bug: Bugs fixed ### :bug: Bugs fixed
@ -35,6 +38,14 @@
- Fix custom fonts not rendered correctly [Taiga #4874](https://tree.taiga.io/project/penpot/issue/4874) - Fix custom fonts not rendered correctly [Taiga #4874](https://tree.taiga.io/project/penpot/issue/4874)
- Fix problem with shadows and blur on multiple selection - Fix problem with shadows and blur on multiple selection
- Fix problem with redo shortcut - Fix problem with redo shortcut
- Fix Component texts not displayed in assets panel [Taiga #4907](https://tree.taiga.io/project/penpot/issue/4907)
- Fix search field has implemented shared styles for "close icon" and "search icon" [Taiga #4927](https://tree.taiga.io/project/penpot/issue/4927)
- Fix Handling correctly slashes "/" in emails [Taiga #4906](https://tree.taiga.io/project/penpot/issue/4906)
- Fix Change text color from selected colors [Taiga #4933](https://tree.taiga.io/project/penpot/issue/4933)
### :sparkles: Enhancements
- Adds environment variables for specifying the export and backend URI for the frontend docker image, thanks to @Supernova3339 for the initial PR and suggestion [Github #2984](https://github.com/penpot/penpot/issues/2984)
## 1.17.2 ## 1.17.2

View file

@ -112,7 +112,7 @@
;; --- SPEC: email ;; --- SPEC: email
(def email-re #"[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+") (def email-re #"[a-zA-Z0-9_.+-\\\\]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+")
(defn parse-email (defn parse-email
[s] [s]

View file

@ -8,7 +8,7 @@ RUN set -ex; \
ADD ./bundle-frontend/ /var/www/app/ ADD ./bundle-frontend/ /var/www/app/
ADD ./files/config.js /var/www/app/js/config.js ADD ./files/config.js /var/www/app/js/config.js
ADD ./files/nginx.conf /etc/nginx/nginx.conf ADD ./files/nginx.conf /etc/nginx/nginx.conf.template
ADD ./files/nginx-entrypoint.sh /entrypoint.sh ADD ./files/nginx-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]

View file

@ -1,9 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
log() {
echo "[$(date +%Y-%m-%dT%H:%M:%S%:z)] $*"
}
######################################### #########################################
## App Frontend config ## App Frontend config
######################################### #########################################
@ -17,4 +13,15 @@ update_flags() {
} }
update_flags /var/www/app/js/config.js update_flags /var/www/app/js/config.js
#########################################
## Nginx Config
#########################################
export PENPOT_BACKEND_URI=${PENPOT_BACKEND_URI:-http://penpot-backend:6060};
export PENPOT_EXPORTER_URI=${PENPOT_EXPORTER_URI:-http://penpot-exporter};
envsubst "\$PENPOT_BACKEND_URI,\$PENPOT_EXPORTER_URI" < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
exec "$@"; exec "$@";

View file

@ -82,7 +82,7 @@ http {
} }
location /assets { location /assets {
proxy_pass http://penpot-backend:6060/assets; proxy_pass $PENPOT_BACKEND_URI/assets;
recursive_error_pages on; recursive_error_pages on;
proxy_intercept_errors on; proxy_intercept_errors on;
error_page 301 302 307 = @handle_redirect; error_page 301 302 307 = @handle_redirect;
@ -95,21 +95,17 @@ http {
} }
location /api/export { location /api/export {
proxy_pass http://penpot-exporter:6061; proxy_pass $PENPOT_EXPORTER_URI;
} }
location /api { location /api {
proxy_pass http://penpot-backend:6060/api; proxy_pass $PENPOT_BACKEND_URI/api;
} }
# location /admin {
# proxy_pass http://penpot-admin:6065/admin;
# }
location /ws/notifications { location /ws/notifications {
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade'; proxy_set_header Connection 'upgrade';
proxy_pass http://penpot-backend:6060/ws/notifications; proxy_pass $PENPOT_BACKEND_URI/ws/notifications;
} }
location / { location / {

View file

@ -337,15 +337,15 @@
fill: $color-gray-30; fill: $color-gray-30;
height: 15px; height: 15px;
width: 15px; width: 15px;
&:hover {
fill: $color-danger;
}
} }
} }
.clear-search svg { .clear-search svg {
transform: rotate(45deg); transform: rotate(45deg);
&:hover {
fill: $color-danger;
}
} }
} }

View file

@ -338,7 +338,7 @@
(defn change-text-color (defn change-text-color
[old-color new-color index node] [old-color new-color index node]
(let [fills (:fills node) (let [fills (map #(dissoc % :fill-color-ref-id :fill-color-ref-file) (:fills node))
parsed-color (d/without-nils (color-att->text old-color)) parsed-color (d/without-nils (color-att->text old-color))
parsed-new-color (d/without-nils (color-att->text new-color)) parsed-new-color (d/without-nils (color-att->text new-color))
has-color? (d/index-of fills parsed-color)] has-color? (d/index-of fills parsed-color)]

View file

@ -287,7 +287,6 @@
:fill "none"} :fill "none"}
[:& shape-wrapper {:shape frame}]]])) [:& shape-wrapper {:shape frame}]]]))
;; Component for rendering a thumbnail of a single componenent. Mainly ;; Component for rendering a thumbnail of a single componenent. Mainly
;; used to render thumbnails on assets panel. ;; used to render thumbnails on assets panel.
(mf/defc component-svg (mf/defc component-svg
@ -334,7 +333,8 @@
:fill "none"} :fill "none"}
[:> shape-container {:shape root-shape} [:> shape-container {:shape root-shape}
[:& root-shape-wrapper {:shape root-shape :view-box vbox}]]])) [:& (mf/provider muc/is-component?) {:value true}
[:& root-shape-wrapper {:shape root-shape :view-box vbox}]]]]))
(mf/defc object-svg (mf/defc object-svg
{::mf/wrap [mf/memo]} {::mf/wrap [mf/memo]}
@ -468,7 +468,7 @@
(let [texts (->> objects (let [texts (->> objects
(vals) (vals)
(filterv #(= (:type %) :text)) (filterv #(= (:type %) :text))
(mapv :content)) ] (mapv :content))]
(->> (rx/from texts) (->> (rx/from texts)
(rx/map fonts/get-content-fonts) (rx/map fonts/get-content-fonts)

View file

@ -27,3 +27,4 @@
(def current-zoom (mf/create-context nil)) (def current-zoom (mf/create-context nil))
(def workspace-read-only? (mf/create-context nil)) (def workspace-read-only? (mf/create-context nil))
(def is-component? (mf/create-context false))

View file

@ -8,6 +8,8 @@
(:require (:require
[app.common.text :as txt] [app.common.text :as txt]
[app.main.fonts :as fonts] [app.main.fonts :as fonts]
[app.main.ui.context :as ctx]
[app.main.ui.shapes.text.fo-text :as fo]
[app.main.ui.shapes.text.svg-text :as svg] [app.main.ui.shapes.text.svg-text :as svg]
[app.util.object :as obj] [app.util.object :as obj]
[rumext.v2 :as mf])) [rumext.v2 :as mf]))
@ -22,10 +24,13 @@
(mf/defc text-shape (mf/defc text-shape
{::mf/wrap-props false} {::mf/wrap-props false}
[props] [props]
(let [{:keys [position-data content] :as shape} (obj/get props "shape")] (let [{:keys [position-data content] :as shape} (obj/get props "shape")
is-component? (mf/use-ctx ctx/is-component?)]
(mf/with-memo [content] (mf/with-memo [content]
(load-fonts! content)) (load-fonts! content))
(when (some? position-data) ;; Old components can have texts without position data that must be rendered via foreign key
[:> svg/text-shape props]))) (cond
(some? position-data) [:> svg/text-shape props]
is-component? [:> fo/text-shape props])))

View file

@ -400,6 +400,7 @@ msgstr[3] "عدد قليل من الخطوط المضافة"
msgstr[4] "تمت إضافة العديد من الخطوط" msgstr[4] "تمت إضافة العديد من الخطوط"
msgstr[5] "" msgstr[5] ""
#, markdown
msgid "dashboard.fonts.hero-text1" msgid "dashboard.fonts.hero-text1"
msgstr "" msgstr ""
"ستتم إضافة أي خط ويب تقوم بتحميله هنا إلى قائمة عائلة الخطوط المتوفرة في " "ستتم إضافة أي خط ويب تقوم بتحميله هنا إلى قائمة عائلة الخطوط المتوفرة في "
@ -407,6 +408,7 @@ msgstr ""
"عائلة الخطوط على أنها ** عائلة خط واحدة **. يمكنك تحميل الخطوط بالتنسيقات " "عائلة الخطوط على أنها ** عائلة خط واحدة **. يمكنك تحميل الخطوط بالتنسيقات "
"التالية: ** TTF و OTF و WOFF ** (ستحتاج إلى تنسيق واحد فقط)." "التالية: ** TTF و OTF و WOFF ** (ستحتاج إلى تنسيق واحد فقط)."
#, markdown
msgid "dashboard.fonts.hero-text2" msgid "dashboard.fonts.hero-text2"
msgstr "" msgstr ""
"يجب عليك فقط تحميل الخطوط التي تمتلكها أو لديك ترخيص لاستخدامها في Penpot. " "يجب عليك فقط تحميل الخطوط التي تمتلكها أو لديك ترخيص لاستخدامها في Penpot. "

View file

@ -409,6 +409,7 @@ msgid_plural "dashboard.fonts.fonts-added"
msgstr[0] "1 Schriftart hinzugefügt" msgstr[0] "1 Schriftart hinzugefügt"
msgstr[1] "%s Schriftarten hinzugefügt" msgstr[1] "%s Schriftarten hinzugefügt"
#, markdown
msgid "dashboard.fonts.hero-text1" msgid "dashboard.fonts.hero-text1"
msgstr "" msgstr ""
"Jede Webschriftart, die Sie hier hochladen, wird der Liste der Schriftarten " "Jede Webschriftart, die Sie hier hochladen, wird der Liste der Schriftarten "
@ -418,6 +419,7 @@ msgstr ""
"den folgenden Formaten hochladen: **TTF, OTF und WOFF** (nur eine wird " "den folgenden Formaten hochladen: **TTF, OTF und WOFF** (nur eine wird "
"benötigt)." "benötigt)."
#, markdown
msgid "dashboard.fonts.hero-text2" msgid "dashboard.fonts.hero-text2"
msgstr "" msgstr ""
"Sie sollten nur Schriftarten hochladen, die Sie besitzen oder für die Sie " "Sie sollten nur Schriftarten hochladen, die Sie besitzen oder für die Sie "

View file

@ -780,7 +780,7 @@ msgstr "The email «%s» has been reported as spam or permanently bounce."
#: src/app/main/errors.cljs #: src/app/main/errors.cljs
msgid "errors.feature-mismatch" msgid "errors.feature-mismatch"
msgstr "" msgstr ""
"Looks like you are opening a file that has the feature '%s' enabled bug " "Looks like you are opening a file that has the feature '%s' enabled but "
"your penpot frontend does not supports it or has it disabled." "your penpot frontend does not supports it or has it disabled."
#: src/app/main/errors.cljs #: src/app/main/errors.cljs

View file

@ -407,6 +407,7 @@ msgid_plural "dashboard.fonts.fonts-added"
msgstr[0] "1 fuente añadida" msgstr[0] "1 fuente añadida"
msgstr[1] "%s fuentes añadidas" msgstr[1] "%s fuentes añadidas"
#, markdown
msgid "dashboard.fonts.hero-text1" msgid "dashboard.fonts.hero-text1"
msgstr "" msgstr ""
"Cualquier fuente personalizada añadida aquí aparecerá en la lista de " "Cualquier fuente personalizada añadida aquí aparecerá en la lista de "
@ -415,6 +416,7 @@ msgstr ""
"como una **única familia de fuentes**. Se pueden cargar fuentes con los " "como una **única familia de fuentes**. Se pueden cargar fuentes con los "
"siguientes formatos: **TTF, OTF and WOFF** (con uno es suficiente)." "siguientes formatos: **TTF, OTF and WOFF** (con uno es suficiente)."
#, markdown
msgid "dashboard.fonts.hero-text2" msgid "dashboard.fonts.hero-text2"
msgstr "" msgstr ""
"Sólo deberías cargar fuentes que te pertenecen o de las que tienes una " "Sólo deberías cargar fuentes que te pertenecen o de las que tienes una "

View file

@ -411,6 +411,7 @@ msgid_plural "dashboard.fonts.fonts-added"
msgstr[0] "1 police ajoutée" msgstr[0] "1 police ajoutée"
msgstr[1] "%s polices ajoutées" msgstr[1] "%s polices ajoutées"
#, markdown
msgid "dashboard.fonts.hero-text1" msgid "dashboard.fonts.hero-text1"
msgstr "" msgstr ""
"Toute police Web que vous téléchargez sera ajoutée à la liste de polices de " "Toute police Web que vous téléchargez sera ajoutée à la liste de polices de "
@ -419,6 +420,7 @@ msgstr ""
"**une seule famille de polices**. Vous pouvez télécharger les polices au " "**une seule famille de polices**. Vous pouvez télécharger les polices au "
"formats suivants : **TTF, OTF et WOFF** (un seul format est nécessaire)." "formats suivants : **TTF, OTF et WOFF** (un seul format est nécessaire)."
#, markdown
msgid "dashboard.fonts.hero-text2" msgid "dashboard.fonts.hero-text2"
msgstr "" msgstr ""
"Ne téléchargez que des polices que vous possédez ou dont la license vous " "Ne téléchargez que des polices que vous possédez ou dont la license vous "

View file

@ -401,6 +401,7 @@ msgid_plural "dashboard.fonts.fonts-added"
msgstr[0] "Engadiuse 1 fonte" msgstr[0] "Engadiuse 1 fonte"
msgstr[1] "Engadíronse % fontes" msgstr[1] "Engadíronse % fontes"
#, markdown
msgid "dashboard.fonts.hero-text1" msgid "dashboard.fonts.hero-text1"
msgstr "" msgstr ""
"Calquera fonte que cargues aquí engadirase na listaxe de familias de fontes " "Calquera fonte que cargues aquí engadirase na listaxe de familias de fontes "
@ -409,6 +410,7 @@ msgstr ""
"Podes cargar fontes cos seguintes formatos: **TTF, OFT e WOFF** (só se " "Podes cargar fontes cos seguintes formatos: **TTF, OFT e WOFF** (só se "
"precisa un)." "precisa un)."
#, markdown
msgid "dashboard.fonts.hero-text2" msgid "dashboard.fonts.hero-text2"
msgstr "" msgstr ""
"Só debes cargar fontes da túa propiedade ou das que teñas licenza para usar " "Só debes cargar fontes da túa propiedade ou das que teñas licenza para usar "

View file

@ -390,6 +390,7 @@ msgstr[1] "נוספו 2 גופנים"
msgstr[2] "נוספו %s גופנים" msgstr[2] "נוספו %s גופנים"
msgstr[3] "נוספו %s גופנים" msgstr[3] "נוספו %s גופנים"
#, markdown
msgid "dashboard.fonts.hero-text1" msgid "dashboard.fonts.hero-text1"
msgstr "" msgstr ""
"כל גופן דפדפן שיועלה כאן יתווסף לרשימת משפחת הגופנים שזמין במאפייני הטקסט " "כל גופן דפדפן שיועלה כאן יתווסף לרשימת משפחת הגופנים שזמין במאפייני הטקסט "
@ -397,6 +398,7 @@ msgstr ""
"גופנים יחידה**. ניתן להעלות גופנים מהסוגים הבאים: **TTF, OTF ו־WOFF** (אחד " "גופנים יחידה**. ניתן להעלות גופנים מהסוגים הבאים: **TTF, OTF ו־WOFF** (אחד "
"הסוגים יספיק)." "הסוגים יספיק)."
#, markdown
msgid "dashboard.fonts.hero-text2" msgid "dashboard.fonts.hero-text2"
msgstr "" msgstr ""
"עליך להעלות גופנים בבעלותך או שיש לך רישיון להשתמש בהם ב־Penpot. ניתן למצוא " "עליך להעלות גופנים בבעלותך או שיש לך רישיון להשתמש בהם ב־Penpot. ניתן למצוא "

View file

@ -398,6 +398,7 @@ msgid_plural "dashboard.fonts.fonts-added"
msgstr[0] "1 font aggiunto" msgstr[0] "1 font aggiunto"
msgstr[1] "%s font aggiunti" msgstr[1] "%s font aggiunti"
#, markdown
msgid "dashboard.fonts.hero-text1" msgid "dashboard.fonts.hero-text1"
msgstr "" msgstr ""
"Qualsiasi font web caricato qui verrà aggiunto alla lista dei font family " "Qualsiasi font web caricato qui verrà aggiunto alla lista dei font family "
@ -406,6 +407,7 @@ msgstr ""
"**singolo font family**. È possibile caricare font con i seguenti " "**singolo font family**. È possibile caricare font con i seguenti "
"formati:**TTF, OTF e WOFF**(uno solo di questi è necessario)." "formati:**TTF, OTF e WOFF**(uno solo di questi è necessario)."
#, markdown
msgid "dashboard.fonts.hero-text2" msgid "dashboard.fonts.hero-text2"
msgstr "" msgstr ""
"È consigliabile caricare unicamente font di cui si è proprietari o dei " "È consigliabile caricare unicamente font di cui si è proprietari o dei "