Skip to content

Commit

Permalink
shorten link
Browse files Browse the repository at this point in the history
  • Loading branch information
iBicha committed Apr 2, 2024
1 parent 76a57af commit dc7cded
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion playlet-web/src/lib/Screens/InfoScreen.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit dc7cded

Please sign in to comment.