feat(download): add share button to download page

Introduce a new "Share" button on the download page to allow users to easily share the box link.

- Add the share button markup and SVG icon to `download.html`
- Include the `13-share.js` script in the base layout to handle the share action
- Add CSS styling for the share button in `30-download.css`
This commit is contained in:
2026-06-08 12:02:30 +03:00
parent d11aec96e5
commit af1fae1a98
4 changed files with 60 additions and 0 deletions

View File

@@ -43,6 +43,10 @@
</div>
{{if not .Data.Locked}}
<button class="button button-outline button-wide download-share-button" type="button" data-share-box data-share-url="/d/{{.Data.Box.ID}}" data-share-title="{{if .Data.Locked}}Protected Warpbox box{{else}}Warpbox box {{.Data.Box.ID}}{{end}}" data-share-text="Shared files on Warpbox">
<svg viewBox="0 0 24 24" role="img" focusable="false" aria-hidden="true"><path d="M4 12v7a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7" /><path d="M16 6 12 2 8 6" /><path d="M12 2v14" /></svg>
<span data-share-box-label>Share</span>
</button>
{{if or $processing $failed}}
<span class="button button-outline button-wide is-disabled" aria-disabled="true">
{{if $failed}}Download unavailable{{else}}Files processing{{end}}