Leon há 2 anos atrás
pai
commit
5a1fe517b2
45 ficheiros alterados com 299 adições e 261 exclusões
  1. BIN
      ios/assets/src/assets/images/arrow4.png
  2. BIN
      ios/assets/src/assets/images/camera2.png
  3. BIN
      ios/assets/src/assets/images/more-vertical.png
  4. BIN
      ios/assets/src/assets/images/test.png
  5. 2 2
      ios/hola.xcodeproj/project.pbxproj
  6. 1 1
      ios/main.jsbundle
  7. 1 0
      package.json
  8. BIN
      src/assets/images/test.png
  9. 3 7
      src/components/input/Slider.tsx
  10. 2 4
      src/components/layout/Box.rn.tsx
  11. 2 4
      src/components/layout/Box.tsx
  12. 11 2
      src/components/layout/Header.scss
  13. 1 1
      src/components/layout/Header.tsx
  14. 2 6
      src/components/layout/Modal.rn.tsx
  15. 2 6
      src/components/layout/Modal.weapp.tsx
  16. 7 2
      src/components/layout/layout.tsx
  17. 8 6
      src/components/view/Timeline.scss
  18. 23 16
      src/components/view/Timeline.tsx
  19. 5 4
      src/context/locales/en.js
  20. 2 1
      src/context/locales/zh.js
  21. 2 3
      src/features/common/RecordItem.tsx
  22. 9 1
      src/features/food/FoodConsole.scss
  23. 80 91
      src/features/food/FoodConsole.tsx
  24. 1 4
      src/features/food/FoodJournal.tsx
  25. 13 4
      src/features/food/FoodTimeline.tsx
  26. 37 20
      src/features/food/hooks/ExtraData.tsx
  27. 0 8
      src/features/trackSomething/components/ActivityHistory.tsx
  28. 2 2
      src/features/trackSomething/components/MetricModalOrder.tsx
  29. 0 1
      src/features/trackSomething/components/MoveList.tsx
  30. 3 3
      src/features/trackTimeDuration/components/Console.tsx
  31. 2 2
      src/features/trackTimeDuration/components/RecordFastSleep.scss
  32. 2 8
      src/features/trackTimeDuration/components/RecordFastSleep.tsx
  33. 2 3
      src/features/trackTimeDuration/components/Schedule.tsx
  34. 4 10
      src/features/trackTimeDuration/components/SetSchedule.rn.tsx
  35. 4 9
      src/features/trackTimeDuration/components/SetSchedule.weapp.tsx
  36. 18 12
      src/features/trackTimeDuration/components/TimelineFastSleep.tsx
  37. 3 7
      src/pages/clock/Clock.tsx
  38. 0 5
      src/pages/common/RecordsHistory.tsx
  39. 2 2
      src/pages/rn/RNMain.tsx
  40. 1 1
      src/services/http/api.js
  41. 10 2
      src/services/http/request.ts
  42. 4 0
      src/utils/common.scss
  43. 4 1
      src/utils/time_format.ts
  44. 19 0
      src/utils/tools.ts
  45. 5 0
      yarn.lock

BIN
ios/assets/src/assets/images/arrow4.png


BIN
ios/assets/src/assets/images/camera2.png


BIN
ios/assets/src/assets/images/more-vertical.png


BIN
ios/assets/src/assets/images/test.png


+ 2 - 2
ios/hola.xcodeproj/project.pbxproj

@@ -550,7 +550,7 @@
 				CODE_SIGN_ENTITLEMENTS = hola/hola.entitlements;
 				CODE_SIGN_ENTITLEMENTS = hola/hola.entitlements;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 18;
+				CURRENT_PROJECT_VERSION = 21;
 				DEVELOPMENT_TEAM = GPMXAZ9G5N;
 				DEVELOPMENT_TEAM = GPMXAZ9G5N;
 				ENABLE_BITCODE = NO;
 				ENABLE_BITCODE = NO;
 				INFOPLIST_FILE = hola/Info.plist;
 				INFOPLIST_FILE = hola/Info.plist;
@@ -583,7 +583,7 @@
 				CODE_SIGN_ENTITLEMENTS = hola/hola.entitlements;
 				CODE_SIGN_ENTITLEMENTS = hola/hola.entitlements;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 18;
