shorten link

This commit is contained in:
Brahim Hadriche committed 2024-04-02 13:32:03 -04:00
1 parent 76a57af5a0
commit dc7cded3f5
1 file changed
+5 -1
@@ -66,7 +66,11 @@
case "lib_version_latest":
return `<a class="link" href="https://github.com/iBicha/playlet/releases/tag/v${value}" target="_blank" rel="noopener noreferrer">${value}</a>`;
case "lib_url":
return `<a class="link" href="${value}" target="_blank" rel="noopener noreferrer">${value}</a>`;
const filename =
value && value.includes("/") && value.endsWith(".zip")
? value.substring(value.lastIndexOf("/") + 1)
: value;
return `<a class="link" href="${value}" target="_blank" rel="noopener noreferrer">${filename}</a>`;
case "app_git_commit_hash":
case "lib_git_commit_hash":
if (value === "unknown") {