fix server metric iteration

This commit is contained in:
ThatOneCalculator 2023-06-06 19:10:43 -07:00
parent 23d59b634b
commit abe8474883
No known key found for this signature in database
GPG Key ID: 8703CACD01000000

View File

@ -109,7 +109,10 @@ os.api("server-info", {}).then((res) => {
});
const toggleView = () => {
if (widgetProps.view === 5) {
if (
(widgetProps.view === 5 && instance.searchFilters) ||
(widgetProps.view === 4 && !instance.searchFilters)
) {
widgetProps.view = 0;
} else {
widgetProps.view++;