Skip to content

[plugin] Custom styles migration#5434

Merged
Hillshum merged 13 commits intonextfrom
plugin/custom-styles
Nov 8, 2025
Merged

[plugin] Custom styles migration#5434
Hillshum merged 13 commits intonextfrom
plugin/custom-styles

Conversation

@Hillshum
Copy link
Collaborator

@Hillshum Hillshum commented Nov 8, 2025

This PR migrates the custom styles functionality from Electron to the plugin. The styles are loaded on the client using a JavaScript-based HTTP get instead of a <link href="..."> manner because the index.html will in the future use a <base> tag for ng-generated assets, and that will cause problems with getting the correct path.

This also adds functionality for parsing custom CSS files uploaded as print files to OctoPrint. This functionality is taken from the OctoDash-Companion plugin by @jneilliii under the MIT license.

The use of http://localhost:8080 is paths needs to be replaced. This will be done when migrating the assets to be hosted from OctoPrint, not provided by Electron.

See #4927 for a discussion of how this PR fits in with the rest of the plugin effort.

Handler for uploads and endpoint to serve it
That was for testing
While the companion plugin allows uploading of `config.json`, no need for that here
Make it a warning and use the same error message as previously. This should help preserve existing translations
This reverts commit 59f08aa.
@Hillshum Hillshum merged commit 8cc2fe8 into next Nov 8, 2025
3 checks passed
@Hillshum Hillshum deleted the plugin/custom-styles branch November 8, 2025 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant