···
1
+
import { GmstnLogoColor } from "@/components/icons/gmstn/GmstnLogoColor";
2
+
import { Text } from "@/components/primitives/Text";
3
+
import { useFacet } from "@/lib/facet";
4
+
import { lighten } from "@/lib/facet/src/lib/colors";
import { useOAuthSetter, useOAuthValue } from "@/providers/OAuthProvider";
6
+
import { useCurrentPalette } from "@/providers/ThemeProvider";
import { Agent } from "@atproto/api";
8
+
import { ArrowRight } from "lucide-react-native";
import { useState } from "react";
4
-
import { Button, StyleSheet, TextInput, View } from "react-native";
10
+
import { Pressable, TextInput, View } from "react-native";
export const Login = () => {
13
+
const { semantic } = useCurrentPalette();
14
+
const { atoms, typography } = useFacet();
const [atprotoHandle, setAtprotoHandle] = useState("");
const oAuth = useOAuthValue();
const setOAuth = useOAuthSetter();
···
35
-
style={styles.input}
36
-
value={atprotoHandle}
37
-
onChangeText={setAtprotoHandle}
38
-
placeholder="alice.bsky.social"
39
-
onSubmitEditing={handleSubmit}
41
-
<Button title="Log in with your PDS ->" onPress={handleSubmit} />
44
+
flexDirection: "column",
45
+
alignItems: "center",
46
+
justifyContent: "center",
50
+
<View style={{ alignItems: "center" }}>
51
+
<View style={{ padding: 8, paddingLeft: 12, paddingTop: 12 }}>
52
+
<GmstnLogoColor height={36} width={36} />
56
+
typography.sizes.xl,
57
+
typography.weights.byName.medium,
63
+
<View style={{ gap: 10 }}>
68
+
borderColor: semantic.border,
69
+
borderRadius: atoms.radii.lg,
70
+
paddingHorizontal: 14,
71
+
paddingVertical: 12,
74
+
color: semantic.text
75
+
}, typography.weights.byName.light]}
76
+
value={atprotoHandle}
77
+
onChangeText={setAtprotoHandle}
78
+
placeholder="alice.bsky.social"
79
+
onSubmitEditing={handleSubmit}
80
+
placeholderTextColor={semantic.textPlaceholder}
82
+
<Pressable onPress={handleSubmit}>
86
+
backgroundColor: hovered
87
+
? lighten(semantic.primary, 7)
89
+
flexDirection: "row",
91
+
alignItems: "center",
92
+
justifyContent: "center",
93
+
paddingVertical: 10,
94
+
borderRadius: atoms.radii.lg,
99
+
{ color: semantic.textInverse },
100
+
typography.weights.byName.normal,
103
+
Log in with ATProto
108
+
color={semantic.textInverse}
46
-
const styles = StyleSheet.create({
50
-
borderColor: "#ccc",
52
-
paddingHorizontal: 12,