leon 1 год назад
Родитель
Сommit
b18fda6ebb

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
android/app/src/main/assets/index.android.bundle


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
android/app/src/main/assets/index.android.map


+ 1 - 1
src/components/input/PickerViews.tsx

@@ -67,7 +67,7 @@ const Component = forwardRef((props: {
         >
             {
                 props.items.map((item, index) => {
-                    return <PickerViewColumn style={{ color: 'red' }} key={index}>
+                    return <PickerViewColumn key={index}>
                         {item.map((obj, j) => {
                             return (
                                 <Text key={j} style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#fff' }}>{obj}</Text>

+ 9 - 2
src/context/locales/en.js

@@ -153,7 +153,7 @@ export default {
         check_access: {
             non_access: {
                 title: 'Well Done',
-                desc: 'You\'re on a {{day}}-day streak.\n{{left_day}} more {{day_unit}} until unlocking \'Fasting with sleep.\'',
+                desc: 'You\'re on a {{day}}-day streak.\n{{day_left}} more {{day_unit}} until unlocking \'Fasting with sleep.\'',
                 btn: 'Got it!'
             },
             gain_access:{
@@ -182,10 +182,17 @@ export default {
             },
             lose_access:{
                 title:'Premium Access Lost',
-                desc:'You\'ve lost premium access to the \'Fasting with Sleep\' feature\n{{type}}. To regain access, become a PRO or achieve a new 3-day fasting streak.',
+                desc:'You\'ve lost premium access to the \'Fasting with Sleep\' feature\n{{type}}. To regain access, become a PRO or achieve a new {{require_days}}-day fasting streak.',
                 confirm:'Become a PRO member',
                 cancel:'Achieve New Fasting Streak'
             },
+            lost_reason:{
+                fast_streak_lost:'since you lost your fasting streak on {{date}}',
+                sleep_streak_lost:'since you lost your sleep streak on {{date}}',
+                fast_sleep_streaks_lost:'since you lost both of your fasting and sleep streaks on {{date}}',
+                sleep_streak_not_growing:'since you didn\'t grow your sleep streak',
+                not_satisfied_after_delete:'since you no longer have a fasting streak that satisfy the base requirement',
+            }
             
         },
         common: {

+ 71 - 64
src/context/locales/zh.js

@@ -97,20 +97,20 @@ export default {
             save: '保存',
             nickname_footer: '即将推出社区排行榜, 个性化的名字将在社区中脱颖而出。'
         },
-        edit_nickname:{
-            title:'编辑昵称'
+        edit_nickname: {
+            title: '编辑昵称'
         },
-        
+
 
 
 
     },
     feature: {
-        auth_sys:{
-            location_title:'无法获取你的位置信息',
-            location_desc:'请在「位置」中,允许【hola】在“使用 App期间”访问位置信息。\n如无法操作,请在「设置-隐私-定位服务」中,打开“定位服务”。',
-            location_cancel:'返回',
-            location_confirm:'去设置'
+        auth_sys: {
+            location_title: '无法获取你的位置信息',
+            location_desc: '请在「位置」中,允许【hola】在“使用 App期间”访问位置信息。\n如无法操作,请在「设置-隐私-定位服务」中,打开“定位服务”。',
+            location_cancel: '返回',
+            location_confirm: '去设置'
         },
         choose_scenario: {
             title: 'Choose Circadain Clock',
@@ -156,39 +156,46 @@ export default {
         check_access: {
             non_access: {
                 title: 'Well Done',
-                desc: 'You\'re on a {{day}}-day streak.\n{{left_day}} more days until unlocking \'Fasting with sleep.\'',
+                desc: 'You\'re on a {{day}}-day streak.\n{{day_left}} more days until unlocking \'Fasting with sleep.\'',
                 btn: 'Got it!'
             },
-            gain_access:{
-                title:'Premium Access Unlocked',
-                desc:'You\'ve unlocked \'Fasting with Sleep\' since you\'re on a {{day}}-day streak.\nAre you ready to up the game?',
-                upgrade:'Upgrade to Fasting with Sleep',
-                upgrade_desc:'Offer Expiring in {{time}}',
-                stay_btn:'Stay with Fasting Only',
-                more:'Learn more'
-            },
-            upgrade_pro:{
-                title:'Congrats on Your PRO Status!',
-                desc:'To preserve this status, continue your fasting streak in {{time}} and begin your sleep streak. Remember to keep both of them going.',
-                btn:'I got this!'
-            },
-            sleep_schedule:{
-                title:'Sleep Schedule',
-                desc:'Your previous sleep schedule was {{start_time}} - {{end_time}}.\nDo you want to set a new schedule?',
-                confirm:'Set a new schedule',
-                cancel:'Keep old schedule'
-            },
-            stay_qualified:{
-                title:'Well Done',
-                desc:'You\'re on a {{fast_streak_day}}-day fasting streak and a {{sleep_streak_day}}-day sleep streak.\nKeep \'em going to stay in the game.',
-                btn:'Got it!',
-            },
-            lose_access:{
-                title:'Premium Access Lost',
-                desc:'You\'ve lost premium access to the \'Fasting with Sleep\' feature\n{{type}}. To regain access, become a PRO or achieve a new 3-day fasting streak.',
-                confirm:'Become a PRO member',
-                cancel:'Achieve New Fasting Streak'
-            },
+            gain_access: {
+                title: 'Premium Access Unlocked',
+                desc: 'You\'ve unlocked \'Fasting with Sleep\' since you\'re on a {{day}}-day streak.\nAre you ready to up the game?',
+                upgrade: 'Upgrade to Fasting with Sleep',
+                upgrade_desc: 'Offer Expiring in {{time}}',
+                stay_btn: 'Stay with Fasting Only',
+                more: 'Learn more'
+            },
+            upgrade_pro: {
+                title: 'Congrats on Your PRO Status!',
+                desc: 'To preserve this status, continue your fasting streak in {{time}} and begin your sleep streak. Remember to keep both of them going.',
+                btn: 'I got this!'
+            },
+            sleep_schedule: {
+                title: 'Sleep Schedule',
+                desc: 'Your previous sleep schedule was {{start_time}} - {{end_time}}.\nDo you want to set a new schedule?',
+                confirm: 'Set a new schedule',
+                cancel: 'Keep old schedule'
+            },
+            stay_qualified: {
+                title: 'Well Done',
+                desc: 'You\'re on a {{fast_streak_day}}-day fasting streak and a {{sleep_streak_day}}-day sleep streak.\nKeep \'em going to stay in the game.',
+                btn: 'Got it!',
+            },
+            lose_access: {
+                title: 'Premium Access Lost',
+                desc: 'You\'ve lost premium access to the \'Fasting with Sleep\' feature\n{{type}}. To regain access, become a PRO or achieve a new {{require_days}}-day fasting streak.',
+                confirm: 'Become a PRO member',
+                cancel: 'Achieve New Fasting Streak'
+            },
+            lost_reason: {
+                fast_streak_lost:'since you lost your fasting streak on {{date}}',
+                sleep_streak_lost:'since you lost your sleep streak on {{date}}',
+                fast_sleep_streaks_lost:'since you lost both of your fasting and sleep streaks on {{date}}',
+                sleep_streak_not_growing: 'since you didn\'t grow your sleep streak',
+                not_satisfied_after_delete: 'since you no longer have a fasting streak that satisfy the base requirement',
+            }
         },
         common: {
             prompt: '提示',
@@ -215,27 +222,27 @@ export default {
             eat: '进食',
             move: '活动',
             show_more: '显示更多',
-            week_desc:{
+            week_desc: {
                 current_week: '本周',
                 last_week: '上周',
                 weeks_ago: '{{index}}周前',
             },
-            date_desc:{
+            date_desc: {
                 today: '今天',
-                tonight:'今晚',
+                tonight: '今晚',
                 lastnight: '昨晚',
                 yesterday: '昨天',
                 tomorrow: '明天',
-                two_days_ago:'前天',
-                two_days_after:'后天',
+                two_days_ago: '前天',
+                two_days_after: '后天',
                 days_ago: '{{index}}天前',
                 days_after: '{{index}}天后',
             },
-            time_desc:{
+            time_desc: {
                 morning: '上午',
                 afternoon: '下午',
             },
-            day_of_week_full:{
+            day_of_week_full: {
                 sun: '周日',
                 mon: '周一',
                 tue: '周二',
@@ -244,7 +251,7 @@ export default {
                 fri: '周五',
                 sat: '周六'
             },
-            day_of_week_short:{
+            day_of_week_short: {
                 sun: '日',
                 mon: '一',
                 tue: '二',
@@ -330,7 +337,7 @@ export default {
             last_night: '昨晚',
             tomorrow: '明天',
             today: '今天',
-            yesterday:'昨天',
+            yesterday: '昨天',
             sunset_to_sunrise: '当前日落日出时间基于以下地理位置',
             sunrise_to_sunset: '当前日出日落时间基于以下地理位置',
             time_to_sunset: '距离日落',
@@ -370,13 +377,13 @@ export default {
             in_real_time: '进行中',
             ended: '已结束',
             last_updated: '上次更新',
-            polar_day:'极昼',
-            polar_night:'极夜',
-            show_all_rings:'同步显示生物钟',
-            sunrise:'日出',
-            sunset:'日落',
-            location_updated:'位置更新成功',
-            location_failed:'位置更新失败',
+            polar_day: '极昼',
+            polar_night: '极夜',
+            show_all_rings: '同步显示生物钟',
+            sunrise: '日出',
+            sunset: '日落',
+            location_updated: '位置更新成功',
+            location_failed: '位置更新失败',
         },
         track_time_duration: {
             common: {
@@ -439,17 +446,17 @@ export default {
                 coordinates: '经纬度',
                 timezone: '时区',
             },
-            streaks:{
-                fast:'断食',
-                sleep:'睡眠',
+            streaks: {
+                fast: '断食',
+                sleep: '睡眠',
                 title: '连续纪录',
                 current: '目前保持',
                 longest: '最长保持',
-                no_data:'从今天开始新的连续纪录吧!',
-                countdown_title:'别让连续纪录终止, 将它一直保持下去!',
-                countdown_titles:'别让连续纪录终止, 将它们一直保持下去!',
-                countdown_fast:'当前断食连续天数将在 {{time}} 后重置归零。',
-                countdown_sleep:'当前睡眠连续天数将在 {{time}} 后重置归零。'
+                no_data: '从今天开始新的连续纪录吧!',
+                countdown_title: '别让连续纪录终止, 将它一直保持下去!',
+                countdown_titles: '别让连续纪录终止, 将它们一直保持下去!',
+                countdown_fast: '当前断食连续天数将在 {{time}} 后重置归零。',
+                countdown_sleep: '当前睡眠连续天数将在 {{time}} 后重置归零。'
             },
             change_tz_alert: {
                 title: '检测到新时区',
@@ -548,7 +555,7 @@ export default {
             },
 
             action_sheet: {
-                suggest_schedule:'推荐日程',
+                suggest_schedule: '推荐日程',
                 change_schedule: '自定日程',
                 switch_scenario: '选择生物钟',
                 set_new_goals: '设置新目标',

+ 1 - 1
src/features/trackTimeDuration/components/CheckAccess.scss

@@ -10,7 +10,7 @@
     align-items: center;
     justify-content: center;
     background-color: #000000e0;
-    z-index: 100000;
+    z-index: 10000000;
 }
 
 .fast_alert_content {

+ 74 - 8
src/features/trackTimeDuration/components/CheckAccess.tsx

@@ -120,7 +120,7 @@ export default function CheckAccess(props: { record: any, count: number }) {
         global.chooseMixed = () => {
             setChooseMixedSuccess(true)
         }
-        global.checkAccess = (acccessData: any, delOperation = false) => {
+        global.checkAccess = (acccessData: any) => {
             const currentStatus = acccessData.current.qualification.status
             const preStatus = acccessData.previous.qualification.status
             access = acccessData
@@ -128,10 +128,16 @@ export default function CheckAccess(props: { record: any, count: number }) {
 
             setSubConfirmText('')
             confirmAction = null
-            // setAccess(acccessData)
+
+            const { trigger_event } = access.current.qualification;
+            //删除记录后仍有资格,不做特殊处理。只有删除时为NOT_SATISFIED_AFTER_DELETE时,弹失去资格弹窗
+            if (trigger_event == 'SATISFIED_AFTER_DELETE'){
+                return;
+            }
+
 
             if (preStatus == 'NOT_QUALIFIED' && currentStatus == 'NOT_QUALIFIED') {
-                const { streak_fast_current, streak_fast_base_required } = acccessData.current.qualification.condition
+                const { streak_fast_current, streak_fast_min_required } = acccessData.current.qualification.condition
                 if (streak_fast_current == 0) {
                     return;
                 }
@@ -141,8 +147,8 @@ export default function CheckAccess(props: { record: any, count: number }) {
                 setAlertContent(t('feature.check_access.non_access.desc',
                     {
                         day: streak_fast_current,
-                        left_day: streak_fast_base_required - streak_fast_current,
-                        day_unit: streak_fast_base_required - streak_fast_current == 1 ? 'day' : 'days'
+                        day_left: streak_fast_min_required - streak_fast_current,
+                        day_unit: streak_fast_min_required - streak_fast_current == 1 ? 'day' : 'days'
                     }))
                 setShowCancel(false)
                 setConfirmText(t('feature.check_access.non_access.btn'))
@@ -202,9 +208,8 @@ export default function CheckAccess(props: { record: any, count: number }) {
                 setConfirmText(t('feature.check_access.stay_qualified.btn'))
             }
             else if (preStatus == 'PROVISIONAL_QUALIFIED' && currentStatus == 'NOT_QUALIFIED') {
-                debugger
                 // lose(acccessData.current.qualification);
-                loseGain(acccessData, delOperation);
+                loseGain(acccessData);
                 // setShowFastAlert(true)
                 // setAlertTitle('Premium Access Lost')
                 // setAlertContent(`You've lost premium access to the 'Fasting with Sleep' feature
@@ -235,7 +240,59 @@ export default function CheckAccess(props: { record: any, count: number }) {
         }, 1000)
     }
 
-    async function loseGain(access, delOperation = false) {
+    async function loseGain(access) {
+        var showedDisqualifiedAlert = await getStorage('showedDisqualifiedAlert') || false;
+        if (showedDisqualifiedAlert) {
+            return;
+        }
+        var desc = ''
+        const { trigger_event,fast_expire,sleep_expire,condition } = access.current.qualification;
+        var dt = fast_expire;
+        if (sleep_expire && sleep_expire<fast_expire){
+            dt = sleep_expire
+        }
+        var date = TimeFormatter.getMonthAndDayByTimestamp(dt,true)
+
+        switch (trigger_event) {
+            case 'FAST_STREAK_LOST':
+                desc = t('feature.check_access.lost_reason.fast_streak_lost',{date:date});
+                break;
+            case 'SLEEP_STREAK_LOST':
+                desc = t('feature.check_access.lost_reason.sleep_streak_lost',{date:date});
+                break;
+            case 'FAST_SLEEP_STREAKS_LOST':
+                desc = t('feature.check_access.lost_reason.fast_sleep_streaks_lost',{date:date});
+                break;
+            case 'SLEEP_STREAK_NOT_GROWING':
+                debugger
+                desc = t('feature.check_access.lost_reason.sleep_streak_not_growing');
+                break;
+            case 'NOT_SATISFIED_AFTER_DELETE':
+                desc = t('feature.check_access.lost_reason.not_satisfied_after_delete');
+                break;
+            case 'NA':
+            default:
+                break;
+        }
+
+        console.error('失去资格弹窗',trigger_event,desc);
+        debugger
+
+
+        setShowFastAlert(true)
+        setKeepContent(false)
+        setAlertTitle(t('feature.check_access.lose_access.title'))
+        setAlertContent(t('feature.check_access.lose_access.desc', { type: desc,require_days: condition.streak_fast_min_required}))
+        setShowCancel(false)
+        setConfirmText(t('feature.check_access.lose_access.cancel'))
+        // setConfirmText('Become a PRO member')
+        setSubConfirmText('')
+        Taro.setStorage({ key: 'showedDisqualifiedAlert', data: true })
+
+        changeFastScenaria()
+    }
+
+    async function loseGain2(access, delOperation = false) {
         var showedDisqualifiedAlert = await getStorage('showedDisqualifiedAlert') || false;
         if (showedDisqualifiedAlert) {
             return;
@@ -285,6 +342,12 @@ export default function CheckAccess(props: { record: any, count: number }) {
             else if (streak_sleep_current == 0 && streak_fast_current == 0) {
                 desc = 'since you lost both of your fasting and sleep streaks'
             }
+            /*
+            打卡后streak没有按预期同步增长
+            */
+            else if ((streak_sleep_current < streak_sleep_required || streak_fast_current < streak_fast_required)) {
+                desc = 'since the requirement for staying qualified is no longer satisfied'
+            }
 
         }
 
@@ -361,6 +424,7 @@ export default function CheckAccess(props: { record: any, count: number }) {
         var params: any = {
             scenario: 'FAST',
             trigger_event: 'POPUP_DISQUALIFIED_DISMISS',
+            method: 'USER_SET',
             schedule: {
                 fast: {
                     start_time: start_time,
@@ -457,6 +521,7 @@ export default function CheckAccess(props: { record: any, count: number }) {
         const { start_time, end_time } = global.ring.schedule.fast
         var params: any = {
             scenario: 'FAST_SLEEP',
+            method: 'USER_SET',
             trigger_event: 'POPUP_QUALIFIED_UPGRADED_DISMISS',
             schedule: {
                 fast: {
@@ -520,6 +585,7 @@ export default function CheckAccess(props: { record: any, count: number }) {
                     user.test_user && <View style={{ display: 'flex', flexDirection: 'column' }}>
                         <Text style={{ color: '#fff', fontSize: 12 }}>current status:{props.record.access.current.qualification.status}</Text>
                         <Text style={{ color: '#fff', fontSize: 12 }}>previous status:{props.record.access.previous.qualification.status}</Text>
+                        <Text style={{ color: '#fff', fontSize: 12 }}>trigger event:{props.record.access.current.qualification.trigger_event}</Text>
                     </View>
                 }
 

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

@@ -181,7 +181,7 @@ const RecordFastSleep = memo((props: { data: any, type: string, index: number, d
             })
             dispatch(setSelID(-1))
             if (global.checkAccess) {
-                global.checkAccess((res as any).access, true)
+                global.checkAccess((res as any).access)
             }
 
             if (global.delFastSleep)

+ 10 - 10
src/pages/clock/ChooseScenario.tsx

@@ -77,16 +77,16 @@ export default function ChooseScenario() {
     }
 
     function chooseType(index: number) {
-        // var obj = global.homeData;
-        // if (obj.access.current.qualification.status != "PROVISIONAL_QUALIFIED" && index == 1) {
-        //     Taro.showToast({
-        //         title: '暂无权限',
-        //         icon: 'none'
-
-        //     })
-        //     vibrate()
-        //     return;
-        // }
+        var obj = global.homeData;
+        if (obj.access.current.qualification.status != "PROVISIONAL_QUALIFIED" && index == 1) {
+            Taro.showToast({
+                title: '暂无权限',
+                icon: 'none'
+
+            })
+            vibrate()
+            return;
+        }
         setSelected(index)
         dispatch(chooseMode({ isMixed: index == 1 }))
     }

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

@@ -1016,6 +1016,9 @@ export default function Page() {
                     user.isLogin && user.test_user && homeData && (homeData as any).access && <View style={{ display: 'flex', flexDirection: 'column' }}>
                         <Text style={{ color: '#fff', fontSize: 15 }}>current status:{(homeData as any).access.current.qualification.status}</Text>
                         <Text style={{ color: '#fff', fontSize: 15 }}>previous status:{(homeData as any).access.previous.qualification.status}</Text>
+                        <Text style={{ color: '#fff', fontSize: 15 }}>trigger event:{(homeData as any).access.current.qualification.trigger_event}</Text>
+                        <Text style={{ color: '#fff', fontSize: 15 }}>lost_access_total:{(homeData as any).access.current.qualification.condition.lost_access_total}</Text>
+                        <Text style={{ color: '#fff', fontSize: 15 }}>streak_fast_min_required:{(homeData as any).access.current.qualification.condition.streak_fast_min_required}</Text>
                     </View>
                 }
 

+ 15 - 9
src/pages/clock/SetGoal.tsx

@@ -53,11 +53,14 @@ export default function SetGoal() {
         }
         var hours = Math.floor(duration / 60)
         var minutes = duration % 60
-        var str = hours + ' hours ' + minutes + ' minutes'
+        var str = hours + ' hours'// + minutes + ' minutes'
+        if (minutes > 0) {
+            str += ` ${minutes} minutes`
+        }
         setFastDuration(str)
     }
 
-    function getFastDurationMinutes(){
+    function getFastDurationMinutes() {
         var obj = target.fast.schedule.fast
         var duration = obj.end_time.split(':')[0] * 60 + obj.end_time.split(':')[1] * 1 - (obj.start_time.split(':')[0] * 60 + obj.start_time.split(':')[1] * 1)
         if (duration <= 0) {
@@ -74,11 +77,14 @@ export default function SetGoal() {
         }
         var hours = Math.floor(duration / 60)
         var minutes = duration % 60
-        var str = hours + ' hours ' + minutes + ' minutes'
+        var str = hours + ' hours'// + minutes + ' minutes'
+        if (minutes > 0) {
+            str += ` ${minutes} minutes`
+        }
         setSleepDuration(str)
     }
 
-    function getSleepDurationMinutes(){
+    function getSleepDurationMinutes() {
         var obj = target.sleep.schedule.sleep
         var duration = obj.end_time.split(':')[0] * 60 + obj.end_time.split(':')[1] * 1 - (obj.start_time.split(':')[0] * 60 + obj.start_time.split(':')[1] * 1)
         if (duration <= 0) {
@@ -194,13 +200,13 @@ export default function SetGoal() {
             params.schedule.sleep = {
                 start_time: sleepTarget.start_time,
                 end_time: sleepTarget.end_time,
-                duration:{
-                    input_value:getSleepDurationMinutes()
+                duration: {
+                    input_value: getSleepDurationMinutes()
                 },
-                latency: {
+                latency: parseInt(router.params.isSelf + '') == 1 ? null : {
                     input_value: target.sleep.schedule.sleep.latency.init_value,
                 },
-                cycle: {
+                cycle: parseInt(router.params.isSelf + '') == 1 ? null : {
                     num: {
                         input_value: target.sleep.schedule.sleep.cycle.num.init_value,
                     }
@@ -323,7 +329,7 @@ export default function SetGoal() {
         }
     }
 
-    return <View style={{ display: 'flex', flexDirection: 'column',flex:1 }}>
+    return <View style={{ display: 'flex', flexDirection: 'column', flex: 1 }}>
         <Text className="target_title">{isSelf ? t('feature.set_goal.set_action_plan') : t('feature.set_goal.almost_done')}</Text>
         {
             !isSelf && <Text className="target_desc">{t('feature.set_goal.header')}</Text>

+ 20 - 9
src/pages/clock/Suggest.tsx

@@ -65,8 +65,8 @@ export default function Suggest() {
                 var start = TimeFormatter.padZero(Math.floor(startCount / 60)) + ':' + TimeFormatter.padZero(startCount % 60)
 
                 array.push({
-                    hours: obj.duration.options[i]/60,
-                    left: 24 - obj.duration.options[i]/60,
+                    hours: obj.duration.options[i] / 60,
+                    left: 24 - obj.duration.options[i] / 60,
                     // minutes: obj.duration.minutes[i],
                     // number: obj.duration.numbers[i],
                     time: start
@@ -332,7 +332,11 @@ export default function Suggest() {
 
     function timePicker() {
         return <View>
-            <View style={{ marginBottom: rpxToPx(40), marginLeft: rpxToPx(46), marginRight: rpxToPx(46), borderRadius: rpxToPx(20), overflow: 'hidden' }}>
+            <View style={{
+                marginBottom: rpxToPx(40), marginLeft: rpxToPx(46),
+                marginRight: rpxToPx(46), borderRadius: 10,
+                overflow: 'hidden', backgroundColor: '#1c1c1c', paddingTop: 10, paddingBottom: 10
+            }}>
                 <PickerViews ref={null}
                     onChange={timePickerChanged}
                     items={durationDatas()}
@@ -364,7 +368,11 @@ export default function Suggest() {
     function fallSleepPicker() {
         return <View>
             <View className="target_desc">{t('feature.suggest.fall_sleep_picker_header')}</View>
-            <View style={{ marginLeft: rpxToPx(46), marginRight: rpxToPx(46), borderRadius: rpxToPx(20), overflow: 'hidden' }}>
+            <View style={{
+                marginLeft: rpxToPx(46), marginRight: rpxToPx(46),
+                borderRadius: 10,
+                overflow: 'hidden', backgroundColor: '#1c1c1c', paddingTop: 10, paddingBottom: 10
+            }}>
                 <PickerViews ref={null}
                     onChange={fallSleepChanged}
                     items={sleepLatency()}
@@ -497,12 +505,12 @@ export default function Suggest() {
 
                                 </View>
                                 {
-                                index == suggestIndex && <View className="choose_item_check_bg">
-                                    <IconCheck color={ColorType.fast} width={24} height={24} />
-                                </View>
-                            }
+                                    index == suggestIndex && <View className="choose_item_check_bg">
+                                        <IconCheck color={ColorType.fast} width={24} height={24} />
+                                    </View>
+                                }
                             </View>
-                            
+
                             // return <View onClick={() => {
                             //     setSuggestIndex(index)
                             // }} key={index} className={index == suggestIndex ? 'item_choose_selected' : 'item_choose'}>
@@ -584,6 +592,9 @@ export default function Suggest() {
             {
                 pageStep == 2 && fallSleepPicker()
             }
+            {
+                pageStep==2 && <View style={{height:200}}/>
+            }
         </View>
     }
 

+ 1 - 1
src/pages/common/RecordsHistory.tsx

@@ -320,7 +320,7 @@ export default function Page() {
                     global.refreshStreaks()
                 }
                 if (global.checkAccess) {
-                    global.checkAccess((res as any).access, true)
+                    global.checkAccess((res as any).access)
                 }
 
                 if (global.indexPageRefresh) {

Некоторые файлы не были показаны из-за большого количества измененных файлов