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.js
loadSprites(): Added DOWNLOAD button (<a> with download attribute) next to UPLOAD, only shown when sprite.exists is true
loadThemeManager(): Added DOWNLOAD link next to UPLOAD in each theme direction cell, only shown when the direction image exists
Both wrapped in a .sprite-btn-row div for side-by-side layout
admin/admin.css
Added .sprite-btn-row flexbox class for button layout
Verification
Admin → Sprites tab: each sprite with an image shows both UPLOAD and DOWNLOAD side by side
Clicking DOWNLOAD triggers browser file save with correct filename (e.g., smallProp.png)
Sprites without an image only show UPLOAD
Admin → Themes tab: each direction with an image shows DOWNLOAD next to UPLOAD
Directions without an image only show UPLOAD
Commit
3a3d461 — Add download buttons for sprites and theme backgrounds
## 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.js`
- **`loadSprites()`**: Added DOWNLOAD button (`<a>` with `download` attribute) next to UPLOAD, only shown when `sprite.exists` is true
- **`loadThemeManager()`**: Added DOWNLOAD link next to UPLOAD in each theme direction cell, only shown when the direction image exists
- Both wrapped in a `.sprite-btn-row` div for side-by-side layout
### `admin/admin.css`
- Added `.sprite-btn-row` flexbox class for button layout
## Verification
1. Admin → Sprites tab: each sprite with an image shows both UPLOAD and DOWNLOAD side by side
2. Clicking DOWNLOAD triggers browser file save with correct filename (e.g., `smallProp.png`)
3. Sprites without an image only show UPLOAD
4. Admin → Themes tab: each direction with an image shows DOWNLOAD next to UPLOAD
5. Directions without an image only show UPLOAD
## Commit
`3a3d461` — Add download buttons for sprites and theme backgrounds
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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