leon 1 éve
szülő
commit
141092c5e4

+ 1 - 1
src/_health/components/fast_sleep_card.scss

@@ -10,5 +10,5 @@
 .right_content{
     display: flex;
     flex-direction: column;
-
+    margin-bottom: 4px;
 }

+ 18 - 11
src/_health/components/fast_sleep_card.tsx

@@ -140,7 +140,14 @@ export default function FastSleepCard(props: { step: number, data: any }) {
 
     function real0BigRing() {
         const { fast, sleep, status } = props.data
-        if (status == 'WFS' || status == 'OG2_NO1') {
+        if (status == 'WFS'){
+            return {
+                color: MainColorType.fast,
+                startArc: getStartArc(fast.target.start_timestamp),
+                durationArc: getDurationArc(fast.target.start_timestamp, new Date().getTime())
+            }
+        }
+        if ( status == 'OG2_NO1') {
             return null;
         }
         return {
@@ -604,29 +611,29 @@ export default function FastSleepCard(props: { step: number, data: any }) {
         switch (props.step) {
             case 0:
                 return <View className='right_content'>
-                    <View className='h34' style={{ color: MainColorType.g01, lineHeight: rpxToPx(42) + 'px' }}>{t('health.fasting')}</View>
-                    <View className='h44 bold' style={{ color: MainColorType.fast, lineHeight: rpxToPx(52) + 'px' }}>{fastTime()}</View>
+                    <View className='h34 ' style={{  lineHeight: rpxToPx(42) + 'px' }}>{t('health.fasting')}</View>
+                    <View className='h36 bold' style={{ color: MainColorType.fast, lineHeight: rpxToPx(52) + 'px' }}>{fastTime()}</View>
                     <View style={{ height: rpxToPx(24) }} />
-                    <View className='h34' style={{ color: MainColorType.g01, lineHeight: rpxToPx(42) + 'px' }}>{t('health.sleep')}</View>
-                    <View className='h44 bold' style={{ color: MainColorType.sleep, lineHeight: rpxToPx(52) + 'px' }}>{sleepTime()}</View>
+                    <View className='h34 ' style={{  lineHeight: rpxToPx(42) + 'px' }}>{t('health.sleep')}</View>
+                    <View className='h36 bold' style={{ color: MainColorType.sleep, lineHeight: rpxToPx(52) + 'px' }}>{sleepTime()}</View>
                 </View>
             case 1:
                 return <View className='right_content'>
-                    <View className='h34' style={{ color: MainColorType.g01, lineHeight: rpxToPx(42) + 'px' }}>{t('health.fast_before_bed')}</View>
+                    <View className='h34 ' style={{  lineHeight: rpxToPx(42) + 'px' }}>{t('health.fast_before_bed')}</View>
                     <View style={{ height: rpxToPx(12) }} />
-                    <View className='h44 bold' style={{ color: MainColorType.fast, lineHeight: rpxToPx(52) + 'px' }}>{step1()}</View>
+                    <View className='h36 bold' style={{ color: MainColorType.fast, lineHeight: rpxToPx(52) + 'px' }}>{step1()}</View>
                 </View>
             case 2:
                 return <View className='right_content'>
-                    <View className='h34' style={{ color: MainColorType.g01, lineHeight: rpxToPx(42) + 'px' }}>{t('health.fast_while_sleep')}</View>
+                    <View className='h34 ' style={{  lineHeight: rpxToPx(42) + 'px' }}>{t('health.fast_while_sleep')}</View>
                     <View style={{ height: rpxToPx(12) }} />
-                    <View className='h44 bold' style={{ color: MainColorType.sleep, lineHeight: rpxToPx(52) + 'px' }}>{step2()}</View>
+                    <View className='h36 bold' style={{ color: MainColorType.sleep, lineHeight: rpxToPx(52) + 'px' }}>{step2()}</View>
                 </View>
             case 3:
                 return <View className='right_content'>
-                    <View className='h34' style={{ color: MainColorType.g01, lineHeight: rpxToPx(42) + 'px' }}>{t('health.fast_after_sleep')}</View>
+                    <View className='h34 ' style={{  lineHeight: rpxToPx(42) + 'px' }}>{t('health.fast_after_sleep')}</View>
                     <View style={{ height: rpxToPx(12) }} />
-                    <View className='h44 bold' style={{ color: MainColorType.fast, lineHeight: rpxToPx(52) + 'px' }}>{step3()}</View>
+                    <View className='h36 bold' style={{ color: MainColorType.fast, lineHeight: rpxToPx(52) + 'px' }}>{step3()}</View>
                 </View>
         }
         return <View className='right_content'></View>

+ 1 - 0
src/_health/pages/move.scss

@@ -193,6 +193,7 @@
     display: flex;
     flex-direction: column;
     margin-top: 36px;
+    min-height: 464px;
 }
 
 .history_header {

+ 1 - 0
src/_health/pages/move.tsx

@@ -873,6 +873,7 @@ export default function Move() {
                     }
                 </View>
             }
+            <View style={{backgroundColor:'#fff',height:rpxToPx(40),flexShrink:0}}/>
             <ListFooter noMore={(list.length > 0) && (total == list.length)} />
 
 

+ 5 - 0
src/app.scss

@@ -475,6 +475,11 @@ page {
     line-height: 52px;
 }
 
+.h36 {
+    font-size: 36px;
+    line-height: 44px;
+}
+
 .h34 {
     font-size: 34px;
     line-height: 42px;

+ 1 - 1
src/context/themes/color.tsx

@@ -16,7 +16,7 @@ export enum ColorType {
 
 export enum MainColorType {
     bg = '#e5e5e5',
-    ringBg = 'rgba(178,178,178,0.2)',
+    ringBg = 'rgba(178,178,178,0.25)',
     day = '#FFBB00',
     dayLight = '#FFE499',
     night = '#0256ff',

+ 7 - 5
src/features/health/MainConsole.tsx

@@ -802,14 +802,16 @@ export default function MainConsole(props: { type: WindowType }) {
         <View className="main_summary">
             <View className="main_summary_time bold" style={{
                 marginTop: rpxToPx(14),
-                color: getTitleColor()
-            }} >{getCountownTime(health.windows, health.mode)}
+                // color: getTitleColor()
+            }} >{getScenario(health.windows, health.mode).status == 'OG' ?getCountownTime(health.windows, health.mode):getDuration(health.windows, health.mode)}
             </View>
-            <Text className="main_summary_duration"
+            <Text className="main_summary_duration g01"
                 style={{
-                    color: getWindowStatus(health.windows, health.mode) == WindowStatusType.upcoming ? MainColorType.g02 : MainColorType.g01,
+                    // color: getWindowStatus(health.windows, health.mode) == WindowStatusType.upcoming ? MainColorType.g02 : MainColorType.g01,
                     marginBottom: rpxToPx(30)
-                }}>{getDuration(health.windows, health.mode)}{getScenario(health.windows, health.mode).status == 'OG' ? ' (' + t('health.logging') + ')' : ''}</Text>
+                }}>{getScenario(health.windows, health.mode).status == 'OG' ?getDuration(health.windows, health.mode):getCountownTime(health.windows, health.mode)}
+                {/* {getScenario(health.windows, health.mode).status == 'OG' ? ' (' + t('health.logging') + ')' : ''} */}
+                </Text>
             <View className="border_footer_line" />
         </View>
         <View style={{ backgroundColor: '#fff', width: rpxToPx(750) }}>