Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dark theme support to File Size Metrics plugin #380

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

EspadaV8
Copy link

Initial dark mode support for the File Size Metrics plugin.

It doesn't respond to toggling the theme, because its an iframe and the theme is passed in as a query string parameter, so I don't believe that'll be possible without forcing it to reload.

For now this just moves the CSS out into its own file (because it's getting long) and then moves a lot of the colours to use var(...) syntax which is set in either a light or dark class that is added to the html tag. This is done with a little bit of JS as high up the document as possible, to try and reduce any colour flickering (the JS just checks for the query param and then replaces light with dark on the html tag).

Light Dark
Current image image
New image image

The SVGs don't respect the theme at the moment, but I am having a look into this to see what can be done.

Signed-off-by: Andrew Smith <espadav8@gmail.com>
@EspadaV8
Copy link
Author

Ah, one thing I missed in the screenshots, the table footer in the current dark theme looks like this

image

With the update it's actually visible

image

@Josh5 Josh5 merged commit ac525a7 into Unmanic:official Jan 16, 2024
2 checks passed
@EspadaV8 EspadaV8 deleted the add-dark-support branch January 23, 2024 03:47
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.

2 participants