Official URL migration preserves sessions, shortcuts prefs, and last clock-in client; auth screens match web with legal links; time clock and invoice editor/send flows are updated for the new domain and UI patterns. Co-authored-by: Cursor <cursoragent@cursor.com>
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
import { KeyboardAvoidingView, Platform, ScrollView, StyleSheet, View, type ViewProps } from "react-native";
|
|
|
|
import { AuthBackground } from "@/components/AppBackground";
|
|
import { FullScreen } from "@/components/Screen";
|
|
import { spacing } from "@/constants/theme";
|
|
|
|
export function AuthScreenLayout({ children, style, ...props }: ViewProps) {
|
|
return (
|
|
<AuthBackground>
|
|
<FullScreen style={styles.safe}>
|
|
<KeyboardAvoidingView
|
|
behavior={Platform.OS === "ios" ? "padding" : undefined}
|
|
style={styles.flex}
|
|
>
|
|
<ScrollView
|
|
contentContainerStyle={styles.container}
|
|
keyboardShouldPersistTaps="handled"
|
|
>
|
|
<View style={[styles.content, style]} {...props}>
|
|
{children}
|
|
</View>
|
|
</ScrollView>
|
|
</KeyboardAvoidingView>
|
|
</FullScreen>
|
|
</AuthBackground>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
safe: {
|
|
flex: 1,
|
|
},
|
|
flex: {
|
|
flex: 1,
|
|
},
|
|
container: {
|
|
flexGrow: 1,
|
|
justifyContent: "center",
|
|
paddingHorizontal: spacing.lg,
|
|
paddingVertical: spacing.xl,
|
|
},
|
|
content: {
|
|
width: "100%",
|
|
maxWidth: 420,
|
|
alignSelf: "center",
|
|
},
|
|
});
|