diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b59f5eb..cab4f410 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- links to the app info in web app + ### Fixed - Video duration formatting in cast dialog diff --git a/playlet-web/src/lib/ScreenInfo.svelte b/playlet-web/src/lib/ScreenInfo.svelte index 2fc45e5b..6d640907 100644 --- a/playlet-web/src/lib/ScreenInfo.svelte +++ b/playlet-web/src/lib/ScreenInfo.svelte @@ -14,6 +14,26 @@ id: "App ID", }; + function transformValue(key, value) { + switch (key) { + case "version": + case "lib_version": + case "lib_version_latest": + return `${value}`; + case "lib_url": + return `${value}`; + case "git_commit_hash": + case "lib_git_commit_hash": + if (value === "unknown") { + return value; + } + return `${value}`; + default: + break; + } + return value; + } + let appInfo = {}; let deviceInfo = {}; let invidiousInfo = {}; @@ -52,13 +72,21 @@ ${JSON.stringify(invidiousInfo, null, 2)} \`\`\` ${JSON.stringify(preferencesInfo, null, 2)} \`\`\``; - return `https://github.com/iBicha/playlet/issues/new?title=${encodeURIComponent(title)}&body=${encodeURIComponent(body)}`; + title = encodeURIComponent(title); + body = encodeURIComponent(body); + return `https://github.com/iBicha/playlet/issues/new?title=${title}&body=${body}`; }
| {value} | -{appInfo[key]} | +{@html transformValue(key, appInfo[key])} |