From 2f38e7968ccfdba742e51141a063dda5661d44dd Mon Sep 17 00:00:00 2001 From: Corentin Flr <10946971+cogk@users.noreply.github.com> Date: Mon, 22 Apr 2024 13:44:57 +0200 Subject: [PATCH] fix(attribution): Truncate text, hide deps if there are none (#25999) --- frappe/www/attribution.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frappe/www/attribution.html b/frappe/www/attribution.html index 471d9b007c..95c0ba5dc0 100644 --- a/frappe/www/attribution.html +++ b/frappe/www/attribution.html @@ -24,6 +24,7 @@ {{ _("Description") }} {{ app_info.description }} + {% if app_info["dependencies"] %} {{ _("Dependencies") }} @@ -50,6 +51,8 @@ + + {% endif %} {% endfor %} @@ -65,13 +68,13 @@ var author_cell = license_cell.nextElementSibling; if (type_cell.innerText === "JavaScript") { get_info_from_npm(name).then((info) => { - license_cell.innerText = info.license; + license_cell.innerText = info.license?.slice(0, 50); author_cell.innerText = info.author; }); } else if (type_cell.innerText === "Python") { get_info_from_pypi(name).then((info) => { - license_cell.innerText = info.license; + license_cell.innerText = info.license?.slice(0, 50); author_cell.innerText = info.author; }); }