diff --git a/app/(tabs)/index.tsx b/app/(tabs)/index.tsx
index 1c298f6..54be4d7 100644
--- a/app/(tabs)/index.tsx
+++ b/app/(tabs)/index.tsx
@@ -7,7 +7,7 @@ import { formatTime } from '@/components/shared/business/timeHelpers';
import { useNavigation } from '@react-navigation/native';
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import { RootStackParamList } from '@/app/RootStackParamList';
-import { VerticalSpacer } from '@/components/shared/Spacers';
+import { HorizontalSpacer, VerticalSpacer } from '@/components/shared/Spacers';
import { TimerPickerModal } from 'react-native-timer-picker';
import Button from '@/components/shared/Button';
import NumberSelector from '@/components/shared/NumberSelector';
@@ -63,14 +63,11 @@ export default function Dashboard() {
return (
- {i18n.t('appTitle')}
-
-
-
- setShowPreparationTimePicker(true)}>
+ setShowPreparationTimePicker(true)}>
{t('preparation')}
+
{formatTime(localPreparationTime)}
@@ -97,9 +94,10 @@ export default function Dashboard() {
}}
/>
- setShowWorkTimePicker(true)}>
+ setShowWorkTimePicker(true)}>
{t('fight')}
+
{formatTime(localWorkTime)}
@@ -126,9 +124,10 @@ export default function Dashboard() {
}}
/>
- setShowRestTimePicker(true)}>
+ setShowRestTimePicker(true)}>
{t('rest')}
+
{formatTime(localRestTime)}
@@ -155,28 +154,43 @@ export default function Dashboard() {
}}
/>
-
+
- {t('repetition')}
+ {t('repetition')}
+
- {t('totalTime')}: {totalWorkTime}
+ {t('totalTime')}: {totalWorkTime}
-
);
}
+const Row = styled.View({
+ flexDirection: 'row',
+ justifyContent: 'space-between',
+ alignItems: 'center',
+ width: '100%'
+})
+
+const SmallButton = styled(Button)({
+ width: '30%'
+})
+
+const LargeButton = styled(Button)({
+ width: '65%'
+})
+
const LoadingContainer = styled.View({
flex: 1,
justifyContent: 'center',
@@ -196,7 +210,7 @@ const Container = styled.View({
})
const CardTextContainer = styled.View({
- flexDirection: 'row',
+ flexDirection: 'column',
justifyContent: 'space-between',
alignItems: 'center'
})
@@ -207,12 +221,21 @@ const CardContainer = styled.View({
})
const CustomText = styled(Text)(({ theme }) => ({
- fontSize: 20,
+ fontSize: 23,
fontWeight: 'bold',
textAlign: 'center',
+}))
+
+const WhiteCustomText = styled(CustomText)(({ theme }) => ({
color: theme.colors.fixed.white
}))
const BlackCustomText = styled(CustomText)(({ theme }) => ({
color: theme.colors.fixed.black
}))
+
+const CenterText = styled(Text)(({ theme }) => ({
+ textAlign: 'center',
+ fontSize: 22,
+ color: theme.colors.fixed.black
+}))
\ No newline at end of file
diff --git a/app/Timer.tsx b/app/Timer.tsx
index af90949..c6aa4c0 100644
--- a/app/Timer.tsx
+++ b/app/Timer.tsx
@@ -189,9 +189,9 @@ export default function Timer() {
const renderBgColor: () => TimerBgColor = () => {
if (isFinish) return "black";
if (isPreparationPhase) return "grey";
- if (isWorkPhase) return "red";
+ if (isWorkPhase) return "pink";
- return "green";
+ return "blue";
};
return (
diff --git a/components/shared/Button.tsx b/components/shared/Button.tsx
index a71f1bc..f8aebcf 100644
--- a/components/shared/Button.tsx
+++ b/components/shared/Button.tsx
@@ -5,7 +5,7 @@ import styled from '@emotion/native';
import { HorizontalSpacer } from '@/components/shared/Spacers';
import { Text } from '@/components/shared/Themed';
-type ButtonColor = 'green' | 'red' | 'grey' | 'white';
+type ButtonColor = 'green' | 'red' | 'grey' | 'white' | 'black' | 'darkGrey' | 'blue' | 'pink';
type LabelColor = ButtonColor | 'black';
type IconLocation = 'left' | 'right';
@@ -69,11 +69,11 @@ const Container = styled.TouchableOpacity<{
disabled: boolean;
secondary: boolean;
}>(({ theme, bgColor, secondary }) => ({
- backgroundColor: theme.colors.fixed[bgColor],
- borderWidth: secondary ? 1 : 0,
+ backgroundColor: secondary ? theme.colors.fixed.white : theme.colors.fixed[bgColor],
+ borderWidth: 4,
borderColor: theme.colors.fixed[bgColor],
- borderRadius: 6,
- height: theme.layout.gridUnit * 12,
+ borderRadius: 0,
+ height: theme.layout.gridUnit * 20,
justifyContent: 'center',
paddingHorizontal: theme.layout.gridUnit * 4,
alignItems: 'center',
diff --git a/components/shared/Card.tsx b/components/shared/Card.tsx
index ec77e2b..5a88b56 100644
--- a/components/shared/Card.tsx
+++ b/components/shared/Card.tsx
@@ -5,30 +5,46 @@ import { TouchableOpacity } from 'react-native';
export interface CardProps {
children: React.ReactNode;
backgroundColor: CardBackgroundColor;
+ borderColor: CardBorderColor;
+ color: CardColor;
testID?: string;
onPress?: () => void;
}
-type CardBackgroundColor = 'red' | 'green' | 'grey' | 'black';
+type CardBackgroundColor = 'red' | 'green' | 'grey' | 'black' | 'white' | 'darkGrey';
+type CardBorderColor = 'pink' | 'blue' | 'grey' | 'black' | 'white' | 'darkGrey';
+type CardColor = 'black' | 'white';
const Card: React.FC = ({
children,
backgroundColor = 'red',
+ color = 'black',
+ borderColor = 'pink',
testID = undefined,
onPress
}) => {
const safeOnPress = useCallback(() => onPress?.(), [onPress]);
const content = (
-
+
{children}
);
const touchableContent = (
-
+
{content}
-
+
)
return (
@@ -36,14 +52,29 @@ const Card: React.FC = ({
);
};
-const Container = styled.View<{
+const CustomTouchableOpacity = styled(TouchableOpacity)<{
+ color: CardColor;
+ borderColor: CardBorderColor;
bgColor: CardBackgroundColor;
-}>(({ theme, bgColor }) => ({
- padding: 30,
- width: '100%',
- borderRadius: 10,
- overflow: 'hidden',
+}>(({ theme, color, borderColor, bgColor }) => ({
+ color: theme.colors.fixed[color],
+ borderColor: theme.colors.fixed[borderColor],
backgroundColor: theme.colors.fixed[bgColor]
}));
+const Container = styled.View<{
+ bgColor: CardBackgroundColor;
+ borderColor: CardBorderColor;
+ color: CardColor;
+}>(({ theme, bgColor, borderColor, color }) => ({
+ padding: 25,
+ width: '100%',
+ borderRadius: 0,
+ overflow: 'hidden',
+ backgroundColor: theme.colors.fixed[bgColor],
+ borderWidth: 4,
+ borderColor: theme.colors.fixed[borderColor],
+ color: theme.colors.fixed[color]
+}));
+
export default Card;
diff --git a/components/useCases/timer/business/type.ts b/components/useCases/timer/business/type.ts
index 2dd9d53..d16e237 100644
--- a/components/useCases/timer/business/type.ts
+++ b/components/useCases/timer/business/type.ts
@@ -1 +1 @@
-export type TimerBgColor = 'red' | 'green' | 'black' | 'grey';
+export type TimerBgColor = 'pink' | 'blue' | 'black' | 'grey';
diff --git a/components/useCases/timer/view/TimerContent.tsx b/components/useCases/timer/view/TimerContent.tsx
index 9cf7ccb..b600d7f 100644
--- a/components/useCases/timer/view/TimerContent.tsx
+++ b/components/useCases/timer/view/TimerContent.tsx
@@ -58,56 +58,69 @@ export default function TimerContent({
};
return (
- <>
- {getTitle()}
+
+
+
+ 3:23
+ {!isPreparationPhase && {currentRep} / {reps}}
+ {isPreparationPhase && {t('preparationDescription')}}
+
-
+
+ {getTitle()}
+
+
+
-
+
+
+
-
+
- {!isPreparationPhase && {currentRep} / {reps}}
- {isPreparationPhase && {t('preparationDescription')}}
+ {isRunning ? (
+
+ ) : (
+
+ )}
-
+
-
-
+
+
-
+
- {isRunning ? (
-
- ) : (
-
- )}
-
-
-
-
-
-
-
-
-
- >
+
+
+
+
);
}
+const PartContainer = styled(View)({
+ backgroundColor: 'transparent',
+});
+
const ButtonContainer = styled(View)<{ bgColor: TimerBgColor }>(({ theme, bgColor }) => ({
backgroundColor: theme.colors.fixed[bgColor],
flexDirection: 'row',
+ gap: 10,
justifyContent: 'space-between',
}));
@@ -123,6 +136,13 @@ const Time = styled(Text)<{ isPreparationPhase?: boolean }>(({ theme, isPreparat
color: isPreparationPhase ? theme.colors.fixed.black : theme.colors.fixed.white
}));
+const Column = styled(View)<{ bgColor: TimerBgColor }>(({ theme, bgColor }) => ({
+ flexDirection: 'column',
+ justifyContent: 'space-around',
+ height: '100%',
+ backgroundColor: theme.colors.fixed[bgColor],
+}));
+
const Reps = styled(Text)<{ isPreparationPhase?: boolean }>(({ theme, isPreparationPhase = false }) => ({
fontSize: 30,
fontWeight: 'bold',
diff --git a/constants/Colors.ts b/constants/Colors.ts
index 3d50195..246963c 100644
--- a/constants/Colors.ts
+++ b/constants/Colors.ts
@@ -3,7 +3,11 @@ const baseColors = {
white: '#FFFFFF',
red: '#FF4141',
green: '#3AC26E',
- grey: '#F9F9F9',
+ grey: '#F5F5F5',
+ darkGrey: '#D9CFC7',
+ yellow: '#FFD700',
+ pink: '#E4007C',
+ blue: '#86C3E3'
} as const;
export default {