+				CURRENT_PROJECT_VERSION = 21;
 				DEVELOPMENT_TEAM = GPMXAZ9G5N;
 				DEVELOPMENT_TEAM = GPMXAZ9G5N;
 				INFOPLIST_FILE = hola/Info.plist;
 				INFOPLIST_FILE = hola/Info.plist;
 				LD_RUNPATH_SEARCH_PATHS = (
 				LD_RUNPATH_SEARCH_PATHS = (

Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 1
ios/main.jsbundle


+ 1 - 0
package.json

@@ -94,6 +94,7 @@
 		"react-native": "^0.70.1",
 		"react-native": "^0.70.1",
 		"react-native-device-info": "~10.3.0",
 		"react-native-device-info": "~10.3.0",
 		"react-native-gesture-handler": "~2.9.0",
 		"react-native-gesture-handler": "~2.9.0",
+		"react-native-haptic-feedback": "^2.2.0",
 		"react-native-health": "^1.18.0",
 		"react-native-health": "^1.18.0",
 		"react-native-linear-gradient": "^2.8.3",
 		"react-native-linear-gradient": "^2.8.3",
 		"react-native-pager-view": "~6.0.1",
 		"react-native-pager-view": "~6.0.1",

BIN
src/assets/images/test.png


+ 3 - 7
src/components/input/Slider.tsx

@@ -2,7 +2,7 @@ import { View, Text, Image } from '@tarojs/components'
 import './Slider.scss'
 import './Slider.scss'
 import { ColorType } from '@/context/themes/color'
 import { ColorType } from '@/context/themes/color'
 import { useEffect, useRef, useState } from 'react';
 import { useEffect, useRef, useState } from 'react';
-import { rpxToPx } from '@/utils/tools';
+import { rpxToPx, vibrate } from '@/utils/tools';
 import Taro from '@tarojs/taro';
 import Taro from '@tarojs/taro';
 import { useSelector } from 'react-redux';
 import { useSelector } from 'react-redux';
 import { useTranslation } from 'react-i18next';
 import { useTranslation } from 'react-i18next';
@@ -59,9 +59,7 @@ export default function (props: { onChanged?: Function, value?: number, edit?: b
             currentValue = brightnessValue;
             currentValue = brightnessValue;
             var data = calculateNumber(brightnessValue)
             var data = calculateNumber(brightnessValue)
             if (lastValue != data && data == 5) {
             if (lastValue != data && data == 5) {
-                Taro.vibrateShort({
-                    type: 'light'
-                })
+                vibrate()
             }
             }
             lastValue = data
             lastValue = data
 
 
@@ -74,9 +72,7 @@ export default function (props: { onChanged?: Function, value?: number, edit?: b
             return
             return
         }
         }
         setIsSliding(false);
         setIsSliding(false);
-        Taro.vibrateShort({
-            type: 'light'
-        })
+        vibrate()
         if (props.onChanged) {
         if (props.onChanged) {
 
 
             var obj = common.food_scales.filter((item: any) => {
             var obj = common.food_scales.filter((item: any) => {

+ 2 - 4
src/components/layout/Box.rn.tsx

@@ -5,7 +5,7 @@ import Taro from "@tarojs/taro";
 import { ColorType } from "@/context/themes/color";
 import { ColorType } from "@/context/themes/color";
 import { useState } from "react";
 import { useState } from "react";
 import { LayoutChangeEvent,View as HView } from "react-native";
 import { LayoutChangeEvent,View as HView } from "react-native";
-import { rpxToPx } from "@/utils/tools";
+import { rpxToPx, vibrate } from "@/utils/tools";
 
 
 export default function Component(props: {
 export default function Component(props: {
     children: React.ReactNode,
     children: React.ReactNode,
@@ -29,9 +29,7 @@ export default function Component(props: {
             props.onClick()
             props.onClick()
             return
             return
         }
         }
-        Taro.vibrateShort({
-            type: 'medium'
-        })
+        vibrate()
     }
     }
 
 
     return <View className="box-container" style={{ ...props.style, backgroundColor: props.tranparentBg ? 'transparent' : ColorType.box,height:height+rpxToPx(80) }} onTap={onClick}>
     return <View className="box-container" style={{ ...props.style, backgroundColor: props.tranparentBg ? 'transparent' : ColorType.box,height:height+rpxToPx(80) }} onTap={onClick}>

+ 2 - 4
src/components/layout/Box.tsx

@@ -3,7 +3,7 @@ import './Box.scss'
 import { BoxType } from "@/utils/types";
 import { BoxType } from "@/utils/types";
 import Taro from "@tarojs/taro";
 import Taro from "@tarojs/taro";
 import { ColorType } from "@/context/themes/color";
 import { ColorType } from "@/context/themes/color";
-import { rpxToPx } from "@/utils/tools";
+import { rpxToPx, vibrate } from "@/utils/tools";
 
 
 export default function Component(props: {
 export default function Component(props: {
     children: React.ReactNode,
     children: React.ReactNode,
@@ -20,9 +20,7 @@ export default function Component(props: {
             props.onClick()
             props.onClick()
             return
             return
         }
         }
-        Taro.vibrateShort({
-            type: 'medium'
-        })
+        vibrate()
     }
     }
 
 
     switch (props.type) {
     switch (props.type) {

+ 11 - 2
src/components/layout/Header.scss

@@ -18,7 +18,7 @@
 }
 }
 
 
 .header_action{
 .header_action{
-    color: $fastColor;
+    // color: $fastColor;
     font-size: 32px;
     font-size: 32px;
     line-height: 32px;
     line-height: 32px;
     font-weight: 500;
     font-weight: 500;
@@ -27,4 +27,13 @@
     padding-right: 20px;
     padding-right: 20px;
     padding-left: 20px;
     padding-left: 20px;
     // background-color: blue;
     // background-color: blue;
-}
+}
+
+/* #ifdef weapp */
+.fast_sleep_more {
+    background: linear-gradient(90deg, $fastColor 0%, $sleepColor 100%);
+    -webkit-background-clip: text;
+    background-clip: text;
+    color: transparent;
+}
+/* #endif */

+ 1 - 1
src/components/layout/Header.tsx

@@ -17,7 +17,7 @@ export default function Component(props: { title: string, action?: Function }) {
     return <View className="header">
     return <View className="header">
         <Text className="header_title">{props.title}</Text>
         <Text className="header_title">{props.title}</Text>
         {
         {
-            process.env.TARO_ENV=='weapp' && <Text className="header_action fast_sleep_text"  onClick={() => { props.action!() }}>{t('feature.track_time_duration.record_fast_sleep.header.btn_show_all')}</Text>
+            process.env.TARO_ENV=='weapp' && <Text className="header_action fast_sleep_more"  onClick={() => { props.action!() }}>{t('feature.track_time_duration.record_fast_sleep.header.btn_show_all')}</Text>
         }
         }
         {
         {
             process.env.TARO_ENV=='rn' && <GradientText  onClick={() => { props.action!() }} style={{fontSize:rpxToPx(32),fontWeight:'bold'}}>{t('feature.track_time_duration.record_fast_sleep.header.btn_show_all')}</GradientText>
             process.env.TARO_ENV=='rn' && <GradientText  onClick={() => { props.action!() }} style={{fontSize:rpxToPx(32),fontWeight:'bold'}}>{t('feature.track_time_duration.record_fast_sleep.header.btn_show_all')}</GradientText>

+ 2 - 6
src/components/layout/Modal.rn.tsx

@@ -5,6 +5,7 @@ import { ModalType } from '@/utils/types';
 import Box from './Box';
 import Box from './Box';
 import Taro from '@tarojs/taro';
 import Taro from '@tarojs/taro';
 import {Modal  as ModalRN} from 'react-native'
 import {Modal  as ModalRN} from 'react-native'
+import { vibrate } from '@/utils/tools';
 
 
 export default function Modal(props: {
 export default function Modal(props: {
     children: React.ReactNode,
     children: React.ReactNode,
@@ -24,15 +25,10 @@ export default function Modal(props: {
         if (process.env.TARO_ENV == 'weapp') {
         if (process.env.TARO_ENV == 'weapp') {
             e.stopPropagation()
             e.stopPropagation()
         }
         }
-        Taro.vibrateShort({
-            type: 'medium'
-        })
+        vibrate()
     }
     }
 
 
     function onClick() {
     function onClick() {
-        // Taro.vibrateShort({
-        //     type:'medium'
-        // })
     }
     }
 
 
     switch (props.modalType) {
     switch (props.modalType) {

+ 2 - 6
src/components/layout/Modal.weapp.tsx

@@ -4,6 +4,7 @@ import React, { useState } from 'react';
 import { ModalType } from '@/utils/types';
 import { ModalType } from '@/utils/types';
 import Box from './Box';
 import Box from './Box';
 import Taro from '@tarojs/taro';
 import Taro from '@tarojs/taro';
+import { vibrate } from '@/utils/tools';
 
 
 export default function Modal(props: {
 export default function Modal(props: {
     children: React.ReactNode,
     children: React.ReactNode,
@@ -23,15 +24,10 @@ export default function Modal(props: {
         if (process.env.TARO_ENV == 'weapp') {
         if (process.env.TARO_ENV == 'weapp') {
             e.stopPropagation()
             e.stopPropagation()
         }
         }
-        Taro.vibrateShort({
-            type: 'medium'
-        })
+        vibrate()
     }
     }
 
 
     function onClick() {
     function onClick() {
-        // Taro.vibrateShort({
-        //     type:'medium'
-        // })
     }
     }
 
 
     switch (props.modalType) {
     switch (props.modalType) {

+ 7 - 2
src/components/layout/layout.tsx

@@ -129,6 +129,7 @@ export default function Layout(props: {
         case TemplateType.list:
         case TemplateType.list:
             return <ScrollView className="layout_container"
             return <ScrollView className="layout_container"
                 style={{ WebkitOverflowScrolling: 'auto' }}
                 style={{ WebkitOverflowScrolling: 'auto' }}
+                showsVerticalScrollIndicator={false}
                 onScroll={onScroll}
                 onScroll={onScroll}
                 scrollY refresherEnabled={true}
                 scrollY refresherEnabled={true}
                 refresherThreshold={100} refresherBackground="#000"
                 refresherThreshold={100} refresherBackground="#000"
@@ -152,6 +153,8 @@ export default function Layout(props: {
             </ScrollView>
             </ScrollView>
         case TemplateType.grid:
         case TemplateType.grid:
             return <ScrollView className="layout_container"
             return <ScrollView className="layout_container"
+
+                showsVerticalScrollIndicator={false}
                 enableFlex={true}
                 enableFlex={true}
                 onScroll={onScroll}
                 onScroll={onScroll}
                 style={{ WebkitOverflowScrolling: 'auto' }}
                 style={{ WebkitOverflowScrolling: 'auto' }}
@@ -182,16 +185,18 @@ export default function Layout(props: {
                 {/* <View className="flex-expand" /> */}
                 {/* <View className="flex-expand" /> */}
                 {
                 {
                     process.env.TARO_ENV == 'weapp' ? pageDetail() :
                     process.env.TARO_ENV == 'weapp' ? pageDetail() :
-                        <ScrollView onScroll={onScroll}>
+                        <ScrollView style={{minHeight:Taro.getSystemInfoSync().screenHeight}} onScroll={onScroll} showsVerticalScrollIndicator={false}>
                             {
                             {
                                 pageDetail()
                                 pageDetail()
                             }
                             }
+                            <View style={{ height: 200 }} />
                         </ScrollView>
                         </ScrollView>
                 }
                 }
             </View>
             </View>
         case TemplateType.customHeader:
         case TemplateType.customHeader:
             if (process.env.TARO_ENV == 'rn') {
             if (process.env.TARO_ENV == 'rn') {
                 return <ScrollView onScroll={onScroll}
                 return <ScrollView onScroll={onScroll}
+                    style={{minHeight:Taro.getSystemInfoSync().screenHeight}}
                     refreshControl={
                     refreshControl={
                         props.showPullToRefresh ? <RefreshControl
                         props.showPullToRefresh ? <RefreshControl
                             tintColor='white'
                             tintColor='white'
@@ -207,7 +212,7 @@ export default function Layout(props: {
                             props.header
                             props.header
                         }
                         }
                         {children}
                         {children}
-                        <View style={{ height: 50 }} />
+                        <View style={{ height: 200 }} />
                     </View>
                     </View>
                 </ScrollView>
                 </ScrollView>
             }
             }

+ 8 - 6
src/components/view/Timeline.scss

@@ -1,10 +1,11 @@
+$timelineWidth:486px;
 .timeline {
 .timeline {
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
   color: #fff;
   color: #fff;
   // max-height: 70vh;
   // max-height: 70vh;
   overflow-y: scroll;
   overflow-y: scroll;
-  letter-spacing: 0.05em;
+  letter-spacing: 0px;
   z-index: 100000000;
   z-index: 100000000;
   // width: 100%;
   // width: 100%;
   // margin-top: 20px;
   // margin-top: 20px;
@@ -39,8 +40,8 @@
   opacity: 0.4;
   opacity: 0.4;
   font-size: 32px;
   font-size: 32px;
   line-height: 32px;
   line-height: 32px;
-  // height: 32px;
-  width: 406px;
+  height: 32px;
+  width: $timelineWidth;
   margin-top: 12px;
   margin-top: 12px;
   display: flex;
   display: flex;
   flex-direction: row;
   flex-direction: row;
@@ -77,6 +78,7 @@
   opacity: 0.8;
   opacity: 0.8;
   font-size: 32px;
   font-size: 32px;
   line-height: 32px;
   line-height: 32px;
+  letter-spacing: 0px;
 }
 }
 
 
 .timeline-content-row {
 .timeline-content-row {
@@ -84,7 +86,7 @@
   display: flex;
   display: flex;
   flex-direction: row;
   flex-direction: row;
   align-items: center;
   align-items: center;
-  width: 406px;
+  width: $timelineWidth;
   // justify-content: space-between;
   // justify-content: space-between;
   padding-bottom: 16px;
   padding-bottom: 16px;
   border-bottom-style: solid;
   border-bottom-style: solid;
@@ -136,11 +138,11 @@
   margin-left: 20px;
   margin-left: 20px;
   // background-color: orange;
   // background-color: orange;
   height: 32px;
   height: 32px;
-  width: 406px;
+  width: $timelineWidth;
 }
 }
 
 
 .timeline_line1 {
 .timeline_line1 {
-  width: 406px;
+  width: $timelineWidth;
   height: 2px;
   height: 2px;
   -webkit-transform: scaleY(0.5);
   -webkit-transform: scaleY(0.5);
   transform: scaleY(0.5);
   transform: scaleY(0.5);

+ 23 - 16
src/components/view/Timeline.tsx

@@ -2,11 +2,16 @@ import { View, Text, Icon, ScrollView } from '@tarojs/components'
 import './Timeline.scss'
 import './Timeline.scss'
 import { TimelineType } from '@/utils/types'
 import { TimelineType } from '@/utils/types'
 import { IconRadio, IconRadioCheck, IconRadioCross } from '../basic/Icons'
 import { IconRadio, IconRadioCheck, IconRadioCross } from '../basic/Icons'
+import { rpxToPx } from '@/utils/tools'
 
 
+let LinearGradient
+if (process.env.TARO_ENV == 'rn') {
+    LinearGradient = require('react-native-linear-gradient').default
+}
 
 
 export default function Component(props: { items: any[], title?: string, type?: TimelineType, showLastLine?: boolean }) {
 export default function Component(props: { items: any[], title?: string, type?: TimelineType, showLastLine?: boolean }) {
     return <View className="timeline">
     return <View className="timeline">
-        <View style={{position:'relative'}}>
+        <View style={{ position: 'relative' }}>
             {
             {
                 props.title && <Text className='timeline_title'>{props.title}</Text>
                 props.title && <Text className='timeline_title'>{props.title}</Text>
             }
             }
@@ -37,9 +42,23 @@ export default function Component(props: { items: any[], title?: string, type?:
                         {
                         {
                             index !== props.items.length - 1 &&
                             index !== props.items.length - 1 &&
                             <View className='timeline-line-bg' style={{ width: 16, background: global.isDebug ? 'red' : 'transparent' }}>
                             <View className='timeline-line-bg' style={{ width: 16, background: global.isDebug ? 'red' : 'transparent' }}>
-                                <View className='timeline-line1'
-                                    style={{ background: (props.items[index + 1].status == 'done' && item.status == 'done') ? 'linear-gradient(to top, ' + props.items[index + 1].color + ', ' + item.color + ')' : '#ffffff66' }}
-                                />
+                                {
+                                    process.env.TARO_ENV == 'rn' && props.items[index + 1].status == 'done' && item.status == 'done' ?
+                                    <LinearGradient
+                                    style={{
+                                        width: rpxToPx(2),
+                                        height: '100%',
+                                        borderRadius: rpxToPx(1)
+                                    }}
+                                    colors={[item.color,props.items[index + 1].color]}
+                                    start={{ x: 0, y: 0 }}
+                                    end={{ x: 0, y: 1 }}
+                                /> :
+                                        <View className='timeline-line1'
+                                            style={{ background: (props.items[index + 1].status == 'done' && item.status == 'done') ? 'linear-gradient(to top, ' + props.items[index + 1].color + ', ' + item.color + ')' : '#ffffff66' }}
+                                        />
+                                }
+
                             </View>
                             </View>
                         }
                         }
                         {
                         {
@@ -50,18 +69,6 @@ export default function Component(props: { items: any[], title?: string, type?:
                                 />
                                 />
                             </View>
                             </View>
                         }
                         }
-
-                        {/* {index !== props.items.length - 1 && 
-                        <View className='timeline-line'
-                            style={{ background: (props.items[index + 1].status == 'done' && item.status == 'done') ? 'linear-gradient(to top, ' + props.items[index + 1].color + ', ' + item.color + ')' : '#ffffff66' }}
-                        />}
-                    {
-                        index == props.items.length - 1 && props.showLastLine &&
-                        <View className='timeline-line'
-                            style={{ background: item.color }}
-                        />
-                    } */}
-
                     </View>
                     </View>
                 ))
                 ))
             }
             }

+ 5 - 4
src/context/locales/en.js

@@ -101,14 +101,15 @@ export default {
             wait_for_end: 'Awaiting end',
             wait_for_end: 'Awaiting end',
             not_started: 'Not started',
             not_started: 'Not started',
             not_completed: 'Not completed',
             not_completed: 'Not completed',
+            btn_pre:'Pre',
             btn_next: 'Next',
             btn_next: 'Next',
             btn_done: 'Done',
             btn_done: 'Done',
             btn_set_and_next: 'Set and next',
             btn_set_and_next: 'Set and next',
             btn_set_and_done: 'Set and done',
             btn_set_and_done: 'Set and done',
             drag_order:'Press and drag to change order',
             drag_order:'Press and drag to change order',
             maintain:'Item under maintenance',
             maintain:'Item under maintenance',
-            multi_timezones:'Multiple time zones',
-            different_timezone:'Different time zone',
+            multi_timezones:'Mult. time zones',
+            different_timezone:'Other time zone',
             toast: {
             toast: {
                 min_value: 'Cannot go any lower',
                 min_value: 'Cannot go any lower',
                 max_value: 'Cannot go any higher',
                 max_value: 'Cannot go any higher',
@@ -238,7 +239,7 @@ export default {
             schedule: {
             schedule: {
                 section_title: 'Today',
                 section_title: 'Today',
                 follow_tip: 'Enable schedule reminders',
                 follow_tip: 'Enable schedule reminders',
-                timeout_tip: 'Complete the record and restore the schedule.',
+                timeout_tip: 'End current recording and resume schedule.',
                 action_sheet_adjust_schedule: 'Adjust schedule',
                 action_sheet_adjust_schedule: 'Adjust schedule',
                 duration_goals_by_stage: 'View fasting stage goals',
                 duration_goals_by_stage: 'View fasting stage goals',
                 current_stage: 'View current fasting stage',
                 current_stage: 'View current fasting stage',
@@ -338,7 +339,7 @@ export default {
             slider_tip_post_meal_title: 'Satiety',
             slider_tip_post_meal_title: 'Satiety',
             slider_tip_pre_meal_desc: 'Extremely hungry to not hungry',
             slider_tip_pre_meal_desc: 'Extremely hungry to not hungry',
             slider_tip_post_meal_desc: 'Not full to extremely bloated',
             slider_tip_post_meal_desc: 'Not full to extremely bloated',
-            disable_switch_modal_title: 'Please complete the current record first',
+            disable_switch_modal_title: 'End current recording first.',
             disable_switch_modal_btn: 'Got it'
             disable_switch_modal_btn: 'Got it'
         },
         },
         workout: {
         workout: {

+ 2 - 1
src/context/locales/zh.js

@@ -104,13 +104,14 @@ export default {
             not_started: "未开始",
             not_started: "未开始",
             not_completed: "未完成",
             not_completed: "未完成",
             btn_next: '下一步',
             btn_next: '下一步',
+            btn_pre:'上一步',
             btn_done: '完成',
             btn_done: '完成',
             btn_set_and_next: "下一步",// "Set and Next"
             btn_set_and_next: "下一步",// "Set and Next"
             btn_set_and_done: "完成",// "Set and Done"
             btn_set_and_done: "完成",// "Set and Done"
             drag_order:'长按可拖动排序',
             drag_order:'长按可拖动排序',
             maintain:'项目维护中',
             maintain:'项目维护中',
             multi_timezones:'跨多时区',
             multi_timezones:'跨多时区',
-            different_timezone:'不同于当前时区',
+            different_timezone:'其他时区',
             toast: {
             toast: {
                 min_value: '不能再小了',
                 min_value: '不能再小了',
                 max_value: '不能再大了',
                 max_value: '不能再大了',

+ 2 - 3
src/features/common/RecordItem.tsx

@@ -4,6 +4,7 @@ import './RecordItem.scss'
 import Taro from "@tarojs/taro";
 import Taro from "@tarojs/taro";
 import { TimeFormatter } from "@/utils/time_format";
 import { TimeFormatter } from "@/utils/time_format";
 import { useTranslation } from "react-i18next";
 import { useTranslation } from "react-i18next";
+import { vibrate } from "@/utils/tools";
 
 
 
 
 export default function Component(props: { children: React.ReactNode, onClick?: Function, delete?: Function, canDel?: boolean }) {
 export default function Component(props: { children: React.ReactNode, onClick?: Function, delete?: Function, canDel?: boolean }) {
@@ -16,9 +17,7 @@ export default function Component(props: { children: React.ReactNode, onClick?:
             props.onClick();
             props.onClick();
         }
         }
         else {
         else {
-            Taro.vibrateShort({
-                type: 'medium'
-            });
+            vibrate()
         }
         }
     }
     }
 
 

+ 9 - 1
src/features/food/FoodConsole.scss

@@ -126,7 +126,15 @@
     z-index: -1;
     z-index: -1;
 }
 }
 
 
+/* #ifdef weapp */
 .myswitch{
 .myswitch{
     width: 100px !important;
     width: 100px !important;
     height: 50px !important;
     height: 50px !important;
-}
+}
+
+/* #endif */
+
+/* #ifdef rn */
+.myswitch{
+}
+/* #endif */

+ 80 - 91
src/features/food/FoodConsole.tsx

@@ -1,6 +1,6 @@
 import { View, Image, Text, Switch } from '@tarojs/components'
 import { View, Image, Text, Switch } from '@tarojs/components'
 import './FoodConsole.scss'
 import './FoodConsole.scss'
-import { rpxToPx } from '@/utils/tools'
+import { rpxToPx, vibrate } from '@/utils/tools'
 import Taro from '@tarojs/taro'
 import Taro from '@tarojs/taro'
 import Slider from '@/components/input/Slider'
 import Slider from '@/components/input/Slider'
 import { useEffect, useState } from 'react'
 import { useEffect, useState } from 'react'
@@ -12,6 +12,7 @@ import { IconShare } from '@/components/basic/Icons'
 import { useTranslation } from 'react-i18next'
 import { useTranslation } from 'react-i18next'
 import { ColorType } from '@/context/themes/color'
 import { ColorType } from '@/context/themes/color'
 import { clearFoodCache, getFoodCache, saveFoodCache } from './hooks/ExtraData'
 import { clearFoodCache, getFoodCache, saveFoodCache } from './hooks/ExtraData'
+import { async } from 'q'
 let useNavigation;
 let useNavigation;
 if (process.env.TARO_ENV == 'rn') {
 if (process.env.TARO_ENV == 'rn') {
     useNavigation = require("@react-navigation/native").useNavigation
     useNavigation = require("@react-navigation/native").useNavigation
@@ -43,8 +44,8 @@ export default function Component(props: { addItem: Function, firstItem: any })
     useEffect(() => {
     useEffect(() => {
         if (firstData &&
         if (firstData &&
             firstData.mindful_mode == 'AWARE' &&
             firstData.mindful_mode == 'AWARE' &&
-            (firstData.status != 'PART_COMPLETED' && firstData.status!='COMPLETED')
-            ) {
+            (firstData.status != 'PART_COMPLETED' && firstData.status != 'COMPLETED')
+        ) {
             setLastUnFinished(true)
             setLastUnFinished(true)
             setModeOn(true)
             setModeOn(true)
         }
         }
@@ -74,7 +75,7 @@ export default function Component(props: { addItem: Function, firstItem: any })
         // }
         // }
     }, [])
     }, [])
 
 
-    function choose(isAlbum = true) {
+    async function choose(isAlbum = true) {
         if (!user.isLogin) {
         if (!user.isLogin) {
             jumpPage('/pages/account/ChooseAuth', 'ChooseAuth', navigation)
             jumpPage('/pages/account/ChooseAuth', 'ChooseAuth', navigation)
             return;
             return;
@@ -87,66 +88,64 @@ export default function Component(props: { addItem: Function, firstItem: any })
 
 
         saveFoodCache('create', params)
         saveFoodCache('create', params)
 
 
-        clearFile()
-        Taro.chooseMedia({
-            count: 1,
-            sizeType: ['compressed'],
-            mediaType: ['image'],
-            sourceType: [isAlbum ? 'album' : 'camera'],
-            success: function (res) {
-                var params = {
-                    event: 'add_a_picture',
-                    value: isAlbum ? 'choose_from_album_confirm' : 'use_camera_confirm',
+        if (process.env.TARO_ENV == 'rn') {
+            Taro.chooseImage({
+                count: 1,
+                sizeType: ['compressed'],
+                sourceType: [isAlbum ? 'album' : 'camera'],
+                success: function (res) {
+                    chooseSuccess(res, isAlbum)
+                },
+                fail: function (res) {
+                    chooseFailed(res, isAlbum)
                 }
                 }
+            })
 
 
-                saveFoodCache('create', params)
-
-                var tempFilePath = res.tempFiles[0].tempFilePath
-                // Taro.editImage({
-                //     src:tempFilePath,
-                //     success:function(res){
-                //         console.log(res)
-                //     }
-                // })
-                Taro.getFileSystemManager().saveFile({
-                    tempFilePath: tempFilePath,
-                    success: function (res) {
-                        var savedFilePath = res.savedFilePath
-                        Taro.setStorageSync('pic', savedFilePath)
-                        console.log(savedFilePath)
-                        setImgUrl(savedFilePath as any)
-
-                        uploadFile(savedFilePath, isAlbum ? 'album' : 'camera')
-                    }
-                })
-            },
-            fail: function (res) {
-                var params = {
-                    event: 'add_a_picture',
-                    value: isAlbum ? 'choose_from_album_cancel' : 'use_camera_cancel',
+        }
+        else {
+            Taro.chooseMedia({
+                count: 1,
+                sizeType: ['compressed'],
+                mediaType: ['image'],
+                sourceType: [isAlbum ? 'album' : 'camera'],
+                success: function (res) {
+                    chooseSuccess(res, isAlbum)
+                },
+                fail: function (res) {
+                    chooseFailed(res, isAlbum)
                 }
                 }
-
-                saveFoodCache('create', params)
-            }
-        })
+            })
+        }
     }
     }
 
 
+    async function chooseSuccess(res, isAlbum) {
+        var params = {
+            event: 'add_a_picture',
+            value: isAlbum ? 'choose_from_album_confirm' : 'use_camera_confirm',
+        }
+
+        saveFoodCache('create', params)
+
+        var savedFilePath = process.env.TARO_ENV=='rn'?res.tempFiles[0].path:res.tempFiles[0].tempFilePath
+
+        // var savedFilePath = res.savedFilePath
+        await Taro.setStorage({key:'pic', data:savedFilePath})
+        console.log(savedFilePath)
+        setImgUrl(savedFilePath as any)
+
+        uploadFile(savedFilePath, isAlbum ? 'album' : 'camera')
+
 
 
-    function clearFile() {
-        Taro.getFileSystemManager().getSavedFileList({
-            success: function (res) {
-                if (res.fileList.length > 0) {
-                    Taro.removeSavedFile({
-                        filePath: res.fileList[0].filePath,
-                        complete: function (res) {
-                            console.log(res)
-                            console.log('remove success')
-                        }
-                    })
-                }
-            }
-        })
     }
     }
+    function chooseFailed(res, isAlbum) {
+        var params = {
+            event: 'add_a_picture',
+            value: isAlbum ? 'choose_from_album_cancel' : 'use_camera_cancel',
+        }
+
+        saveFoodCache('create', params)
+    }
+
 
 
     function uploadFile(path, source) {
     function uploadFile(path, source) {
         Taro.showLoading({
         Taro.showLoading({
@@ -195,11 +194,12 @@ export default function Component(props: { addItem: Function, firstItem: any })
         })
         })
     }
     }
 
 
-    function createData(url, source) {
+    async function createData(url, source) {
         var date = new Date();
         var date = new Date();
         var time = date.getTime()
         var time = date.getTime()
         var strDate = (date.getFullYear() + '') + (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)) + (date.getDate() < 10 ? '0' + date.getDate() : date.getDate());
         var strDate = (date.getFullYear() + '') + (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)) + (date.getDate() < 10 ? '0' + date.getDate() : date.getDate());
-
+        var event = await getFoodCache('create')
+        debugger
         createFoodJournal({
         createFoodJournal({
             media: [{
             media: [{
                 url,
                 url,
@@ -212,42 +212,32 @@ export default function Component(props: { addItem: Function, firstItem: any })
             },
             },
             mindful_mode: modeOn ? 'AWARE' : 'NORMAL',
             mindful_mode: modeOn ? 'AWARE' : 'NORMAL',
             extra: {
             extra: {
-                event: getFoodCache('create')
+                event: event
             }
             }
-            // extra:getFoodCache('create')
 
 
         }).then(res => {
         }).then(res => {
             props.addItem(res)
             props.addItem(res)
-            clearFile()
             setImgUrl('')
             setImgUrl('')
-            Taro.removeStorageSync('pic')
+            Taro.removeStorage({key:'pic'})
             Taro.hideLoading()
             Taro.hideLoading()
             setFirstData(res)
             setFirstData(res)
             clearFoodCache('create')
             clearFoodCache('create')
-            // if (modeOn) {
-            //     setSwitchDisable(true)
-            // }
         }).catch(e => {
         }).catch(e => {
             Taro.hideLoading()
             Taro.hideLoading()
         })
         })
     }
     }
 
 
-    function modeChange(e) {
+    async function modeChange(e) {
+
         setModeOn(e.detail.value)
         setModeOn(e.detail.value)
-        Taro.setStorageSync('food_switch', e.detail.value)
-        // if (e.detail.value) {
-        //     Taro.showToast({
-        //         icon: 'success',
-        //         title: t('feature.food.mindful_switch_on'),
-        //         duration: 500
-        //     })
-        // }
+        await Taro.setStorage({key:'food_switch', data:e.detail.value})
 
 
         var params = {
         var params = {
             event: 'switch_toggle',
             event: 'switch_toggle',
             value: e.detail.value ? 'on' : 'off',
             value: e.detail.value ? 'on' : 'off',
         }
         }
 
 
+
         saveFoodCache('create', params)
         saveFoodCache('create', params)
     }
     }
 
 
@@ -265,20 +255,12 @@ export default function Component(props: { addItem: Function, firstItem: any })
         }
         }
         else {
         else {
             return props.firstItem ? 0 : rpxToPx(60)
             return props.firstItem ? 0 : rpxToPx(60)
-            // if (modeOn){
-            //     return 0//-rpxToPx(60)
-            // }
-            // else {
-            //     return 0
-            // }
         }
         }
     }
     }
 
 
     function clickSwitch() {
     function clickSwitch() {
         if (lastUnFinished) {
         if (lastUnFinished) {
-            Taro.vibrateShort({
-                type: 'heavy'
-            })
+            vibrate('heavy')
             Taro.showModal({
             Taro.showModal({
                 title: t('feature.common.prompt'),
                 title: t('feature.common.prompt'),
                 content: t('feature.food.disable_switch_modal_title'),
                 content: t('feature.food.disable_switch_modal_title'),
@@ -292,7 +274,12 @@ export default function Component(props: { addItem: Function, firstItem: any })
         <View className='food_console_box'>
         <View className='food_console_box'>
             <View style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
             <View style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
                 <Text className='food_console_title'>感知模式</Text>
                 <Text className='food_console_title'>感知模式</Text>
-                <Switch className='myswitch' onClick={clickSwitch} disabled={lastUnFinished} checked={modeOn} color={props.firstItem && props.firstItem.status == 'WAIT_FOR_POSTMEAL' ?ColorType.food:ColorType.fast} style={{ marginRight: rpxToPx(40), opacity: lastUnFinished ? 0.4 : 1 }} onChange={modeChange} />
+                <Switch className='myswitch'
+                    onClick={clickSwitch}
+                    disabled={lastUnFinished} checked={modeOn}
+                    color={props.firstItem && props.firstItem.status == 'WAIT_FOR_POSTMEAL' ? ColorType.food : ColorType.fast}
+                    style={{ marginRight: rpxToPx(40), opacity: lastUnFinished ? 0.4 : 1 }}
+                    onChange={modeChange} />
             </View>
             </View>
             {
             {
                 modeOn && <View className='food_console_desc'>
                 modeOn && <View className='food_console_desc'>
@@ -301,15 +288,12 @@ export default function Component(props: { addItem: Function, firstItem: any })
                             backgroundColor: props.firstItem && props.firstItem.status == 'WAIT_FOR_POSTMEAL' ? ColorType.food : ColorType.fast,
                             backgroundColor: props.firstItem && props.firstItem.status == 'WAIT_FOR_POSTMEAL' ? ColorType.food : ColorType.fast,
                             marginTop: props.firstItem && props.firstItem.status == 'WAIT_FOR_POSTMEAL' ? rpxToPx(46 + 18) : rpxToPx(18)
                             marginTop: props.firstItem && props.firstItem.status == 'WAIT_FOR_POSTMEAL' ? rpxToPx(46 + 18) : rpxToPx(18)
                         }} />
                         }} />
-                    {/* <View className='food_console_desc_point' style={{ backgroundColor: ColorType.food }} /> */}
-                    <Text>{t('feature.food.sence_desc')}</Text>
+                    <Text style={{ color: '#ffffff66' }}>{t('feature.food.sence_desc')}</Text>
                 </View>
                 </View>
             }
             }
             {
             {
                 !modeOn && <View className='food_console_desc_off'>
                 !modeOn && <View className='food_console_desc_off'>
-
-                    <Text>{t('feature.food.sence_desc_off')}</Text>
-                    {/* <Text style={{ color: ColorType.food }} onClick={more}>{t('feature.food.learn_more')}</Text> */}
+                    <Text style={{ color: '#ffffff66' }}>{t('feature.food.sence_desc_off')}</Text>
                 </View>
                 </View>
             }
             }
         </View>
         </View>
@@ -320,7 +304,12 @@ export default function Component(props: { addItem: Function, firstItem: any })
                         <Image src={require('@assets/images/camera2.png')} className='camera_icon' />
                         <Image src={require('@assets/images/camera2.png')} className='camera_icon' />
                         <Text className='camera_text'>{t('feature.food.camera')}</Text>
                         <Text className='camera_text'>{t('feature.food.camera')}</Text>
                         <Text className='album_text'>{t('feature.food.album')}</Text>
                         <Text className='album_text'>{t('feature.food.album')}</Text>
-                        <View className='album_bottom' onClick={(e) => { choose(true); e.stopPropagation() }} />
+                        <View className='album_bottom' onClick={(e) => {
+                            choose(true);
+                            if (process.env.TARO_ENV == 'weapp') {
+                                e.stopPropagation()
+                            }
+                        }} />
                     </View>
                     </View>
                     {
                     {
                         modeOn && <View style={{ height: rpxToPx(60) }} />
                         modeOn && <View style={{ height: rpxToPx(60) }} />

+ 1 - 4
src/features/food/FoodJournal.tsx

@@ -216,15 +216,12 @@ export default function Component() {
                 (loaded || !user.isLogin) && <FoodConsole addItem={addItem} firstItem={tempFirst} />
                 (loaded || !user.isLogin) && <FoodConsole addItem={addItem} firstItem={tempFirst} />
             }
             }
             {
             {
-                user.isLogin && list && <FoodTimeline array={list} refresh={() => refreshData()} forceRefresh={() => getList(1)} removeIndex={removeIndex}/>
+                user.isLogin && list && <FoodTimeline array={list} refresh={() => refreshData()} forceRefresh={() => getList(1)} removeIndex={removeIndex} />
             }
             }
             {
             {
                 user.isLogin && showError && <NoData refresh={() => { getList(1) }} />
                 user.isLogin && showError && <NoData refresh={() => { getList(1) }} />
             }
             }
             <View style={{ height: 60 }} />
             <View style={{ height: 60 }} />
-            {/* {
-                user.isLogin && <View className="center_line" style={{ height: list.length == 0 ? rpxToPx(304) : rpxToPx(364 * (list.length + 1) - 120) }} />
-            } */}
         </View>
         </View>
     }
     }
 
 

+ 13 - 4
src/features/food/FoodTimeline.tsx

@@ -65,10 +65,19 @@ export default function Component(props: { array: any, refresh: Function, forceR
                 page = i
                 page = i
             }
             }
         }
         }
-        Taro.previewMedia({
-            current: page,
-            sources: urls
-        })
+        if (process.env.TARO_ENV=='rn'){
+            Taro.previewImage({
+                current: currentUrl,
+                urls: [currentUrl]
+            })
+        }
+        else {
+            Taro.previewMedia({
+                current: page,
+                sources: urls
+            })
+        }
+        
     }
     }
 
 
     function updateItem(index, data) {
     function updateItem(index, data) {

+ 37 - 20
src/features/food/hooks/ExtraData.tsx

@@ -1,16 +1,18 @@
 import Taro from "@tarojs/taro"
 import Taro from "@tarojs/taro"
+import { async } from "q"
 
 
-export const saveFoodCache = (id: string, value: any) => {
+export async function saveFoodCache(id: string, value: any) {
+    debugger
     var date = new Date()
     var date = new Date()
     value.timestamp = date.getTime()
     value.timestamp = date.getTime()
     value.date = formatDate(date)
     value.date = formatDate(date)
 
 
-    var oldCache = getFoodCache(id)
+    var oldCache: any = await getFoodCache(id)
     if (oldCache == null) {
     if (oldCache == null) {
         oldCache = []
         oldCache = []
     }
     }
     oldCache.push(value)
     oldCache.push(value)
-    var list = getFoodCacheList()
+    var list = await getFoodCacheList()
     var isFound = false
     var isFound = false
     for (var i = 0; i < list.length; i++) {
     for (var i = 0; i < list.length; i++) {
         if (list[i].id == id) {
         if (list[i].id == id) {
@@ -25,7 +27,7 @@ export const saveFoodCache = (id: string, value: any) => {
             datas: oldCache
             datas: oldCache
         })
         })
     }
     }
-    Taro.setStorageSync('food_extra_data', JSON.stringify(list));
+    Taro.setStorage({ key: 'food_extra_data', data: JSON.stringify(list) });
 }
 }
 
 
 export const formatDate = (date) => {
 export const formatDate = (date) => {
@@ -39,34 +41,49 @@ export const formatDate = (date) => {
     return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
     return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 }
 }
 
 
-export const getFoodCacheList = () => {
-    var list = Taro.getStorageSync('food_extra_data')
-    if (!list) {
+export async function getFoodCacheList() {
+    try {
+        var key: string = 'food_extra_data'
+        var list: any = await Taro.getStorage({ key: key })
+        if (!list) {
+            return []
+        }
+        return JSON.parse(list.data)
+    }
+    catch {
         return []
         return []
     }
     }
-    return JSON.parse(list)
+
 }
 }
 
 
-export const getFoodCache = (id: string) => {
-    var list = Taro.getStorageSync('food_extra_data')
-    if (!list) {
+export async function getFoodCache(id: string) {
+    try {
+        var key: string = 'food_extra_data'
+        var list: any = await Taro.getStorage({ key: key });
+        if (!list.data) {
+            return null
+        }
+        list = JSON.parse(list.data)
+        for (var i = 0; i < list.length; i++) {
+            if (list[i].id == id) {
+                return list[i].datas
+            }
+        }
         return null
         return null
     }
     }
-    list = JSON.parse(list)
-    for (var i = 0; i < list.length; i++) {
-        if (list[i].id == id) {
-            return list[i].datas
-        }
+    catch {
+        return null
     }
     }
-    return null
+
+
 }
 }
 
 
-export const clearFoodCache = (id: string) => {
-    var list = getFoodCacheList()
+export async function clearFoodCache(id: string) {
+    var list: any = await getFoodCacheList()
     for (var i = 0; i < list.length; i++) {
     for (var i = 0; i < list.length; i++) {
         if (list[i].id == id) {
         if (list[i].id == id) {
             list.splice(i, 1)
             list.splice(i, 1)
         }
         }
     }
     }
-    Taro.setStorageSync('food_extra_data', JSON.stringify(list));
+    Taro.setStorage({ key: 'food_extra_data', data: JSON.stringify(list) });
 }
 }

+ 0 - 8
src/features/trackSomething/components/ActivityHistory.tsx

@@ -99,14 +99,6 @@ export default function Component(props: { records: any[] }) {
     function showDetail(item) {
     function showDetail(item) {
         setModalItem(item)
         setModalItem(item)
         setShowModal(true)
         setShowModal(true)
-        // var node = (<Modal children={schedules(item)}
-        //     modalType={ModalType.center}
-        //     cancelCatchMove={true}
-        //     dismiss={() => {
-        //         global.showModal(false, null)
-        //     }}
-        //     confirm={() => { }} />);
-        // global.showModal(true, node);
     }
     }
 
 
     
     

+ 2 - 2
src/features/trackSomething/components/MetricModalOrder.tsx

@@ -48,11 +48,11 @@ export default function Component(props: { themeColor: string, cancel: Function,
         </View>
         </View>
         <View className='modal_operate'>
         <View className='modal_operate'>
             <View className='modal_btn' style={{ backgroundColor: color + alpha }} onClick={cancel}>
             <View className='modal_btn' style={{ backgroundColor: color + alpha }} onClick={cancel}>
-                <Text className='modal_cancel_text' style={{ color: color,fontWeight:'bold' }}>{global.metricAdd ? '上一步' : t('feature.common.picker_cancel_btn')}</Text>
+                <Text className='modal_cancel_text' style={{ color: color,fontWeight:'bold' }}>{global.metricAdd ? t('feature.common.btn_pre') : t('feature.common.picker_cancel_btn')}</Text>
             </View>
             </View>
             <View className='btn_space' />
             <View className='btn_space' />
             <View className='modal_btn' style={{ backgroundColor: color }} onClick={confirm}>
             <View className='modal_btn' style={{ backgroundColor: color }} onClick={confirm}>
-                <Text className='modal_confirm_text' style={{ color: '#000',fontWeight:'bold' }}>{global.metricAdd ? '完成' : t('feature.common.picker_confirm_btn')}</Text>
+                <Text className='modal_confirm_text' style={{ color: '#000',fontWeight:'bold' }}>{global.metricAdd ? t('feature.common.btn_done') : t('feature.common.picker_confirm_btn')}</Text>
             </View>
             </View>
 
 
 
 

+ 0 - 1
src/features/trackSomething/components/MoveList.tsx

@@ -24,7 +24,6 @@ const DragSortList: React.FC<IProps> = (props) => {
   //  拖拽长按
   //  拖拽长按
   const handleLongPress = (e, index) => {
   const handleLongPress = (e, index) => {
     // 震动
     // 震动
-    // Taro.vibrateShort()
     setStartY(e.touches[0].clientY)
     setStartY(e.touches[0].clientY)
     setDragging(index)
     setDragging(index)
   }
   }

+ 3 - 3
src/features/trackTimeDuration/components/Console.tsx

@@ -19,7 +19,7 @@ import { useTranslation } from "react-i18next";
 import { ColorType } from "@/context/themes/color";
 import { ColorType } from "@/context/themes/color";
 import { jumpPage } from "../hooks/Common";
 import { jumpPage } from "../hooks/Common";
 import { setFoodTabBadge } from "@/store/common";
 import { setFoodTabBadge } from "@/store/common";
-import { rpxToPx } from "@/utils/tools";
+import { rpxToPx, vibrate } from "@/utils/tools";
 
 
 let useNavigation;
 let useNavigation;
 let GradientText
 let GradientText
@@ -316,7 +316,7 @@ export default function Component(props: { isNextStep?: boolean }) {
         return <View className="btn_bg">
         return <View className="btn_bg">
             {
             {
                 (time.status == 'WAIT_FOR_START') &&
                 (time.status == 'WAIT_FOR_START') &&
-                <StartSleepBtn onClick={() => { }} />
+                <StartSleepBtn onClick={() => { vibrate()}} />
             }
             }
             {
             {
                 time.status == 'ONGOING1' && <EndFastBtn onClick={showPicker} lowLight={time.fast.target_end_time > new Date().getTime()} />
                 time.status == 'ONGOING1' && <EndFastBtn onClick={showPicker} lowLight={time.fast.target_end_time > new Date().getTime()} />
@@ -511,7 +511,7 @@ export default function Component(props: { isNextStep?: boolean }) {
             }}>
             }}>
                 {
                 {
                     (time.status == 'WAIT_FOR_START') && <Stepper children={
                     (time.status == 'WAIT_FOR_START') && <Stepper children={
-                        <Text className="stepper_text" style={{ color: global.sleepColor ? global.sleepColor : ColorType.sleep, opacity: textAlpha(time) }} onClick={() => { }}>{durationFormate()}</Text>
+                        <Text className="stepper_text" style={{ color: global.sleepColor ? global.sleepColor : ColorType.sleep, opacity: textAlpha(time) }} onClick={() => {vibrate() }}>{durationFormate()}</Text>
                     } minus={minus} plus={plus}
                     } minus={minus} plus={plus}
                         themeColor={global.sleepColor ? global.sleepColor : ColorType.sleep} disableMinus={disableMinus()} disablePlus={disablePlus()} />
                         themeColor={global.sleepColor ? global.sleepColor : ColorType.sleep} disableMinus={disableMinus()} disablePlus={disablePlus()} />
                 }
                 }

+ 2 - 2
src/features/trackTimeDuration/components/RecordFastSleep.scss

@@ -77,8 +77,8 @@
 
 
 .record_arrow_bg {
 .record_arrow_bg {
     position: absolute;
     position: absolute;
-    right: 0px;
-    bottom: 0px;
+    right: -10px;
+    bottom: -10px;
     display: flex;
     display: flex;
     flex-direction: row;
     flex-direction: row;
     align-items: center;
     align-items: center;

+ 2 - 8
src/features/trackTimeDuration/components/RecordFastSleep.tsx

@@ -139,14 +139,6 @@ export default function RecordFastSleep(props: { data: any, type: string, delSuc
             return;
             return;
         }
         }
         setShowDetailModal(true)
         setShowDetailModal(true)
-
-        // var node = (<Modal children={schedules()}
-        //     modalType={ModalType.center}
-        //     dismiss={() => {
-        //         global.showModal(false, null)
-        //     }}
-        //     confirm={() => { }} />);
-        // global.showModal(true, node);
     }
     }
 
 
     function getDuration(obj) {
     function getDuration(obj) {
@@ -276,6 +268,7 @@ export default function RecordFastSleep(props: { data: any, type: string, delSuc
         var showFast = false;
         var showFast = false;
         var showSleep = false;
         var showSleep = false;
         if (record.scenario == 'FAST_SLEEP') {
         if (record.scenario == 'FAST_SLEEP') {
+            
             fastDuration = getDuration(record.fast)
             fastDuration = getDuration(record.fast)
             sleepDuration = getDuration(record.sleep)
             sleepDuration = getDuration(record.sleep)
             if (record.status == 'ONGOING3') {
             if (record.status == 'ONGOING3') {
@@ -299,6 +292,7 @@ export default function RecordFastSleep(props: { data: any, type: string, delSuc
             sleepDuration = getDuration(record.sleep)
             sleepDuration = getDuration(record.sleep)
             showSleep = true
             showSleep = true
         }
         }
+        console.log(sleepDuration)
         return <View className="fast_sleep_item">
         return <View className="fast_sleep_item">
             {
             {
                 rings()
                 rings()

+ 2 - 3
src/features/trackTimeDuration/components/Schedule.tsx

@@ -20,6 +20,7 @@ import { ColorType } from "@/context/themes/color";
 import { getThemeColor, jumpPage } from "../hooks/Common";
 import { getThemeColor, jumpPage } from "../hooks/Common";
 import TableCell from "@/components/layout/TableCell";
 import TableCell from "@/components/layout/TableCell";
 import TimelineStage from "./TimelineStage";
 import TimelineStage from "./TimelineStage";
+import { vibrate } from "@/utils/tools";
 
 
 
 
 export default function Component(props: { type?: string, data?: any, delSuccess?: Function }) {
 export default function Component(props: { type?: string, data?: any, delSuccess?: Function }) {
@@ -149,9 +150,7 @@ export default function Component(props: { type?: string, data?: any, delSuccess
                 })
                 })
         }
         }
         else {
         else {
-            Taro.vibrateShort({
-                type: 'medium'
-            })
+            vibrate()
         }
         }
     }
     }
 
 

+ 4 - 10
src/features/trackTimeDuration/components/SetSchedule.rn.tsx

@@ -19,7 +19,7 @@ import { useTranslation } from "react-i18next";
 import { ColorType } from "@/context/themes/color";
 import { ColorType } from "@/context/themes/color";
 import TitleView from "./TitleView";
 import TitleView from "./TitleView";
 import { jumpPage } from "../hooks/Common";
 import { jumpPage } from "../hooks/Common";
-import { rpxToPx } from "@/utils/tools";
+import { rpxToPx, vibrate } from "@/utils/tools";
 import { PixelRatio } from "react-native";
 import { PixelRatio } from "react-native";
 
 
 let useNavigation;
 let useNavigation;
@@ -284,19 +284,13 @@ export default function Component() {
         var startCount = parseInt(start.split(':')[0]) * 60 + parseInt(start.split(':')[1])
         var startCount = parseInt(start.split(':')[0]) * 60 + parseInt(start.split(':')[1])
         var endCount = parseInt(end.split(':')[0]) * 60 + parseInt(end.split(':')[1])
         var endCount = parseInt(end.split(':')[0]) * 60 + parseInt(end.split(':')[1])
         if (operateType == 1 && startCount % 30 == 0) {
         if (operateType == 1 && startCount % 30 == 0) {
-            Taro.vibrateShort({
-                type: 'medium',
-            })
+            vibrate()
         }
         }
         else if (operateType == 2 && endCount % 30 == 0) {
         else if (operateType == 2 && endCount % 30 == 0) {
-            Taro.vibrateShort({
-                type: 'medium',
-            })
+            vibrate()
         }
         }
         else if (operateType == 3 && (startCount % 30 == 0 || endCount % 30 == 0)) {
         else if (operateType == 3 && (startCount % 30 == 0 || endCount % 30 == 0)) {
-            Taro.vibrateShort({
-                type: 'medium',
-            })
+            vibrate()
         }
         }
 
 
         setStartTime(start)
         setStartTime(start)

+ 4 - 9
src/features/trackTimeDuration/components/SetSchedule.weapp.tsx

@@ -20,6 +20,7 @@ import { useTranslation } from "react-i18next";
 import { ColorType } from "@/context/themes/color";
 import { ColorType } from "@/context/themes/color";
 import TitleView from "./TitleView";
 import TitleView from "./TitleView";
 import { jumpPage } from "../hooks/Common";
 import { jumpPage } from "../hooks/Common";
+import { vibrate } from "@/utils/tools";
 
 
 export default function Component() {
 export default function Component() {
   const isFastFirst = true;
   const isFastFirst = true;
@@ -262,19 +263,13 @@ export default function Component() {
     var startCount = parseInt(start.split(':')[0]) * 60 + parseInt(start.split(':')[1])
     var startCount = parseInt(start.split(':')[0]) * 60 + parseInt(start.split(':')[1])
     var endCount = parseInt(end.split(':')[0]) * 60 + parseInt(end.split(':')[1])
     var endCount = parseInt(end.split(':')[0]) * 60 + parseInt(end.split(':')[1])
     if (operateType == 1 && startCount % 30 == 0) {
     if (operateType == 1 && startCount % 30 == 0) {
-      Taro.vibrateShort({
-        type: 'medium',
-      })
+      vibrate()
     }
     }
     else if (operateType == 2 && endCount % 30 == 0) {
     else if (operateType == 2 && endCount % 30 == 0) {
-      Taro.vibrateShort({
-        type: 'medium',
-      })
+      vibrate()
     }
     }
     else if (operateType == 3 && (startCount % 30 == 0 || endCount % 30 == 0)) {
     else if (operateType == 3 && (startCount % 30 == 0 || endCount % 30 == 0)) {
-      Taro.vibrateShort({
-        type: 'medium',
-      })
+      vibrate()
     }
     }
 
 
     setStartTime(start)
     setStartTime(start)

+ 18 - 12
src/features/trackTimeDuration/components/TimelineFastSleep.tsx

@@ -44,7 +44,7 @@ export default function TimelineFastSleep(props: { data: any, title?: string, fi
     function formateTime(obj: any, isEnd: boolean) {
     function formateTime(obj: any, isEnd: boolean) {
         if (isEnd) {
         if (isEnd) {
             if (obj.real_end_time) {
             if (obj.real_end_time) {
-                var newTimestamp = TimeFormatter.transferTimestamp(obj.real_end_time,obj.real_end_time_zone)
+                var newTimestamp = TimeFormatter.transferTimestamp(obj.real_end_time, obj.real_end_time_zone)
                 return diffTimeZone ? TimeFormatter.timelineFullFormatTime(newTimestamp) : TimeFormatter.timelineFormatTime(obj.real_end_time)
                 return diffTimeZone ? TimeFormatter.timelineFullFormatTime(newTimestamp) : TimeFormatter.timelineFormatTime(obj.real_end_time)
             }
             }
             else {
             else {
@@ -53,7 +53,7 @@ export default function TimelineFastSleep(props: { data: any, title?: string, fi
         }
         }
         else {
         else {
             if (obj.real_start_time) {
             if (obj.real_start_time) {
-                var newTimestamp = TimeFormatter.transferTimestamp(obj.real_start_time,obj.real_start_time_zone)
+                var newTimestamp = TimeFormatter.transferTimestamp(obj.real_start_time, obj.real_start_time_zone)
                 return diffTimeZone ? TimeFormatter.timelineFullFormatTime(newTimestamp) : TimeFormatter.timelineFormatTime(obj.real_start_time)
                 return diffTimeZone ? TimeFormatter.timelineFullFormatTime(newTimestamp) : TimeFormatter.timelineFormatTime(obj.real_start_time)
             }
             }
             else {
             else {
@@ -158,15 +158,18 @@ export default function TimelineFastSleep(props: { data: any, title?: string, fi
         if (props.data.sleep.real_start_time_zone) {
         if (props.data.sleep.real_start_time_zone) {
             timeZone = ' ' + props.data.sleep.real_start_time_zone
             timeZone = ' ' + props.data.sleep.real_start_time_zone
         }
         }
+        var status = getStatus(false, true, props.data)
+        var strContent = props.data.status == 'WAIT_FOR_START' ? scenario.schedule.sleep.start_time : formateTime(props.data.sleep, false)
+        var strDate = props.data.status == 'WAIT_FOR_START' ? getWaitForStartDate(scenario.schedule.sleep.start_time) :
+            (diffTimeZone ? timeZone : showDate(props.data.sleep, false) ? formateDate(props.data.sleep, false) : '')
         timelineItems.push(
         timelineItems.push(
             {
             {
-                status: getStatus(false, true, props.data),
-                title: getStatus(false, true, props.data) == 'padding' ?
+                status: status,
+                title: status == 'padding' ?
                     t('feature.track_time_duration.common.start_sleep') :
                     t('feature.track_time_duration.common.start_sleep') :
                     t('feature.track_time_duration.common.started_sleeping'),
                     t('feature.track_time_duration.common.started_sleeping'),
-                content: props.data.status == 'WAIT_FOR_START' ? scenario.schedule.sleep.start_time : formateTime(props.data.sleep, false),
-                date: props.data.status == 'WAIT_FOR_START' ? getWaitForStartDate(scenario.schedule.sleep.start_time) :
-                    (diffTimeZone ? timeZone : showDate(props.data.sleep, false) ? formateDate(props.data.sleep, false) : ''),
+                content: status=='un_done'?'':strContent,
+                date: status=='un_done'?'':strDate,
                 color: global.sleepColor ? global.sleepColor : ColorType.sleep
                 color: global.sleepColor ? global.sleepColor : ColorType.sleep
             }
             }
         )
         )
@@ -176,15 +179,18 @@ export default function TimelineFastSleep(props: { data: any, title?: string, fi
         if (props.data.sleep.real_end_time_zone) {
         if (props.data.sleep.real_end_time_zone) {
             timeZone = ' ' + props.data.sleep.real_end_time_zone
             timeZone = ' ' + props.data.sleep.real_end_time_zone
         }
         }
+        var status = getStatus(false, false, props.data)
+        var strContent = props.data.status == 'WAIT_FOR_START' ? scenario.schedule.sleep.end_time : formateTime(props.data.sleep, true)
+        var strDate = props.data.status == 'WAIT_FOR_START' ? getWaitForStartDate(scenario.schedule.sleep.end_time) :
+            (diffTimeZone ? timeZone : showDate(props.data.sleep, true) ? formateDate(props.data.sleep, true) : '')
         timelineItems.push(
         timelineItems.push(
             {
             {
-                status: getStatus(false, false, props.data),
-                title: getStatus(false, false, props.data) == 'padding' ?
+                status: status,
+                title: status == 'padding' ?
                     t('feature.track_time_duration.common.end_sleep') :
                     t('feature.track_time_duration.common.end_sleep') :
                     t('feature.track_time_duration.common.ended_sleeping'),
                     t('feature.track_time_duration.common.ended_sleeping'),
-                content: props.data.status == 'WAIT_FOR_START' ? scenario.schedule.sleep.end_time : formateTime(props.data.sleep, true),
-                date: props.data.status == 'WAIT_FOR_START' ? getWaitForStartDate(scenario.schedule.sleep.end_time) :
-                    (diffTimeZone ? timeZone : showDate(props.data.sleep, true) ? formateDate(props.data.sleep, true) : ''),
+                content: status=='un_done'?'':strContent,
+                date: status=='un_done'?'':strDate,
                 color: global.sleepColor ? global.sleepColor : ColorType.sleep
                 color: global.sleepColor ? global.sleepColor : ColorType.sleep
             }
             }
         )
         )

+ 3 - 7
src/pages/clock/Clock.tsx

@@ -40,7 +40,7 @@ import NoData from '@/components/view/NoData'
 import { ColorType } from '@/context/themes/color'
 import { ColorType } from '@/context/themes/color'
 import { jumpPage } from '@/features/trackTimeDuration/hooks/Common'
 import { jumpPage } from '@/features/trackTimeDuration/hooks/Common'
 import { ChooseScenarioBtn } from '@/features/common/SpecBtns'
 import { ChooseScenarioBtn } from '@/features/common/SpecBtns'
-import { rpxToPx } from '@/utils/tools'
+import { rpxToPx, vibrate } from '@/utils/tools'
 import Modal from '@/components/layout/Modal'
 import Modal from '@/components/layout/Modal'
 // import TabBar from '../../components/Tabbar';
 // import TabBar from '../../components/Tabbar';
 
 
@@ -303,9 +303,6 @@ export default function IndexPage() {
   }
   }
 
 
   function tapClock(e) {
   function tapClock(e) {
-    // if (global.showModal) {
-    //   return
-    // }
     if (process.env.TARO_ENV == 'weapp') {
     if (process.env.TARO_ENV == 'weapp') {
       e.stopPropagation()
       e.stopPropagation()
     }
     }
@@ -313,9 +310,7 @@ export default function IndexPage() {
       jumpPage('/pages/account/ChooseAuth', 'ChooseAuth', navigation)
       jumpPage('/pages/account/ChooseAuth', 'ChooseAuth', navigation)
     }
     }
     else {
     else {
-      Taro.vibrateShort({
-        type: 'medium'
-      })
+      vibrate()
     }
     }
   }
   }
 
 
@@ -325,6 +320,7 @@ export default function IndexPage() {
 
 
   function getCheckData() {
   function getCheckData() {
     getClocks().then(res => {
     getClocks().then(res => {
+      debugger
       setErrorPage(false)
       setErrorPage(false)
       dispatch(updateScenario((res as any).current_record))
       dispatch(updateScenario((res as any).current_record))
       dispatch(setConfigs((res as any).time_input_schema));
       dispatch(setConfigs((res as any).time_input_schema));

+ 0 - 5
src/pages/common/RecordsHistory.tsx

@@ -69,11 +69,6 @@ export default function Page() {
     const user = useSelector((state: any) => state.user);
     const user = useSelector((state: any) => state.user);
     const [count, setCount] = useState(0)
     const [count, setCount] = useState(0)
 
 
-    global.showModal = (isShow: boolean, detail: any) => {
-        setShowModal(isShow)
-        setModalDetail(detail)
-    }
-
     useEffect(() => {
     useEffect(() => {
         refresh()
         refresh()
     }, [])
     }, [])

+ 2 - 2
src/pages/rn/RNMain.tsx

@@ -67,7 +67,7 @@ export default function RNMain() {
   const WorkoutPage = () => <Workout />
   const WorkoutPage = () => <Workout />
   const ProfilePage = () => <Profile />
   const ProfilePage = () => <Profile />
   const DemoAPage = () => <DemoA />
   const DemoAPage = () => <DemoA />
-  // const FoodPage = ()=><Food/>
+  const FoodPage = ()=><Food/>
 
 
   function tabNavigator() {
   function tabNavigator() {
     return (
     return (
@@ -87,7 +87,7 @@ export default function RNMain() {
               <Image
               <Image
               resizeMode='contain'
               resizeMode='contain'
                 style={{ width: size, height: size }}
                 style={{ width: size, height: size }}
-                source={require('@assets/images/camera.png')}
+                source={require('@assets/images/test.png')}
               />
               />
             );
             );
           },
           },

+ 1 - 1
src/services/http/api.js

@@ -1,4 +1,4 @@
-let online = process.env.TARO_ENV=='rn'?false:false;
+let online = process.env.TARO_ENV=='rn'?false:true;
 export let baseUrl = online ? 'https://api.fast.liveplus.fun' : 'https://api.fast.dev.liveplus.fun';
 export let baseUrl = online ? 'https://api.fast.liveplus.fun' : 'https://api.fast.dev.liveplus.fun';
 export let imgUrl = online
 export let imgUrl = online
     ? 'https://api.fast.liveplus.fun/static/image/'
     ? 'https://api.fast.liveplus.fun/static/image/'

+ 10 - 2
src/services/http/request.ts

@@ -59,7 +59,7 @@ export async function request<T>(param: RequestParam): Promise<T> {
 
 
         header['content-type'] = 'application/json'
         header['content-type'] = 'application/json'
         header['X-Time-Zone'] = timeZoneFormatted; //new Date().getTimezoneOffset() / 60
         header['X-Time-Zone'] = timeZoneFormatted; //new Date().getTimezoneOffset() / 60
-        header['X-Platform'] = 'IOS'; //IOS ANDROID
+        header['X-Platform'] = Taro.getSystemInfoSync().platform=='ios'?'IOS':'ANDROID'; //IOS ANDROID
         header['X-Lang'] = process.env.TARO_ENV=='rn'?'en':'zh' //zh en
         header['X-Lang'] = process.env.TARO_ENV=='rn'?'en':'zh' //zh en
         header['X-Client-Type'] = 'WX_APP' //WX_APP APP
         header['X-Client-Type'] = 'WX_APP' //WX_APP APP
         header['X-Client_Version'] = '1.0'
         header['X-Client_Version'] = '1.0'
@@ -78,7 +78,15 @@ export async function request<T>(param: RequestParam): Promise<T> {
                 performRequest(resolve, reject);
                 performRequest(resolve, reject);
                 return;
                 return;
             }
             }
-            ToastUtil.getInstance().showToast(method == 'GET' ? '网络连接失败,请检查网络' : '操作失败,请检查网络');
+            if (global.language=='en'){
+                ToastUtil.getInstance().showToast(method == 'GET' ? 
+                'Network connection failed. Please check your network.' : 
+                'Posting failed. Please check your network.');
+            }
+            else {
+                ToastUtil.getInstance().showToast(method == 'GET' ? '网络连接失败,请检查网络' : '操作失败,请检查网络');
+            }
+            
             reject('timeout');
             reject('timeout');
         }, kTimeout);
         }, kTimeout);
 
 

+ 4 - 0
src/utils/common.scss

@@ -27,6 +27,10 @@ $historyItemMarginBottom:16px;
     color: transparent;
     color: transparent;
 }
 }
 
 
+.fast_sleep_text2{
+    color:red;
+}
+
 /* #endif */
 /* #endif */
 
 
 /* #ifdef rn */
 /* #ifdef rn */

+ 4 - 1
src/utils/time_format.ts

@@ -119,7 +119,7 @@ export class TimeFormatter {
     if (global.language=='en'){
     if (global.language=='en'){
       return `${TimeFormatter.getDayOfWeek(date.getDay())} ${TimeFormatter.getMonth(date.getMonth()+1)} ${date.getDate()} ${str}`
       return `${TimeFormatter.getDayOfWeek(date.getDay())} ${TimeFormatter.getMonth(date.getMonth()+1)} ${date.getDate()} ${str}`
     }
     }
-    return `${TimeFormatter.getMonth(date.getMonth()+1)}${date.getDate()}日${TimeFormatter.getDayOfWeek(date.getDay())} ${str}`
+    return `${TimeFormatter.getMonth(date.getMonth()+1)}${date.getDate()}日 ${TimeFormatter.getDayOfWeek(date.getDay())} ${str}`
   }
   }
 
 
 
 
@@ -219,6 +219,9 @@ export class TimeFormatter {
     if (currentDate.getTime() - timestamp <= TimeFormatter.nowDuration * 1000) {
     if (currentDate.getTime() - timestamp <= TimeFormatter.nowDuration * 1000) {
       return TimeFormatter.dateDescription(timestamp, true)
       return TimeFormatter.dateDescription(timestamp, true)
     }
     }
+    if (global.language=='en'){
+      return TimeFormatter.dateDescription(timestamp, true) + ' ' + TimeFormatter.timeDescription(timestamp)
+    }
     return TimeFormatter.dateDescription(timestamp, true) + '' + TimeFormatter.timeDescription(timestamp)
     return TimeFormatter.dateDescription(timestamp, true) + '' + TimeFormatter.timeDescription(timestamp)
   }
   }
 
 

+ 19 - 0
src/utils/tools.ts

@@ -12,4 +12,23 @@ export function alphaToHex(alpha) {
 export function rpxToPx(n: number) {
 export function rpxToPx(n: number) {
     var rate = Taro.getSystemInfoSync().windowWidth / 750;
     var rate = Taro.getSystemInfoSync().windowWidth / 750;
     return n * rate;
     return n * rate;
+}
+
+export function vibrate(type?: string) {
+    if (process.env.TARO_ENV == 'rn') {
+        const ReactNativeHapticFeedback = require("react-native-haptic-feedback")
+        // Optional configuration
+        const options = {
+            enableVibrateFallback: true,
+            ignoreAndroidSystemSettings: false,
+        };
+
+        // Trigger haptic feedback
+        ReactNativeHapticFeedback.trigger("impactLight", options);
+    }
+    else {
+        Taro.vibrateShort({
+            type: 'medium'
+        })
+    }
 }
 }

+ 5 - 0
yarn.lock

@@ -13725,6 +13725,11 @@ react-native-gradle-plugin@^0.70.3:
   resolved "https://registry.npmmirror.com/react-native-gradle-plugin/-/react-native-gradle-plugin-0.70.3.tgz#cbcf0619cbfbddaa9128701aa2d7b4145f9c4fc8"
   resolved "https://registry.npmmirror.com/react-native-gradle-plugin/-/react-native-gradle-plugin-0.70.3.tgz#cbcf0619cbfbddaa9128701aa2d7b4145f9c4fc8"
   integrity sha512-oOanj84fJEXUg9FoEAQomA8ISG+DVIrTZ3qF7m69VQUJyOGYyDZmPqKcjvRku4KXlEH6hWO9i4ACLzNBh8gC0A==
   integrity sha512-oOanj84fJEXUg9FoEAQomA8ISG+DVIrTZ3qF7m69VQUJyOGYyDZmPqKcjvRku4KXlEH6hWO9i4ACLzNBh8gC0A==
 
 
+react-native-haptic-feedback@^2.2.0:
+  version "2.2.0"
+  resolved "https://registry.yarnpkg.com/react-native-haptic-feedback/-/react-native-haptic-feedback-2.2.0.tgz#bc46edd1f053265bfbe6c32487cbce074e099429"
+  integrity sha512-3tqJOjCguWhIrX0nkURn4yw6kXdsSDjjrvZCRjKXYGlL28hdQmoW2okAHduDTD9FWj9lA+lHgwFWgGs4aFNN7A==
+
 react-native-health@^1.18.0:
 react-native-health@^1.18.0:
   version "1.18.0"
   version "1.18.0"
   resolved "https://registry.npmmirror.com/react-native-health/-/react-native-health-1.18.0.tgz#714f4f8445a51cb0c78fd576fef05b2f6bf1bf61"
   resolved "https://registry.npmmirror.com/react-native-health/-/react-native-health-1.18.0.tgz#714f4f8445a51cb0c78fd576fef05b2f6bf1bf61"

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff