|
|
@@ -17,6 +17,8 @@ import { setScenario, setScenarioName, setStep } from "@/store/scenario";
|
|
|
import { getPlans } from "@/services/trackTimeDuration";
|
|
|
import { ChooseScenarioBtn } from "@/features/common/SpecBtns";
|
|
|
import Layout from "@/components/layout/layout";
|
|
|
+import { ColorType } from "@/context/themes/color";
|
|
|
+import TitleView from "./TitleView";
|
|
|
|
|
|
|
|
|
export default function Component() {
|
|
|
@@ -70,18 +72,18 @@ export default function Component() {
|
|
|
var background;
|
|
|
switch (selIndex) {
|
|
|
case 0:
|
|
|
- style = { backgroundColor: '#AAFF00' }
|
|
|
- background = '#AAFF00'
|
|
|
+ style = { backgroundColor: ColorType.fast }
|
|
|
+ background = ColorType.fast
|
|
|
break;
|
|
|
case 1:
|
|
|
- style = { backgroundColor: '#00FFFF' }
|
|
|
- background = '#00FFFF'
|
|
|
+ style = { backgroundColor: ColorType.sleep }
|
|
|
+ background = ColorType.sleep
|
|
|
break;
|
|
|
case 2:
|
|
|
style = {
|
|
|
- background: 'linear-gradient(to right, #AAFF00, #00FFFF)'
|
|
|
+ background: 'linear-gradient(to right, ' + ColorType.fast + ', ' + ColorType.sleep + ')'
|
|
|
}
|
|
|
- background = 'linear-gradient(to right, #AAFF00, #00FFFF)'
|
|
|
+ background = 'linear-gradient(to right, ' + ColorType.fast + ', ' + ColorType.sleep + ')'
|
|
|
break;
|
|
|
}
|
|
|
return <View>
|
|
|
@@ -177,13 +179,13 @@ export default function Component() {
|
|
|
}
|
|
|
|
|
|
const targetRing: TargetRing = {
|
|
|
- color: '#AAFF00',
|
|
|
+ color: ColorType.fast,
|
|
|
startArc: timeToArc((getScheduleTarget(true) as any).start_time),
|
|
|
durationArc: durationToArc((getScheduleTarget(true) as any).start_time, (getScheduleTarget(true) as any).end_time)
|
|
|
}
|
|
|
|
|
|
const targetRing2: TargetRing = {
|
|
|
- color: '#00FFFF',
|
|
|
+ color: ColorType.sleep,
|
|
|
startArc: timeToArc((getScheduleTarget(false) as any).start_time),
|
|
|
durationArc: durationToArc((getScheduleTarget(false) as any).start_time, (getScheduleTarget(false) as any).end_time)
|
|
|
}
|
|
|
@@ -192,18 +194,16 @@ export default function Component() {
|
|
|
array.push(
|
|
|
<View className="item_row" style={{ opacity: scenarios.length > 0 ? 1 : 0 }}>
|
|
|
<Rings2 common={common} bgRing={bgRing} targetRing={targetRing} canvasId='0' />
|
|
|
- {/* <Rings radius={33} strokeWidth={8} color='#AAFF00' canvasId='0' /> */}
|
|
|
<View className="item_txt_bg">
|
|
|
- <Text className="item_txt" style={{ color: '#AAFF00' }}>{t('page.choose_scenario.fast')}</Text>
|
|
|
+ <Text className="item_txt" style={{ color: ColorType.fast }}>{t('feature.track_time_duration.choose_scenario.list.item1.name')}</Text>
|
|
|
</View>
|
|
|
</View>
|
|
|
);
|
|
|
array.push(
|
|
|
<View className="item_row" style={{ opacity: scenarios.length > 0 ? 1 : 0 }}>
|
|
|
<Rings2 common={common} bgRing={bgRing} targetRing={targetRing2} canvasId='1' />
|
|
|
- {/* <Rings radius={33} strokeWidth={8} color='#00FFFF' canvasId='1' /> */}
|
|
|
<View className="item_txt_bg">
|
|
|
- <Text className="item_txt" style={{ color: '#00FFFF' }}>{t('page.choose_scenario.sleep')}</Text>
|
|
|
+ <Text className="item_txt" style={{ color: ColorType.sleep }}>{t('feature.track_time_duration.choose_scenario.list.item2.name')}</Text>
|
|
|
</View>
|
|
|
</View>
|
|
|
)
|
|
|
@@ -212,12 +212,11 @@ export default function Component() {
|
|
|
<View style={{ position: 'relative', zIndex: 1 }}>
|
|
|
<Rings2 common={common} bgRing={bgRing} targetRing={targetRing} canvasId='3' />
|
|
|
<View style={{ display: 'flex', position: 'absolute', left: 0, right: 0, top: 0, bottom: 0, alignItems: 'center', justifyContent: 'center' }}>
|
|
|
- {/* <Rings radius={23} strokeWidth={6} color='#00FFFF' canvasId='4' /> */}
|
|
|
<Rings2 common={common2} bgRing={bgRing} targetRing={targetRing2} canvasId='4' />
|
|
|
</View>
|
|
|
</View>
|
|
|
<View className="item_txt_bg">
|
|
|
- <Text className="item_txt" style={{ color: '#00FFFF' }}>{t('page.choose_scenario.fast_sleep')}</Text>
|
|
|
+ <Text className="item_txt fast_sleep_text" >{t('feature.track_time_duration.choose_scenario.list.item3.name')}</Text>
|
|
|
</View>
|
|
|
</View>
|
|
|
)
|
|
|
@@ -240,11 +239,14 @@ export default function Component() {
|
|
|
}
|
|
|
|
|
|
return <Layout title={t('page.choose_scenario.title')}
|
|
|
- titleShowStyle={NaviBarTitleShowType.scrollToShow} type={TemplateType.flex}>
|
|
|
+ titleShowStyle={NaviBarTitleShowType.scrollToShow} type={TemplateType.customHeader}>
|
|
|
<View className="container">
|
|
|
+ <TitleView title={t('page.choose_scenario.title')}
|
|
|
+ subTitle={t('page.choose_scenario.sub_title')}
|
|
|
+ />
|
|
|
{/* <Texts text={t('page.choose_scenario.title')} type={TextType.primary}></Texts> */}
|
|
|
- <Texts text={t('page.choose_scenario.sub_title')} type={TextType.secondary}></Texts>
|
|
|
- <View style={{ height: 20 }} />
|
|
|
+ {/* <Texts text={t('page.choose_scenario.sub_title')} type={TextType.secondary}></Texts> */}
|
|
|
+ {/* <View style={{ height: 20 }} /> */}
|
|
|
{
|
|
|
scenarios.length > 0 && <View style={{ position: 'relative', zIndex: 1 }}>
|
|
|
<SingleSelect items={items()} itemSelect={handleItemSelect} selIndex={selIndex} />
|