Require login for initial software downloads

This commit is contained in:
lwt
2026-06-09 15:07:58 +08:00
parent cadaa0a1c5
commit 539729ae00
3 changed files with 11 additions and 2 deletions
+9
View File
@@ -132,6 +132,15 @@ function downloadButton(item) {
if (!href) {
return `<span class="download-button is-disabled">待上传</span>`;
}
if (!state.player) {
return `<a class="download-button login-required" href="login.html?next=${encodeURIComponent(href)}">
<svg aria-hidden="true" viewBox="0 0 24 24">
<path d="M12 3 5 6v5c0 4.6 2.8 8.5 7 10 4.2-1.5 7-5.4 7-10V6l-7-3Z"></path>
<path d="m9.5 12 1.7 1.7 3.6-4"></path>
</svg>
登录下载
</a>`;
}
return `<a class="download-button" href="${escapeHtml(href)}">
<svg aria-hidden="true" viewBox="0 0 24 24">
<path d="M12 3v12"></path>