|
|
@@ -40,7 +40,7 @@ export default function Component() {
|
|
|
var current_record = (checkData as any).current_record
|
|
|
var currentDot1 = getDot((checkData as any).current_record, true)
|
|
|
var targetBigRing1 = getTarget((checkData as any).current_record, true)
|
|
|
- targetBigRing1.color = global.fastColor?global.fastColor:ColorType.fast+'33'//'rgba(170,255,0,0.4)'
|
|
|
+ targetBigRing1.color = global.fastColor ? global.fastColor : ColorType.fast + '33'//'rgba(170,255,0,0.4)'
|
|
|
if (current_record.status == 'ONGOING') {
|
|
|
var realRing1 = getReal((checkData as any).current_record, true, false)
|
|
|
|
|
|
@@ -66,14 +66,14 @@ export default function Component() {
|
|
|
var realRing = getReal((checkData as any).current_record, false, false)
|
|
|
var currentDot = getDot((checkData as any).current_record, false)
|
|
|
var targetRing = getTarget((checkData as any).current_record, false)
|
|
|
- targetRing.color = global.sleepColor?global.sleepColor:ColorType.sleep+'33'//'rgba(0, 255, 255, 0.4)'
|
|
|
+ targetRing.color = global.sleepColor ? global.sleepColor : ColorType.sleep + '33'//'rgba(0, 255, 255, 0.4)'
|
|
|
if (current_record.status == 'ONGOING2') {
|
|
|
return <Rings common={common} bgRing={bgRing} realRing={realRing} currentDot={currentDot} targetRing={targetRing} canvasId='clock7' />
|
|
|
}
|
|
|
|
|
|
//ongoing3时,睡眠点整理亮度降低
|
|
|
if (current_record.status == 'ONGOING3') {
|
|
|
- currentDot.color = global.sleepColor?global.sleepColor:ColorType.sleep+'66'
|
|
|
+ currentDot.color = global.sleepColor ? global.sleepColor : ColorType.sleep + '66'
|
|
|
}
|
|
|
return <Rings common={common} bgRing={bgRing} currentDot={currentDot} canvasId='clock8' />
|
|
|
}
|
|
|
@@ -81,10 +81,15 @@ export default function Component() {
|
|
|
}
|
|
|
|
|
|
if (!checkData)
|
|
|
- return <View style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', width: '100%', marginTop: 20 }}>
|
|
|
+ return <View style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', width: '100%', marginTop: 20,position:'relative' }}>
|
|
|
{
|
|
|
bigRing()
|
|
|
}
|
|
|
+ <View style={{ display: 'flex', position: 'absolute', left: 0, right: 0, top: 0, bottom: 0, alignItems: 'center', justifyContent: 'center' }}>
|
|
|
+ {
|
|
|
+ <Text className="clock_text fast_sleep_text" style={{ fontSize: 32 }}>{TimeFormatter.getCurrentHourAndMinute()}</Text>
|
|
|
+ }
|
|
|
+ </View>
|
|
|
</View>
|
|
|
return (
|
|
|
<View style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', width: '100%' }}>
|
|
|
@@ -99,38 +104,38 @@ export default function Component() {
|
|
|
</View>
|
|
|
<View style={{ display: 'flex', position: 'absolute', left: 0, right: 0, top: 0, bottom: 0, alignItems: 'center', justifyContent: 'center' }}>
|
|
|
{
|
|
|
- (checkData as any).current_record.status == 'WAIT_FOR_START' && time.scenario=='FAST_SLEEP' &&
|
|
|
- <Text className="clock_text fast_sleep_text" style={{fontSize:32}}>{TimeFormatter.getCurrentHourAndMinute()}</Text>
|
|
|
+ (checkData as any).current_record.status == 'WAIT_FOR_START' && time.scenario == 'FAST_SLEEP' &&
|
|
|
+ <Text className="clock_text fast_sleep_text" style={{ fontSize: 32 }}>{TimeFormatter.getCurrentHourAndMinute()}</Text>
|
|
|
}
|
|
|
{
|
|
|
- (checkData as any).current_record.status == 'WAIT_FOR_START' && time.scenario!='FAST_SLEEP' &&
|
|
|
- <Text className="clock_text" style={{ color: global.fastColor?global.fastColor:ColorType.fast,fontSize:32 }}>{TimeFormatter.getCurrentHourAndMinute()}</Text>
|
|
|
+ (checkData as any).current_record.status == 'WAIT_FOR_START' && time.scenario != 'FAST_SLEEP' &&
|
|
|
+ <Text className="clock_text" style={{ color: global.fastColor ? global.fastColor : ColorType.fast, fontSize: 32 }}>{TimeFormatter.getCurrentHourAndMinute()}</Text>
|
|
|
}
|
|
|
{
|
|
|
- (checkData as any).current_record.status == 'ONGOING' && <Text className="clock_text" style={{ color: (checkData as any).current_record.scenario == 'FAST' ? global.fastColor?global.fastColor:ColorType.fast : global.sleepColor?global.sleepColor:ColorType.sleep,fontSize:32 }}>
|
|
|
+ (checkData as any).current_record.status == 'ONGOING' && <Text className="clock_text" style={{ color: (checkData as any).current_record.scenario == 'FAST' ? global.fastColor ? global.fastColor : ColorType.fast : global.sleepColor ? global.sleepColor : ColorType.sleep, fontSize: 32 }}>
|
|
|
{TimeFormatter.formateTimeNow((checkData as any).current_record.fast ?
|
|
|
(checkData as any).current_record.fast.real_start_time :
|
|
|
(checkData as any).current_record.sleep.real_start_time)}
|
|
|
</Text>
|
|
|
}
|
|
|
{
|
|
|
- (checkData as any).current_record.status == 'ONGOING1' && <Text className="clock_text" style={{ color: global.fastColor?global.fastColor:ColorType.fast,fontSize:32 }}>
|
|
|
+ (checkData as any).current_record.status == 'ONGOING1' && <Text className="clock_text" style={{ color: global.fastColor ? global.fastColor : ColorType.fast, fontSize: 32 }}>
|
|
|
{TimeFormatter.formateTimeNow((checkData as any).current_record.fast.real_start_time)}
|
|
|
</Text>
|
|
|
}
|
|
|
{
|
|
|
- (checkData as any).current_record.status == 'ONGOING2' && <View style={{ flexDirection: 'column', display: 'flex' }}>
|
|
|
- <Text className="clock_text"style={{ color: global.fastColor?global.fastColor:global.fastColor?global.fastColor:ColorType.fast ,fontSize:32}}>
|
|
|
+ (checkData as any).current_record.status == 'ONGOING2' && <View style={{ flexDirection: 'column', display: 'flex' }}>
|
|
|
+ <Text className="clock_text" style={{ color: global.fastColor ? global.fastColor : global.fastColor ? global.fastColor : ColorType.fast, fontSize: 32 }}>
|
|
|
{TimeFormatter.formateTimeNow((checkData as any).current_record.fast.real_start_time)}
|
|
|
</Text>
|
|
|
- <Text className="clock_text" style={{ color: global.sleepColor?global.sleepColor:ColorType.sleep,fontSize:32 }}>
|
|
|
+ <Text className="clock_text" style={{ color: global.sleepColor ? global.sleepColor : ColorType.sleep, fontSize: 32 }}>
|
|
|
{TimeFormatter.formateTimeNow((checkData as any).current_record.sleep.real_start_time)}
|
|
|
</Text>
|
|
|
</View>
|
|
|
}
|
|
|
{
|
|
|
(checkData as any).current_record.status == 'ONGOING3' && <Text>
|
|
|
- <Text className="clock_text" style={{ color: global.fastColor?global.fastColor:ColorType.fast,fontSize:32 }}>
|
|
|
+ <Text className="clock_text" style={{ color: global.fastColor ? global.fastColor : ColorType.fast, fontSize: 32 }}>
|
|
|
{TimeFormatter.formateTimeNow((checkData as any).current_record.fast.real_start_time)}
|
|
|
</Text>
|
|
|
</Text>
|