From 185c8b07e0b8fe8b4a2a56afb1a1f990086eaeaa Mon Sep 17 00:00:00 2001 From: JakobGue Date: Sun, 4 Jan 2026 00:54:19 +0100 Subject: [PATCH] remove show spool count option from settings --- client/public/locales/cs/common.json | 4 - client/public/locales/de/common.json | 4 - client/public/locales/en/common.json | 6 +- client/public/locales/es/common.json | 4 - client/public/locales/nl/common.json | 5 - .../pages/locations/components/location.tsx | 7 +- client/src/pages/settings/generalSettings.tsx | 141 ++++++++---------- spoolman/settings.py | 1 - 8 files changed, 66 insertions(+), 106 deletions(-) diff --git a/client/public/locales/cs/common.json b/client/public/locales/cs/common.json index c384cef..cc4313b 100644 --- a/client/public/locales/cs/common.json +++ b/client/public/locales/cs/common.json @@ -399,10 +399,6 @@ "round_prices": { "label": "Zaokrouhlené ceny", "tooltip": "Zaokrouhlete ceny na nejbližší celé číslo." - }, - "show_spool_count": { - "label": "Zobrazit počet cívek", - "tooltip": "Zobrazit počet cívek pro každé umístění." } }, "settings": "Nastavení" diff --git a/client/public/locales/de/common.json b/client/public/locales/de/common.json index 0cb571d..b39d18f 100644 --- a/client/public/locales/de/common.json +++ b/client/public/locales/de/common.json @@ -367,10 +367,6 @@ "round_prices": { "label": "Gerundeter Preis", "tooltip": "Rundet die Preise auf die nächsthöhere ganze Zahl." - }, - "show_spool_count": { - "label": "Spulenanzahl anzeigen", - "tooltip": "Zeigt die Anzahl der Spulen am jeweiligen Ort an." } }, "extra_fields": { diff --git a/client/public/locales/en/common.json b/client/public/locales/en/common.json index b308bf4..88ff2ae 100644 --- a/client/public/locales/en/common.json +++ b/client/public/locales/en/common.json @@ -322,10 +322,6 @@ "round_prices": { "label": "Round prices", "tooltip": "Round prices to the nearest whole number." - }, - "show_spool_count": { - "label": "Show Spool Count", - "tooltip": "Show the number of spools for each location." } }, "extra_fields": { @@ -400,4 +396,4 @@ "no_location": "No Location", "no_locations_help": "This page lets you organize your spools in locations, add some spools to get started!" } -} \ No newline at end of file +} diff --git a/client/public/locales/es/common.json b/client/public/locales/es/common.json index 91f56ad..18e22b9 100644 --- a/client/public/locales/es/common.json +++ b/client/public/locales/es/common.json @@ -365,10 +365,6 @@ "label": "URL base", "tooltip": "La URL base que se utilizará al generar funciones como códigos QR." }, - "show_spool_count": { - "label": "Mostrar cantidad de bobinas", - "tooltip": "Mostrar el número de bobinas para cada ubicación." - }, "round_prices": { "label": "Redondear precios", "tooltip": "Redondear precios al número entero más cercano." diff --git a/client/public/locales/nl/common.json b/client/public/locales/nl/common.json index 20be315..caac356 100644 --- a/client/public/locales/nl/common.json +++ b/client/public/locales/nl/common.json @@ -365,12 +365,7 @@ "round_prices": { "label": "Afgeronde prijzen", "tooltip": "Rond prijzen af op het dichtstbijzijnde gehele getal." - }, - "show_spool_count": { - "label": "Spoelaantal weergeven", - "tooltip": "Toon het aantal spoelen per locatie." } - }, "extra_fields": { "tab": "Extra velden", diff --git a/client/src/pages/locations/components/location.tsx b/client/src/pages/locations/components/location.tsx index 73248bd..b52d297 100644 --- a/client/src/pages/locations/components/location.tsx +++ b/client/src/pages/locations/components/location.tsx @@ -140,7 +140,6 @@ export function Location({ const titleStyle = { color: canEditTitle ? undefined : token.colorTextTertiary, }; - const showSpoolCount = JSON.parse(useGetSetting("show_spool_count").data?.value ?? "false"); const spoolCountStyle = { color: token.colorTextQuaternary, }; @@ -174,11 +173,9 @@ export function Location({ setEditTitle(true); }} style={titleStyle} - > + > {displayTitle} - {showSpoolCount && ( - {" "}({spools.length}) - )} + { ({spools.length})} )} {showDelete && - - - {contextHolder} - ); + + + + + {contextHolder} + + ); } diff --git a/spoolman/settings.py b/spoolman/settings.py index d4b856a..0c6ce31 100644 --- a/spoolman/settings.py +++ b/spoolman/settings.py @@ -63,7 +63,6 @@ def parse_setting(key: str) -> SettingDefinition: register_setting("currency", SettingType.STRING, json.dumps("EUR")) register_setting("round_prices", SettingType.BOOLEAN, json.dumps(obj=False)) -register_setting("show_spool_count", SettingType.BOOLEAN, json.dumps(obj=False)) register_setting("print_presets", SettingType.ARRAY, json.dumps([])) register_setting("extra_fields_vendor", SettingType.ARRAY, json.dumps([]))