frontend: fine tuning mood components intensity
First to match the API, secondly, because it doesn't really make sense that all things you can be super specific, most of the time you don't even can rationale that much about
Parents:
168d2243 file(s) changed
- frontend/app/entry/mood-components.tsx +1 -1
- frontend/constants/mood-components.ts +3 -5
- frontend/stores/moodEntry.ts +1 -1
frontend/app/entry/mood-components.tsx
@@ -104,7 +104,7 @@ label="Intensidade"
104 104 value={comp.intensity}
105 105 onValueChange={(v) => setComponentIntensity(comp.id, v)}
106 106 min={1}
107 - max={10}
107 + max={3}
108 108 step={1}
109 109 minLabel="Suave"
110 110 maxLabel="Intensa"
frontend/constants/mood-components.ts
@@ -21,9 +21,7 @@ MOOD_COMPONENTS.find((c) => c.id === id);
21 21
22 22 // Intensity label buckets
23 23 export const intensityLabel = (value: number): string => {
24 - if (value <= 2) return 'Muito Baixa';
25 - if (value <= 4) return 'Baixa';
26 - if (value <= 6) return 'Moderada';
27 - if (value <= 8) return 'Alta';
28 - return 'Muito Alta';
24 + if (value == 1) return 'Suave';
25 + if (value <= 2) return 'Moderada';
26 + if (value <= 3) return 'Intensa';
29 27 };
frontend/stores/moodEntry.ts
@@ -33,7 +33,7 @@
33 33 addComponent: (id) =>
34 34 set((state) => {
35 35 if (state.components.find((c) => c.id === id)) return state;
36 - return { components: [...state.components, { id, intensity: 5 }] };
36 + return { components: [...state.components, { id, intensity: 1 }] };
37 37 }),
38 38
39 39 removeComponent: (id) =>