Commit 04871b41 by Tonk

update timer screen

parent 68857b02
......@@ -21,11 +21,11 @@ var swipeoutBtns = [
const mockData = [
{
id: 1,
time: '6.00',
time: '6:00',
period: 'AM',
name: 'Slot 1',
active: true,
repeat: true,
power: true,
day: [
{ day: 'S', dayActive: true },
{ day: 'M', dayActive: true },
......@@ -38,11 +38,11 @@ const mockData = [
},
{
id: 2,
time: '7.00',
time: '7:00',
period: 'AM',
name: 'Slot 2',
active: true,
repeat: false,
power: false,
day: [
{ day: 'S', dayActive: true },
{ day: 'M', dayActive: true },
......@@ -55,11 +55,11 @@ const mockData = [
},
{
id: 3,
time: '8.00',
time: '8:00',
period: 'PM',
name: 'Slot 3',
active: false,
repeat: true,
power: true,
day: [
{ day: 'S', dayActive: false },
{ day: 'M', dayActive: false },
......@@ -132,23 +132,24 @@ export default class TimerScreen extends Component {
<Text style={{ fontSize: 22, color: '#4a4a4a', fontFamily: 'Avenir-Roman' }}>
{data.name}
</Text>
<View style={{ flexDirection: 'row' }}>
<Text style={{ fontSize: 12, color: '#9b9b9b' }}>
Active: {data.active ? 'on' : 'off'}{' '}
</Text>
<Text style={{ fontSize: 12, color: '#9b9b9b' }}>
Repeat: {data.repeat ? 'on' : 'off'}
<Text style={{ fontSize: 12, color: '#9b9b9b' }}>
{data.active ? 'Active' : '???'}{' '}
</Text>
</View>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<View style={{ alignItems: 'center' }}>
<Text
style={{
fontSize: 22,
color: data.power ? '#10ca88' : color.primary,
fontFamily: 'Avenir-Roman',
}}
>
{data.power ? 'ON' : 'OFF'}
</Text>
<Text style={{ fontSize: 12, color: '#9b9b9b' }}>Power</Text>
</View>
</View>
<View style={{ flex: 1, alignItems: 'flex-end', justifyContent: 'center' }}>
<Switch
value={data.active}
trackColor={{ true: 'rgba(238,84,84,0.5)' }}
ios_backgroundColor={'#dfdfdf'}
thumbColor={'#ee5454'}
/>
</View>
</View>
</View>
</Swipeout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment