Leon 1 éve
szülő
commit
1f5ca79834

+ 1 - 1
ios/AppDelegate.mm

@@ -125,7 +125,7 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
 - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
 {
 //  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
-#if DEBUGAA
+#if DEBUG
   return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
 #else
   return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];

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

@@ -572,7 +572,7 @@
 				CODE_SIGN_ENTITLEMENTS = hola/hola.entitlements;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 19;
+				CURRENT_PROJECT_VERSION = 22;
 				DEVELOPMENT_TEAM = GPMXAZ9G5N;
 				ENABLE_BITCODE = NO;
 				INFOPLIST_FILE = hola/Info.plist;
@@ -605,7 +605,7 @@
 				CODE_SIGN_ENTITLEMENTS = hola/hola.entitlements;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 19;
+				CURRENT_PROJECT_VERSION = 22;
 				DEVELOPMENT_TEAM = GPMXAZ9G5N;
 				INFOPLIST_FILE = hola/Info.plist;
 				LD_RUNPATH_SEARCH_PATHS = (

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 1
ios/main.jsbundle


+ 1 - 0
src/components/input/Inputs.tsx

@@ -55,6 +55,7 @@ export default function Component({
                     // value={inputValue}
                     password={isSecure ? true : false}
                     type={openType == 'nickname' ? 'nickname' : isSecure ? 'safe-password' : 'text'}
+                    secureTextEntry={isSecure}
                     onChangeText={(e)=>{
                         onChange(e)
                     }}

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

@@ -30,7 +30,8 @@ export default {
         },
         explore: {
             title: 'Explore',
-            share_title: 'My explore'
+            share_title: 'My explore',
+            journal:'Journals'
         },
         more: {
             title: 'Profile',
@@ -192,8 +193,8 @@ export default {
             },
             sleep_schedule: {
                 title: 'Sleep Schedule',
-                desc: 'Your previous sleep schedule was {{start_time}} - {{end_time}}.Do you want to set a new schedule?',
-                confirm: 'Set a new schedule',
+                desc: 'Your previous sleep schedule was {{start_time}} - {{end_time}}. Do you want to set a new schedule?',
+                confirm: 'Set new schedule',
                 cancel: 'Keep old schedule'
             },
             stay_qualified: {
@@ -213,7 +214,7 @@ export default {
                 fast_streak_lost: 'since you lost your faststreak.',
                 sleep_streak_lost: 'since you lost your sleepstreak.',
                 fast_sleep_streaks_lost: 'since you lost your fast and sleepstreaks.',
-                sleep_streak_not_growing: 'since you didn\'t grow your sleepstreak.',
+                sleep_streak_not_growing: 'since you didn\'t begin your sleepstreak.',
                 not_satisfied_after_delete: 'since your faststreak fell below {{day}} {{day_unit}}.',
                 // fast_streak_lost:'since you lost your fasting streak on {{date}}',
                 // sleep_streak_lost:'since you lost your sleep streak on {{date}}',

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

@@ -30,7 +30,8 @@ export default {
         },
         explore: {
             title: '发现',
-            share_title: '我的发现'
+            share_title: '我的发现',
+            journal:'日记'
         },
         more: {
             title: '我',

+ 22 - 2
src/features/daynight/AllDayRings.tsx

@@ -368,9 +368,17 @@ export default function AllDayRings(props: { schedule: any }) {
         return TimeFormatter.calculateTimeDifference(new Date().getTime(), new Date().getTime() + duration);
     }
 
+    function fastDuration() {
+        return global.fastDuration
+    }
+
+    function sleepDuration() {
+        return global.sleepDuration
+    }
+
     function popDetail() {
         return <Box>
-            <View className="ring_full_container">
+            <View className="ring_full_container" >
                 <View className="time_operate_item1">
                     <View className='fast_sleep_item three_ring_card_detail'>
                         {
@@ -387,6 +395,18 @@ export default function AllDayRings(props: { schedule: any }) {
                             <Text className="duration_value2" style={{ color: ColorType.day }}>{dayDuration()}</Text>
 
                             {
+                                (ring.current_record && ring.current_record.scenario != 'SLEEP') && <Text className="duration_title2" style={{ color: '#fff', opacity: 0.4 }}>{t('feature.track_time_duration.record_fast_sleep.item.fast')}</Text>
+                            }
+                            {
+                                (ring.current_record && ring.current_record.scenario != 'SLEEP') && <Text className="duration_value2" style={{ color: global.fastColor ? global.fastColor : ColorType.fast }}>{fastDuration()}</Text>
+                            }
+                            {
+                                (ring.current_record && ring.current_record.scenario != 'FAST') && <Text className="duration_title2" style={{ color: '#fff', opacity: 0.4 }}>{t('feature.track_time_duration.record_fast_sleep.item.sleep')}</Text>
+                            }
+                            {
+                                (ring.current_record && ring.current_record.scenario != 'FAST') && <Text className="duration_value2" style={{ color: global.sleepColor ? global.sleepColor : ColorType.sleep, marginBottom: 0 }}>{sleepDuration()}</Text>
+                            }
+                            {/* {
                                 ring.current_record && ring.current_record.scenario != 'SLEEP' && <Text className="duration_title2" style={{ color: '#fff', opacity: 0.4 }}>{t('feature.common.eat')}</Text>
                             }
                             {
@@ -397,7 +417,7 @@ export default function AllDayRings(props: { schedule: any }) {
                             }
                             {
                                 ring.current_record && ring.current_record.scenario != 'FAST' && <Text className="duration_value2" style={{ color: ColorType.activity, marginBottom: 0 }}>{activityDuration()}</Text>
-                            }
+                            } */}
                         </View>
 
 

+ 14 - 3
src/features/daynight/AllRings.tsx

@@ -12,6 +12,7 @@ import { TimeFormatter } from '@/utils/time_format'
 import { useSelector } from 'react-redux'
 import { RealRing } from '@/features/trackTimeDuration/components/Rings'
 import DayNightRing from './DayNightRing'
+import '@/utils/ring_card.scss';
 // import GradientText from '@/components/basic/GradientText'
 
 let GradientText
@@ -24,6 +25,7 @@ export default function AllRings(props: { data?: any, time?: any }) {
     const [record, setRecord] = useState(props.data.current_record);
     const user = useSelector((state: any) => state.user);
     const nightStore = useSelector((state: any) => state.night);
+    const [isDay,setIsDay] = useState(false)
     const [authInfo, setAuthInfo] = useState(global.locationDetail ? global.locationDetail : null)
     const { t } = useTranslation()
 
@@ -39,6 +41,11 @@ export default function AllRings(props: { data?: any, time?: any }) {
         setShowRing(true)
     }
 
+    global.tapShowThirdRing = (isDayMode:boolean)=>{
+        setIsDay(isDayMode)
+        setShowRing(true)
+    }
+
     function durationArc(start_time: number, end_time: number) {
         var duration = (end_time - start_time) / 1000;
         return duration / (24 * 3600) * 2 * Math.PI;
@@ -206,7 +213,7 @@ export default function AllRings(props: { data?: any, time?: any }) {
 
     function dayRing() {
         return <DayNightRing
-            isNight={true}
+            isNight={!isDay}
             isThirdRing={true}
             canvasId={'day_night_card_big_night_ring111'}
             authInfo={authInfo}
@@ -252,6 +259,10 @@ export default function AllRings(props: { data?: any, time?: any }) {
         return global.sunsetDuration
     }
 
+    function dayDuration(){
+        return global.sunriseDuration
+    }
+
 
     function popDetail() {
         return <Box>
@@ -263,8 +274,8 @@ export default function AllRings(props: { data?: any, time?: any }) {
                         }
                         <View className="duration_bg2" style={{ marginLeft: rpxToPx(68), height: bigRingRadius * 2, overflow: 'visible' }}>
 
-                            <Text className="duration_title2" style={{ color: '#fff', opacity: 0.4 }}>{t('feature.common.overnight')}</Text>
-                            <Text className="duration_value2" style={{ color: ColorType.night }}>{nightDuration()}</Text>
+                            <Text className="duration_title2" style={{ color: '#fff', opacity: 0.4 }}>{isDay?t('feature.common.day'):t('feature.common.overnight')}</Text>
+                            <Text className="duration_value2" style={{ color: isDay?ColorType.day:ColorType.night }}>{isDay?dayDuration():nightDuration()}</Text>
                             {
                                 (props.data.scenario.name == 'FAST' || props.data.scenario.name == 'FAST_SLEEP') && <Text className="duration_title2" style={{ color: '#fff', opacity: 0.4 }}>{t('feature.track_time_duration.record_fast_sleep.item.fast')}</Text>
                             }

+ 2 - 2
src/features/daynight/DayNightCard.tsx

@@ -999,10 +999,10 @@ export default function DayNightCard(props: { isNight: boolean, count: number, d
                         e.stopPropagation()
                     }
                     if (props.isNight) {
-                        global.tapShowNight()
+                        global.tapShowThirdRing(false)
                     }
                     else {
-                        global.tapShowDay()
+                        global.tapShowThirdRing(true)
                     }
                 }}
                 style={{ backgroundColor: props.isNight ? ColorType.night : ColorType.day }}>

+ 1 - 1
src/features/daynight/DayNightSwiper.tsx

@@ -136,7 +136,7 @@ export default function DayNightSwiper(props: { count: number, schedule: any, ho
         </SwiperItem>
     </Swiper>
         <AllRings data={props.homeData} time={timestamp} />
-        <AllDayRings schedule={props.schedule} />
+        {/* <AllDayRings schedule={props.schedule} /> */}
         <DayNightSwiperPopup authInfo={authInfo} />
     </View>
 }

+ 2 - 1
src/features/trackTimeDuration/components/ConsolePicker.tsx

@@ -78,7 +78,8 @@ const Component = forwardRef((props: {
             const day = dt.getDate();
             // const weekday = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'][date.getDay()];
             const weekday = TimeFormatter.getDayOfWeek(dt.getDay(), true);
-            const formattedDate = global.language == 'en' ? `${weekday} ${TimeFormatter.getMonth(month)} ${day}` : `${TimeFormatter.getMonth(month)}${day}日 ${weekday}`;
+            // const formattedDate = global.language == 'en' ? `${weekday} ${TimeFormatter.getMonth(month)} ${day}` : `${TimeFormatter.getMonth(month)}${day}日 ${weekday}`;
+            const formattedDate = global.language == 'en' ? `${TimeFormatter.getMonth(month)} ${day}` : `${TimeFormatter.getMonth(month)}${day}日`;
             var today1 = new Date();
             debugger
             var yesterday = new Date(today1.getTime() - 24 * 3600 * 1000)

+ 1 - 1
src/features/trackTimeDuration/components/IndexConsole.tsx

@@ -173,7 +173,7 @@ export default function IndexConsole(props: { record: any, count: number }) {
         global.set_time = new Date().getTime()
 
         defaultTimestamp = new Date().getTime()
-        min = defaultTimestamp - 6 * 24 * 3600 * 1000
+        min = defaultTimestamp - 1 * 24 * 3600 * 1000
         max = defaultTimestamp
         isTimeout = false
 

+ 3 - 3
src/pages/clock/ClockMain.tsx

@@ -894,13 +894,13 @@ export default function Page() {
                 }
 
                 {
-                    process.env.TARO_ENV == 'weapp' && <View className="index_section">
-                        <Text className="index_section_title">日记</Text>
+                    (process.env.TARO_ENV == 'weapp'||user.test_user) && <View className="index_section">
+                        <Text className="index_section_title">{t('page.explore.journal')}</Text>
                     </View>
                 }
 
                 {
-                    process.env.TARO_ENV == 'weapp' && <Discovery />
+                    (process.env.TARO_ENV == 'weapp'||user.test_user) && <Discovery />
                 }
 
                 {

+ 1 - 1
src/services/http/request.ts

@@ -91,7 +91,7 @@ export async function request<T>(param: RequestParam): Promise<T> {
         if (token.length > 0) {
             header['Authorization'] = `Bearer ${token}`;
 
-            header['Authorization'] = 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJhY2NvdW50Iiwic3ViIjoiZTQ3M2RlZDI4YzgwNzY3ZDZiOTBkYzAzMDg5YzRhYzEiLCJpc3MiOiJmYXN0Iiwibmlja25hbWUiOiLmtYvor5UiLCJ0eXAiOiJCZWFyZXIiLCJzZXNzaW9uX3N0YXRlIjoiYzdhYmE2MzJjNThmZTJlODllYTRhM2Y2OTZhMzdhN2YiLCJleHAiOjIwMzM3OTQyODIsImlhdCI6MTcxODI2MTQ4Mn0.P5tVYnyDWqiPM8TgXDicqQob0v1wO14D7QyfvJUs8ns';
+            // header['Authorization'] = 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJhY2NvdW50Iiwic3ViIjoiZTQ3M2RlZDI4YzgwNzY3ZDZiOTBkYzAzMDg5YzRhYzEiLCJpc3MiOiJmYXN0Iiwibmlja25hbWUiOiLmtYvor5UiLCJ0eXAiOiJCZWFyZXIiLCJzZXNzaW9uX3N0YXRlIjoiYzdhYmE2MzJjNThmZTJlODllYTRhM2Y2OTZhMzdhN2YiLCJleHAiOjIwMzM3OTQyODIsImlhdCI6MTcxODI2MTQ4Mn0.P5tVYnyDWqiPM8TgXDicqQob0v1wO14D7QyfvJUs8ns';
             // header['Authorization'] = 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJhY2NvdW50Iiwic3ViIjoiMjZkOGE1YTg0MDMyYmExN2Q4NDk3MTlkNTljNGY1NzgiLCJpc3MiOiJmYXN0Iiwibmlja25hbWUiOiJCSyIsInR5cCI6IkJlYXJlciIsInNlc3Npb25fc3RhdGUiOiI1ZDU2NTkzYmNjNWFmNzM0OWNlZTMwZjlkNGYzMWIyMCIsImV4cCI6MTc0ODE3MDg5NSwiaWF0IjoxNzE2NjM0ODk1fQ.uaRm2vSNCX8fkFS63Oe-WNWIDHG_cRM-nQ5EGyUMaBg';
         }
 

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott