Commit Graph
2 Commits
Author SHA1 Message Date
Mega-Volti 454d8d03c2 Add custom refresh rate setting to resources
Simplify resources refresh variable, enforce minimum

Add custom refresh rate to uptime

Add custom refresh rate to memory

Add custom refresh rate to disk

Add custom refresh rate to cputemp

Add custom refresh rate to CPU
2023-07-26 21:54:00 -07:00
Mega-Voltiandshamoon 1560bb7762 Support custom colors for icons (#1724)
* Add custom colors to resolvedicon.jsx

Enables appending a color code (e.g. "#123456") to all mdi and si icons, in order to change their color to a per-icon custom one.

* Streamline code for custom icon colors in resolvedicon.jsx 

Removed redundant if statement when defaulting to theme colors if no custom icon color code is provided

* Update resolvedicon.jsx

Remove unnecessary variable, restoring the fallback code in case no custom icon color is provided.

* Update resolvedicon.jsx - test for custom color suffix

Changed if condition from string.match to string.test and expanded regex to also include upper case letters.

* Update resolvedicon.jsx - DRY

Removed repetition, slimmed down if statement.

Also reverse previous commit as it did not work as intended.

* Update resolvedicon.jsx - upper case color hex codes

Update regular expression to also allow for upper case letters as part of the hex color code, as either are valid when describing an objects color.

* Refactor custom color code

---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2023-07-25 17:31:42 -07:00