Przeglądaj źródła

fixes here and there

master
Elias Sebbar 2 lat temu
rodzic
commit
b4757c9b26

+ 5
- 8
components/list/day_list.js Wyświetl plik

@@ -23,11 +23,9 @@ export default function DayList(props)
23 23
         )
24 24
         total += depense.value;
25 25
     });
26
-    console.log("####");
27
-    console.log(props.dailyObjective);
26
+    
28 27
     let scale = Math.min(1, total/props.dailyObjective)
29 28
 
30
-
31 29
     let result = props.dailyObjective - total 
32 30
     let text_color = "#000000";
33 31
     let bg_color = "#FFFFFF";
@@ -37,13 +35,12 @@ export default function DayList(props)
37 35
         bg_color = "#FF"+
38 36
             strLPad(parseInt(255 + Math.max(-255,(result / props.dailyObjective) * 100)).toString(16), 2, '0') + 
39 37
             strLPad(parseInt(255 + Math.max(-255, (result / props.dailyObjective) * 100)).toString(16), 2, '0')
40
-    console.log(bg_color);
41
-    console.log(scale);
42 38
     return (
43 39
         <View style={[day_list_styles.day_list_container, {backgroundColor: bg_color}, isCurrentday ? day_list_styles.current_day_container : null]}>
44 40
             <LinearGradient
45
-                colors={[scale > 0 ? '#FFDDDDFF' : '#FFFFFF','#FFFFFF', '#FFFFFF']}
46
-                locations={[scale, scale+0.05, 1]}
41
+                colors={[scale > 0 ? '#FFDDDDFF' : '#FFFFFFFF','#FFFFFFFF', '#FFFFFFFF']}
42
+                locations={[scale, scale + (scale < 0.95 ? 0.05 : 0), 1]}
43
+                start={{ x: 0, y: 0.0 }}
47 44
                 end={{x:1,y:0}}
48 45
                 style={day_list_styles.background}
49 46
             />
@@ -83,7 +80,7 @@ const day_list_styles = StyleSheet.create({
83 80
         display: 'flex',
84 81
         flexDirection: 'row',
85 82
         justifyContent: 'space-between',
86
-        marginBottom: 10,
83
+        margin: 10,
87 84
     },
88 85
     day_list_day: {
89 86
         fontWeight: '900',

+ 2
- 1
components/list/week_list.js Wyświetl plik

@@ -37,7 +37,8 @@ export default function WeekList(props)
37 37
         <LinearGradient
38 38
                     // Background Linear Gradient
39 39
                     colors={[scale > 0 ? '#FFDDDDFF' : '#FFFFFF','#FFFFFF', '#FFFFFF']}
40
-                    locations={[scale, scale+0.05, 1]}
40
+                    locations={[scale, scale + (scale < 0.95 ? 0.05 : 0), 1]}
41
+                    start={{ x: 0, y: 0.0 }}
41 42
                     end={{x:1,y:0}}
42 43
                     style={week_list_styles.background}
43 44
                 />   

+ 3
- 1
components/title_bar.js Wyświetl plik

@@ -23,7 +23,9 @@ function TitleBar(props){
23 23
             }}>
24 24
             <Text>Objectif</Text>
25 25
             <TextInput
26
-                keyboardType="numeric"
26
+                keyboardType="number-pad"
27
+                enablesReturnKeyAutomatically={true}
28
+                returnKeyType="done"
27 29
                 value={(displayValue).toString()}
28 30
                 style={title_bar_styles.input}
29 31
                 onChangeText={(value) => onDurationEdit(value)}

Ładowanie…
Anuluj
Zapisz