|
|
@@ -453,58 +453,59 @@ export default function Component() {
|
|
|
}
|
|
|
|
|
|
return (
|
|
|
- <Box style={{ flexDirection: 'column', alignItems: 'center',flexShrink:0 }}>
|
|
|
- {
|
|
|
- value == 'ONGOING' && <View>
|
|
|
- <Text className="counter_text" style={{ color: textColor, opacity: textAlpha() }}>{(machine.context.checkData as any).current_record.scenario == 'FAST' ?
|
|
|
- TimeFormatter.countdown((machine.context.checkData as any).current_record.fast.target_end_time) :
|
|
|
- TimeFormatter.countdown((machine.context.checkData as any).current_record.sleep.target_end_time)}</Text>
|
|
|
- </View>
|
|
|
- }
|
|
|
- {
|
|
|
- (value == 'ONGOING1' || value == 'WAIT_FOR_START') && <Stepper child={
|
|
|
- <Text className="stepper_text" style={{ color: textColor, opacity: textAlpha() }} onClick={showDurationPicker}>{durationFormate()}</Text>
|
|
|
- } minus={minus} plus={plus} disableMinus={disableMinus()} disablePlus={disablePlus()} />
|
|
|
- // <Text style={{marginBottom:10}} onClick={showDurationPicker}>时长:{durationFormate()}</Text>
|
|
|
- }
|
|
|
- {
|
|
|
- machine.context.checkData && value == 'ONGOING2' && <View>
|
|
|
- <Text className="counter_text" style={{ color: '#00ffff', opacity: textAlpha() }}>{TimeFormatter.countdown((machine.context.checkData as any).current_record.sleep.target_end_time)}</Text>
|
|
|
- </View>
|
|
|
- }
|
|
|
-
|
|
|
- {
|
|
|
- machine.context.checkData && value == 'ONGOING3' && <View>
|
|
|
- <Text className="counter_text" style={{ color: textColor, opacity: textAlpha() }}>{TimeFormatter.countdown((machine.context.checkData as any).current_record.fast.target_end_time)}</Text>
|
|
|
- </View>
|
|
|
- }
|
|
|
+ <Box >
|
|
|
+ <View style={{ display:'flex',flexDirection: 'column',alignItems: 'center', flexShrink: 0 }}>
|
|
|
+ {
|
|
|
+ value == 'ONGOING' && <View>
|
|
|
+ <Text className="counter_text" style={{ color: textColor, opacity: textAlpha() }}>{(machine.context.checkData as any).current_record.scenario == 'FAST' ?
|
|
|
+ TimeFormatter.countdown((machine.context.checkData as any).current_record.fast.target_end_time) :
|
|
|
+ TimeFormatter.countdown((machine.context.checkData as any).current_record.sleep.target_end_time)}</Text>
|
|
|
+ </View>
|
|
|
+ }
|
|
|
+ {
|
|
|
+ (value == 'ONGOING1' || value == 'WAIT_FOR_START') && <Stepper child={
|
|
|
+ <Text className="stepper_text" style={{ color: textColor, opacity: textAlpha() }} onClick={showDurationPicker}>{durationFormate()}</Text>
|
|
|
+ } minus={minus} plus={plus} disableMinus={disableMinus()} disablePlus={disablePlus()} />
|
|
|
+ // <Text style={{marginBottom:10}} onClick={showDurationPicker}>时长:{durationFormate()}</Text>
|
|
|
+ }
|
|
|
+ {
|
|
|
+ machine.context.checkData && value == 'ONGOING2' && <View>
|
|
|
+ <Text className="counter_text" style={{ color: '#00ffff', opacity: textAlpha() }}>{TimeFormatter.countdown((machine.context.checkData as any).current_record.sleep.target_end_time)}</Text>
|
|
|
+ </View>
|
|
|
+ }
|
|
|
|
|
|
- <View>
|
|
|
{
|
|
|
- key === 'FAST_SLEEP' && mixedBtns()
|
|
|
+ machine.context.checkData && value == 'ONGOING3' && <View>
|
|
|
+ <Text className="counter_text" style={{ color: textColor, opacity: textAlpha() }}>{TimeFormatter.countdown((machine.context.checkData as any).current_record.fast.target_end_time)}</Text>
|
|
|
+ </View>
|
|
|
}
|
|
|
+
|
|
|
+ <View>
|
|
|
+ {
|
|
|
+ key === 'FAST_SLEEP' && mixedBtns()
|
|
|
+ }
|
|
|
+ {
|
|
|
+ key === 'FAST' && fastBtns()
|
|
|
+ }
|
|
|
+ {
|
|
|
+ key === 'SLEEP' && sleepBtns()
|
|
|
+ }
|
|
|
+ </View>
|
|
|
{
|
|
|
- key === 'FAST' && fastBtns()
|
|
|
+ showModal && isOpen && <Modal testInfo={testLayout()} children={layoutContent()} dismiss={() => setIsOpen(false)} confirm={() => {
|
|
|
+ var picker = limitPickerRef.current;
|
|
|
+ pickerConfirm((picker as any).getConfirmData());
|
|
|
+ setIsOpen(false);
|
|
|
+ }} />
|
|
|
}
|
|
|
{
|
|
|
- key === 'SLEEP' && sleepBtns()
|
|
|
+ isOpenDurationPicker && <Modal children={durationPickerContent()} dismiss={() => setIsOpenDurationPicker(false)} confirm={() => {
|
|
|
+ var picker = durationPickerRef.current;
|
|
|
+ durationChange((picker as any).getConfirmData());
|
|
|
+ setIsOpenDurationPicker(false);
|
|
|
+ }} />
|
|
|
}
|
|
|
</View>
|
|
|
- {
|
|
|
- showModal && isOpen && <Modal testInfo={testLayout()} children={layoutContent()} dismiss={() => setIsOpen(false)} confirm={() => {
|
|
|
- var picker = limitPickerRef.current;
|
|
|
- pickerConfirm((picker as any).getConfirmData());
|
|
|
- setIsOpen(false);
|
|
|
- }} />
|
|
|
- }
|
|
|
- {
|
|
|
- isOpenDurationPicker && <Modal children={durationPickerContent()} dismiss={() => setIsOpenDurationPicker(false)} confirm={() => {
|
|
|
- var picker = durationPickerRef.current;
|
|
|
- durationChange((picker as any).getConfirmData());
|
|
|
- setIsOpenDurationPicker(false);
|
|
|
- }} />
|
|
|
- }
|
|
|
-
|
|
|
</Box>
|
|
|
)
|
|
|
}
|