From 7d6d9dabf26edd038b3fa2782b5fc25741d07022 Mon Sep 17 00:00:00 2001 From: Lars Date: Fri, 20 Mar 2026 06:28:31 +0100 Subject: [PATCH] feat: add toggle buttons for boolean features in matrix editor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Boolean features now show as visual toggle buttons (AN/AUS) - Desktop: compact toggle (✓ AN / ✗ AUS) - Mobile: full-width toggle (✓ Aktiviert / ✗ Deaktiviert) - Prevents invalid values for boolean features - Green when enabled, gray when disabled Co-Authored-By: Claude Opus 4.6 --- frontend/src/pages/AdminTierLimitsPage.jsx | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/frontend/src/pages/AdminTierLimitsPage.jsx b/frontend/src/pages/AdminTierLimitsPage.jsx index ab2bc89..801d1e6 100644 --- a/frontend/src/pages/AdminTierLimitsPage.jsx +++ b/frontend/src/pages/AdminTierLimitsPage.jsx @@ -331,6 +331,36 @@ export default function AdminTierLimitsPage() { const currentValue = getCurrentValue(tier.id, feature.id) const isChanged = `${tier.id}:${feature.id}` in changes && changes[`${tier.id}:${feature.id}`].value !== '' + // Boolean features: Toggle button + if (feature.limit_type === 'boolean') { + const isEnabled = currentValue !== 0 && currentValue !== '0' + return ( + + + + ) + } + + // Count features: Text input return ( + + + + ) + } + + // Count features: Text input return (