Add download buttons for sprites and theme backgrounds #3
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Sprites and background images can be uploaded via the admin UI, but there is no way to download them back. Users need download buttons to save existing assets (e.g., to edit externally and re-upload, or to back up customizations).
Approach
No server changes needed — all assets are already served statically at known paths. Added download links/buttons to existing cards in the admin JS, plus minimal CSS.
Changes
admin/admin.jsloadSprites(): Added DOWNLOAD button (<a>withdownloadattribute) next to UPLOAD, only shown whensprite.existsis trueloadThemeManager(): Added DOWNLOAD link next to UPLOAD in each theme direction cell, only shown when the direction image exists.sprite-btn-rowdiv for side-by-side layoutadmin/admin.css.sprite-btn-rowflexbox class for button layoutVerification
smallProp.png)Commit
3a3d461— Add download buttons for sprites and theme backgrounds