Repository navigation
feat(themes): export and import a single theme with its media - #317
Merged
Merged
Conversation
- GET /api/themes/:id/export downloads a ZIP (config.json manifest with kind theme + media/) holding the theme name, avatar, full look (live sections for the active theme) and every media file it references: alert/variation/command/timer media and sounds, fonts, icons, the avatar and CSS url()/@import/@font-face references per rendering surface. Never secrets, connections, sessions or other system sections, nor custom overlay code (only its theme CSS). - POST /api/themes/import/preview shows name, media, conflicts and warnings without side effects; POST /api/themes/import creates a NEW inactive theme (unique name on clash, 10-theme limit). Colliding media get free names and the references are rewritten preserving their quoting; identical files are reused; theme CSS for missing overlays is dropped with a warning. All-or-nothing: any failure leaves config and media unchanged. - Reuses the config-transfer ZIP reader, streamed upload, limits, fingerprint and scratch handling; full configuration export/import is unchanged. - Apariencia › Temas gets «Exportar» and «Importar tema» (preview dialog); MCP gains exportar_tema and importar_tema_guardado. Refs #313
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #313 · Phase 4 of saved themes → integration branch
feat/saved-themes.GET /api/themes/:id/export: ZIP (config.jsonmanifest, kind theme +media/) with name, avatar, full look (live sections for the active theme) and every referenced media file — alert/variation/command/timer media and sounds, fonts, icons, avatar, and CSSurl()/@import/@font-facereferences resolved per surface (overlay, widgets, custom frames; documented in docs/themes.md). No secrets/connections/sessions/system sections, no custom overlay code (only its theme CSS).exportar_tema,importar_tema_guardado(importar_temapreset tool untouched).Verification (independent, Risk 1+2+3): export contents exact, no secrets; import side-effect-free preview, inactive creation, injected commit failure leaves nothing; 42 hostile ZIP cases refused with nothing written (zip-slip variants, symlinks, duplicates, bombs/oversize, bad CRC, bad manifests, wrong kind both ways, SVG/APNG avatar, non-media files); full config export/import differential identical. Local: unit, browser, platform, typecheck green.
Known limits / follow-up: absolute media URLs are left untouched with a warning; dependencies of an imported
.cssfile are not scanned; a.cssinstalled by a theme import is skipped by the full config backup (reported in its skipped list) — decided: phase 5 makes the full config backup carry these.cssfiles.