login time

This commit is contained in:
Sone
2025-11-05 20:11:34 +01:00
parent b43aec6b9a
commit fdcc42007a
21 changed files with 1363 additions and 843 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ interface AuthHeaderProps {
title?: string;
}
export const AuthHeader = ({ title = "Project Athena" }: AuthHeaderProps) => {
export const AuthHeader = ({ title = "Bird Eye View" }: AuthHeaderProps) => {
return (
<View style={{ alignItems: "center", marginBottom: 36 }}>
<Image
+1 -1
View File
@@ -17,7 +17,7 @@ export const ForgotPasswordLink = ({
onPress={onPress}
disabled={disabled || isResetting}
>
<Text className="text-primaryPurple">
<Text className="text-primaryPurpleDark font-bold">
{isResetting ? "Sending reset email..." : "Forgot Password?"}
</Text>
</TouchableOpacity>
+17 -3
View File
@@ -1,4 +1,4 @@
import { useState } from "react";
import { useRef, useState } from "react";
import {
Platform,
NativeSyntheticEvent,
@@ -32,6 +32,20 @@ export const PasswordInput = ({
submitBehavior,
}: PasswordInputProps) => {
const [secureTextEntry, setSecureTextEntry] = useState(true);
const submitGuardRef = useRef(false);
const triggerSubmitOnce = () => {
if (submitGuardRef.current) return;
submitGuardRef.current = true;
try {
onSubmitEditing?.();
} finally {
// release guard on next tick to allow future submissions
setTimeout(() => {
submitGuardRef.current = false;
}, 0);
}
};
return (
<TextInput
@@ -46,12 +60,12 @@ export const PasswordInput = ({
backgroundColor: "transparent",
...style,
}}
onSubmitEditing={onSubmitEditing}
onSubmitEditing={() => triggerSubmitOnce()}
returnKeyType={returnKeyType}
submitBehavior={submitBehavior ?? "submit"}
onKeyPress={(e) => {
if (Platform.OS === "web" && e?.nativeEvent?.key === "Enter") {
onSubmitEditing?.();
triggerSubmitOnce();
}
}}
left={<TextInput.Icon icon="lock" color="#6750a4" />}
+2 -3
View File
@@ -71,7 +71,7 @@ export const SignInForm = ({
returnKeyType="next"
/>
{error ? (
<Text style={{ color: "#F83434", marginBottom: 8 }}>
<Text style={{ color: "#F83434", marginTop: -4, marginBottom: 8 }}>
{error.message}
</Text>
) : null}
@@ -92,11 +92,10 @@ export const SignInForm = ({
disabled={isLoading}
style={{ marginBottom: 8 }}
returnKeyType="done"
submitBehavior="blurAndSubmit"
onSubmitEditing={() => handleSubmit(submit)()}
/>
{error ? (
<Text style={{ color: "#F83434", marginBottom: 8 }}>
<Text style={{ color: "#F83434", marginTop: -4, marginBottom: 8 }}>
{error.message}
</Text>
) : null}