mirror of
https://github.com/urosran/cally.git
synced 2025-07-10 15:17:17 +00:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@ -19,7 +19,7 @@ import {Text} from "react-native-ui-lib";
|
|||||||
import {addDays, compareAsc, format, isWithinInterval, subDays} from "date-fns";
|
import {addDays, compareAsc, format, isWithinInterval, subDays} from "date-fns";
|
||||||
import {useCalSync} from "@/hooks/useCalSync";
|
import {useCalSync} from "@/hooks/useCalSync";
|
||||||
import {useSyncEvents} from "@/hooks/useSyncOnScroll";
|
import {useSyncEvents} from "@/hooks/useSyncOnScroll";
|
||||||
import {colorMap} from "@/constants/colorMap";
|
import {colorMap, getEventTextColor} from "@/constants/colorMap";
|
||||||
import {useGetFamilyMembers} from "@/hooks/firebase/useGetFamilyMembers";
|
import {useGetFamilyMembers} from "@/hooks/firebase/useGetFamilyMembers";
|
||||||
import CachedImage from "expo-cached-image";
|
import CachedImage from "expo-cached-image";
|
||||||
import { DeviceType } from "expo-device";
|
import { DeviceType } from "expo-device";
|
||||||
@ -111,7 +111,7 @@ export const MonthCalendar: React.FC<EventCalendarProps> = React.memo(
|
|||||||
eventColor = profileData?.eventColor ?? colorMap.teal;
|
eventColor = profileData?.eventColor ?? colorMap.teal;
|
||||||
}
|
}
|
||||||
|
|
||||||
return {backgroundColor: eventColor, fontSize: 14}
|
return {backgroundColor: eventColor, fontSize: 14, color: getEventTextColor(event?.eventColor)}
|
||||||
},
|
},
|
||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
|
@ -1,49 +1,78 @@
|
|||||||
import {Button, Text, TextField, View} from "react-native-ui-lib";
|
import { Button, ButtonSize, Text, TextField, View } from "react-native-ui-lib";
|
||||||
import React, {useState} from "react";
|
import React, { useState } from "react";
|
||||||
import {StyleSheet} from "react-native";
|
import { StyleSheet } from "react-native";
|
||||||
import {useResetPassword} from "@/hooks/firebase/useResetPassword";
|
import { useResetPassword } from "@/hooks/firebase/useResetPassword";
|
||||||
|
import { router } from "expo-router";
|
||||||
|
|
||||||
export const ResetPasswordPage = () => {
|
export const ResetPasswordPage = () => {
|
||||||
const [email, setEmail] = useState<string>("");
|
const [email, setEmail] = useState<string>("");
|
||||||
|
|
||||||
const {mutateAsync: resetPassword, error, isError, isLoading} = useResetPassword();
|
const {
|
||||||
|
mutateAsync: resetPassword,
|
||||||
|
error,
|
||||||
|
isError,
|
||||||
|
isLoading,
|
||||||
|
} = useResetPassword();
|
||||||
|
|
||||||
const handleResetPassword = async () => {
|
const handleResetPassword = async () => {
|
||||||
await resetPassword({email});
|
await resetPassword({ email });
|
||||||
alert("Password reset, please check your email")
|
alert("Password reset, please check your email");
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View padding-10 centerV height={"100%"}>
|
<View padding-10 centerV height={"100%"}>
|
||||||
<Text text70 center>
|
<Text text70 center>
|
||||||
Please enter your email and reset your password
|
Please enter your email and reset your password
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<TextField
|
<TextField
|
||||||
placeholder="Email"
|
placeholder="Email"
|
||||||
value={email}
|
value={email}
|
||||||
onChangeText={setEmail}
|
onChangeText={setEmail}
|
||||||
style={styles.textfield}
|
style={styles.textfield}
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
label="Reset Password"
|
label="Reset Password"
|
||||||
onPress={handleResetPassword}
|
onPress={handleResetPassword}
|
||||||
marginB-20
|
marginB-20
|
||||||
backgroundColor="#fd1775"
|
backgroundColor="#fd1775"
|
||||||
disabled={isLoading}
|
disabled={isLoading}
|
||||||
/>
|
/>
|
||||||
|
<View>
|
||||||
|
<Button
|
||||||
|
onPress={() => router.push("/(unauth)/sign_in")}
|
||||||
|
label="Back"
|
||||||
|
labelStyle={[
|
||||||
|
styles.jakartaMedium,
|
||||||
|
{ textDecorationLine: "none", color: "#fd1575" },
|
||||||
|
]}
|
||||||
|
link
|
||||||
|
size={ButtonSize.xSmall}
|
||||||
|
padding-0
|
||||||
|
margin-0
|
||||||
|
text70
|
||||||
|
left
|
||||||
|
color="#fd1775"
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
|
||||||
{isError && <Text center style={{marginBottom: 20}}>{`${error}`}</Text>}
|
{isError && <Text center style={{ marginBottom: 20 }}>{`${error}`}</Text>}
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
textfield: {
|
textfield: {
|
||||||
backgroundColor: "white",
|
backgroundColor: "white",
|
||||||
marginVertical: 10,
|
marginVertical: 10,
|
||||||
padding: 30,
|
padding: 30,
|
||||||
height: 45,
|
height: 45,
|
||||||
borderRadius: 50,
|
borderRadius: 50,
|
||||||
},
|
},
|
||||||
|
jakartaMedium: {
|
||||||
|
fontFamily: "PlusJakartaSans_500Medium",
|
||||||
|
fontSize: 16,
|
||||||
|
color: "#919191",
|
||||||
|
textDecorationLine: "underline",
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
@ -78,6 +78,8 @@ const UpdateUserDialog = ({ open, handleClose, profileData }: Props) => {
|
|||||||
allowsEditing: true,
|
allowsEditing: true,
|
||||||
aspect: [1, 1],
|
aspect: [1, 1],
|
||||||
quality: 1,
|
quality: 1,
|
||||||
|
base64: false,
|
||||||
|
exif: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!result.canceled) {
|
if (!result.canceled) {
|
||||||
|
Reference in New Issue
Block a user