fix: add dashboard weight enforcement and fix hover tooltips
- Dashboard QuickWeight: Feature limit enforcement hinzugefügt - Hover-Tooltip Fix: Button in div wrapper (disabled buttons zeigen keine nativen tooltips) - Error handling für Dashboard weight input - Konsistentes UX über alle Eingabe-Screens Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
0f019f87a4
commit
d13c2c7e25
4 files changed
+94
-39
No files matched your search
@@ -111,18 +111,22 @@ export default function WeightScreen() {
|
||||
{error}
|
||||
</div>
|
||||
)}
|
||||
<button
|
||||
className="btn btn-primary btn-full"
|
||||
onClick={handleSave}
|
||||
disabled={saving || !newWeight || (weightUsage && !weightUsage.allowed)}
|
||||
<div
|
||||
title={weightUsage && !weightUsage.allowed ? `Limit erreicht (${weightUsage.used}/${weightUsage.limit}). Kontaktiere den Admin oder warte bis zum nächsten Reset.` : ''}
|
||||
style={{cursor: (weightUsage && !weightUsage.allowed) ? 'not-allowed' : 'pointer'}}
|
||||
style={{display:'inline-block',width:'100%'}}
|
||||
>
|
||||
{saved ? <><Check size={15}/> Gespeichert!</>
|
||||
: saving ? <><div className="spinner" style={{width:14,height:14}}/> …</>
|
||||
: (weightUsage && !weightUsage.allowed) ? '🔒 Limit erreicht'
|
||||
: 'Speichern'}
|
||||
</button>
|
||||
<button
|
||||
className="btn btn-primary btn-full"
|
||||
onClick={handleSave}
|
||||
disabled={saving || !newWeight || (weightUsage && !weightUsage.allowed)}
|
||||
style={{cursor: (weightUsage && !weightUsage.allowed) ? 'not-allowed' : 'pointer'}}
|
||||
>
|
||||
{saved ? <><Check size={15}/> Gespeichert!</>
|
||||
: saving ? <><div className="spinner" style={{width:14,height:14}}/> …</>
|
||||
: (weightUsage && !weightUsage.allowed) ? '🔒 Limit erreicht'
|
||||
: 'Speichern'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Chart */}
|
||||
|
||||
Reference in new issue
Block a user