@oxyhq/services 14.0.1 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/index.js +0 -17
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/SignInAccountChooser.js +189 -0
- package/lib/commonjs/ui/components/SignInAccountChooser.js.map +1 -0
- package/lib/commonjs/ui/components/SignInModal.js +350 -131
- package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +340 -1547
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +61 -64
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAuth.js +14 -33
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/ui/hooks/usePasswordSignIn.js +170 -0
- package/lib/commonjs/ui/hooks/usePasswordSignIn.js.map +1 -0
- package/lib/commonjs/ui/hooks/useProfileEditing.js +2 -5
- package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +2 -2
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +1 -0
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +93 -68
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileScreen.js +187 -0
- package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +3 -7
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/OxyAuthScreen.js +231 -95
- package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +15 -2
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/linkFormat.js +38 -0
- package/lib/commonjs/ui/screens/linkFormat.js.map +1 -0
- package/lib/commonjs/ui/session/authStore.js +146 -0
- package/lib/commonjs/ui/session/authStore.js.map +1 -0
- package/lib/commonjs/ui/session/createSessionClient.js +25 -10
- package/lib/commonjs/ui/session/createSessionClient.js.map +1 -1
- package/lib/commonjs/ui/session/index.js +13 -7
- package/lib/commonjs/ui/session/index.js.map +1 -1
- package/lib/commonjs/ui/session/tokenTransport.js +19 -31
- package/lib/commonjs/ui/session/tokenTransport.js.map +1 -1
- package/lib/commonjs/ui/utils/isWebBrowser.js +13 -0
- package/lib/commonjs/ui/utils/isWebBrowser.js.map +1 -0
- package/lib/commonjs/utils/deviceFlowSignIn.js +13 -16
- package/lib/commonjs/utils/deviceFlowSignIn.js.map +1 -1
- package/lib/module/index.js +0 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/SignInAccountChooser.js +183 -0
- package/lib/module/ui/components/SignInAccountChooser.js.map +1 -0
- package/lib/module/ui/components/SignInModal.js +352 -134
- package/lib/module/ui/components/SignInModal.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +342 -1551
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +60 -63
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/hooks/useAuth.js +14 -33
- package/lib/module/ui/hooks/useAuth.js.map +1 -1
- package/lib/module/ui/hooks/usePasswordSignIn.js +165 -0
- package/lib/module/ui/hooks/usePasswordSignIn.js.map +1 -0
- package/lib/module/ui/hooks/useProfileEditing.js +2 -5
- package/lib/module/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +1 -0
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +91 -66
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileScreen.js +182 -0
- package/lib/module/ui/screens/EditProfileScreen.js.map +1 -0
- package/lib/module/ui/screens/ManageAccountScreen.js +3 -7
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/OxyAuthScreen.js +233 -97
- package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +15 -2
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/linkFormat.js +31 -0
- package/lib/module/ui/screens/linkFormat.js.map +1 -0
- package/lib/module/ui/session/authStore.js +143 -0
- package/lib/module/ui/session/authStore.js.map +1 -0
- package/lib/module/ui/session/createSessionClient.js +25 -10
- package/lib/module/ui/session/createSessionClient.js.map +1 -1
- package/lib/module/ui/session/index.js +9 -9
- package/lib/module/ui/session/index.js.map +1 -1
- package/lib/module/ui/session/tokenTransport.js +20 -33
- package/lib/module/ui/session/tokenTransport.js.map +1 -1
- package/lib/module/ui/utils/isWebBrowser.js +11 -0
- package/lib/module/ui/utils/isWebBrowser.js.map +1 -0
- package/lib/module/utils/deviceFlowSignIn.js +14 -17
- package/lib/module/utils/deviceFlowSignIn.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +0 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SignInAccountChooser.d.ts +29 -0
- package/lib/typescript/commonjs/ui/components/SignInAccountChooser.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts +15 -10
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +36 -42
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts +18 -23
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +0 -2
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/usePasswordSignIn.d.ts +31 -0
- package/lib/typescript/commonjs/ui/hooks/usePasswordSignIn.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useProfileEditing.d.ts +0 -1
- package/lib/typescript/commonjs/ui/hooks/useProfileEditing.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts +14 -0
- package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts +13 -12
- package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/linkFormat.d.ts +23 -0
- package/lib/typescript/commonjs/ui/screens/linkFormat.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/session/authStore.d.ts +33 -0
- package/lib/typescript/commonjs/ui/session/authStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts +20 -9
- package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/index.d.ts +9 -9
- package/lib/typescript/commonjs/ui/session/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts +13 -19
- package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/isWebBrowser.d.ts +9 -0
- package/lib/typescript/commonjs/ui/utils/isWebBrowser.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/deviceFlowSignIn.d.ts +15 -13
- package/lib/typescript/commonjs/utils/deviceFlowSignIn.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +0 -1
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SignInAccountChooser.d.ts +29 -0
- package/lib/typescript/module/ui/components/SignInAccountChooser.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/SignInModal.d.ts +15 -10
- package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts +36 -42
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +18 -23
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +0 -2
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/usePasswordSignIn.d.ts +31 -0
- package/lib/typescript/module/ui/hooks/usePasswordSignIn.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useProfileEditing.d.ts +0 -1
- package/lib/typescript/module/ui/hooks/useProfileEditing.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts +14 -0
- package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts +13 -12
- package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/linkFormat.d.ts +23 -0
- package/lib/typescript/module/ui/screens/linkFormat.d.ts.map +1 -0
- package/lib/typescript/module/ui/session/authStore.d.ts +33 -0
- package/lib/typescript/module/ui/session/authStore.d.ts.map +1 -0
- package/lib/typescript/module/ui/session/createSessionClient.d.ts +20 -9
- package/lib/typescript/module/ui/session/createSessionClient.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/index.d.ts +9 -9
- package/lib/typescript/module/ui/session/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/tokenTransport.d.ts +13 -19
- package/lib/typescript/module/ui/session/tokenTransport.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/isWebBrowser.d.ts +9 -0
- package/lib/typescript/module/ui/utils/isWebBrowser.d.ts.map +1 -0
- package/lib/typescript/module/utils/deviceFlowSignIn.d.ts +15 -13
- package/lib/typescript/module/utils/deviceFlowSignIn.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +0 -4
- package/src/ui/components/SignInAccountChooser.tsx +162 -0
- package/src/ui/components/SignInModal.tsx +309 -139
- package/src/ui/context/OxyContext.tsx +532 -1785
- package/src/ui/context/hooks/useAuthOperations.ts +65 -76
- package/src/ui/hooks/useAuth.ts +14 -35
- package/src/ui/hooks/usePasswordSignIn.ts +207 -0
- package/src/ui/hooks/useProfileEditing.ts +2 -8
- package/src/ui/hooks/useSessionManagement.ts +1 -1
- package/src/ui/navigation/routes.ts +2 -0
- package/src/ui/screens/EditProfileFieldScreen.tsx +102 -66
- package/src/ui/screens/EditProfileScreen.tsx +155 -0
- package/src/ui/screens/ManageAccountScreen.tsx +3 -7
- package/src/ui/screens/OxyAuthScreen.tsx +259 -112
- package/src/ui/screens/ProfileScreen.tsx +15 -2
- package/src/ui/screens/__tests__/linkFormat.test.ts +73 -0
- package/src/ui/screens/linkFormat.ts +37 -0
- package/src/ui/session/__tests__/createSessionClient.test.ts +49 -6
- package/src/ui/session/__tests__/tokenTransport.test.ts +37 -49
- package/src/ui/session/authStore.ts +164 -0
- package/src/ui/session/createSessionClient.ts +32 -11
- package/src/ui/session/index.ts +10 -9
- package/src/ui/session/tokenTransport.ts +26 -36
- package/src/ui/utils/isWebBrowser.ts +8 -0
- package/src/utils/__tests__/deviceFlowSignIn.test.ts +50 -131
- package/src/utils/deviceFlowSignIn.ts +19 -26
- package/lib/commonjs/ui/context/inSessionTokenRefresh.js +0 -243
- package/lib/commonjs/ui/context/inSessionTokenRefresh.js.map +0 -1
- package/lib/commonjs/ui/context/silentSessionRestore.js +0 -56
- package/lib/commonjs/ui/context/silentSessionRestore.js.map +0 -1
- package/lib/commonjs/ui/hooks/useWebSSO.js +0 -28
- package/lib/commonjs/ui/hooks/useWebSSO.js.map +0 -1
- package/lib/commonjs/ui/session/projectSessionState.js +0 -86
- package/lib/commonjs/ui/session/projectSessionState.js.map +0 -1
- package/lib/commonjs/ui/session/sessionClientHost.js +0 -30
- package/lib/commonjs/ui/session/sessionClientHost.js.map +0 -1
- package/lib/commonjs/ui/utils/activeAuthuser.js +0 -142
- package/lib/commonjs/ui/utils/activeAuthuser.js.map +0 -1
- package/lib/commonjs/utils/crossApex.js +0 -74
- package/lib/commonjs/utils/crossApex.js.map +0 -1
- package/lib/module/ui/context/inSessionTokenRefresh.js +0 -238
- package/lib/module/ui/context/inSessionTokenRefresh.js.map +0 -1
- package/lib/module/ui/context/silentSessionRestore.js +0 -53
- package/lib/module/ui/context/silentSessionRestore.js.map +0 -1
- package/lib/module/ui/hooks/useWebSSO.js +0 -24
- package/lib/module/ui/hooks/useWebSSO.js.map +0 -1
- package/lib/module/ui/session/projectSessionState.js +0 -79
- package/lib/module/ui/session/projectSessionState.js.map +0 -1
- package/lib/module/ui/session/sessionClientHost.js +0 -26
- package/lib/module/ui/session/sessionClientHost.js.map +0 -1
- package/lib/module/ui/utils/activeAuthuser.js +0 -134
- package/lib/module/ui/utils/activeAuthuser.js.map +0 -1
- package/lib/module/utils/crossApex.js +0 -69
- package/lib/module/utils/crossApex.js.map +0 -1
- package/lib/typescript/commonjs/ui/context/inSessionTokenRefresh.d.ts +0 -106
- package/lib/typescript/commonjs/ui/context/inSessionTokenRefresh.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/context/silentSessionRestore.d.ts +0 -36
- package/lib/typescript/commonjs/ui/context/silentSessionRestore.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/hooks/useWebSSO.d.ts +0 -19
- package/lib/typescript/commonjs/ui/hooks/useWebSSO.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/session/projectSessionState.d.ts +0 -45
- package/lib/typescript/commonjs/ui/session/projectSessionState.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/session/sessionClientHost.d.ts +0 -14
- package/lib/typescript/commonjs/ui/session/sessionClientHost.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts +0 -67
- package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/crossApex.d.ts +0 -55
- package/lib/typescript/commonjs/utils/crossApex.d.ts.map +0 -1
- package/lib/typescript/module/ui/context/inSessionTokenRefresh.d.ts +0 -106
- package/lib/typescript/module/ui/context/inSessionTokenRefresh.d.ts.map +0 -1
- package/lib/typescript/module/ui/context/silentSessionRestore.d.ts +0 -36
- package/lib/typescript/module/ui/context/silentSessionRestore.d.ts.map +0 -1
- package/lib/typescript/module/ui/hooks/useWebSSO.d.ts +0 -19
- package/lib/typescript/module/ui/hooks/useWebSSO.d.ts.map +0 -1
- package/lib/typescript/module/ui/session/projectSessionState.d.ts +0 -45
- package/lib/typescript/module/ui/session/projectSessionState.d.ts.map +0 -1
- package/lib/typescript/module/ui/session/sessionClientHost.d.ts +0 -14
- package/lib/typescript/module/ui/session/sessionClientHost.d.ts.map +0 -1
- package/lib/typescript/module/ui/utils/activeAuthuser.d.ts +0 -67
- package/lib/typescript/module/ui/utils/activeAuthuser.d.ts.map +0 -1
- package/lib/typescript/module/utils/crossApex.d.ts +0 -55
- package/lib/typescript/module/utils/crossApex.d.ts.map +0 -1
- package/src/ui/context/inSessionTokenRefresh.ts +0 -264
- package/src/ui/context/silentSessionRestore.ts +0 -53
- package/src/ui/hooks/useWebSSO.ts +0 -23
- package/src/ui/session/__tests__/projectSessionState.test.ts +0 -114
- package/src/ui/session/__tests__/sessionClientHost.test.ts +0 -43
- package/src/ui/session/projectSessionState.ts +0 -85
- package/src/ui/session/sessionClientHost.ts +0 -27
- package/src/ui/utils/activeAuthuser.ts +0 -142
- package/src/utils/crossApex.ts +0 -75
|
@@ -1,33 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* SignInModal
|
|
4
|
+
* SignInModal — web-first centered sign-in modal.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* Two phases, Google-style:
|
|
7
|
+
* 1. Account chooser (FRONT screen, shown when the device/user already has
|
|
8
|
+
* accounts): pick an account to continue as — one tap switches through the
|
|
9
|
+
* SAME `switchToAccount` path the account switcher uses — or "Use another
|
|
10
|
+
* account" to reveal the sign-in options.
|
|
11
|
+
* 2. Sign-in options: the first-party password flow (identifier → password →
|
|
12
|
+
* optional 2FA, `usePasswordSignIn`) as the PRIMARY action, with the
|
|
13
|
+
* cross-app device flow (same-device deep-link + "sign in on another device"
|
|
14
|
+
* QR) as a SECONDARY option below an "or" divider.
|
|
9
15
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* Animates with a fade + scale effect.
|
|
16
|
+
* When there are no accounts the modal opens straight on the sign-in options.
|
|
17
|
+
* The device-flow machinery lives in the shared `useOxyAuthSession` hook (the
|
|
18
|
+
* native `OxyAuthScreen` consumes it too — neither container re-implements the
|
|
19
|
+
* transport). Animates with a fade + scale; per-phase content cross-fades and
|
|
20
|
+
* respects reduced motion.
|
|
16
21
|
*/
|
|
17
22
|
|
|
18
23
|
import { useState, useEffect, useCallback } from 'react';
|
|
19
|
-
import { View, Text, TouchableOpacity, StyleSheet, Modal } from 'react-native';
|
|
20
|
-
import Animated, { useSharedValue, useAnimatedStyle, withTiming } from 'react-native-reanimated';
|
|
24
|
+
import { View, Text, TextInput, TouchableOpacity, StyleSheet, Modal, Linking, AccessibilityInfo } from 'react-native';
|
|
25
|
+
import Animated, { useSharedValue, useAnimatedStyle, withTiming, FadeIn } from 'react-native-reanimated';
|
|
21
26
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
22
27
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
23
28
|
import { Button } from '@oxyhq/bloom/button';
|
|
24
29
|
import { Loading } from '@oxyhq/bloom/loading';
|
|
25
|
-
import {
|
|
30
|
+
import { toast } from '@oxyhq/bloom';
|
|
31
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
32
|
+
import { isDev, logger as loggerUtil } from '@oxyhq/core';
|
|
26
33
|
import { useOxy } from "../context/OxyContext.js";
|
|
27
34
|
import OxyLogo from "./OxyLogo.js";
|
|
28
35
|
import AnotherDeviceQR from "./AnotherDeviceQR.js";
|
|
36
|
+
import SignInAccountChooser from "./SignInAccountChooser.js";
|
|
37
|
+
import { useSwitchableAccounts } from "../hooks/useSwitchableAccounts.js";
|
|
38
|
+
import { useI18n } from "../hooks/useI18n.js";
|
|
29
39
|
import { useOxyAuthSession, OXY_ACCOUNTS_WEB_URL } from "../hooks/useOxyAuthSession.js";
|
|
30
|
-
import {
|
|
40
|
+
import { usePasswordSignIn } from "../hooks/usePasswordSignIn.js";
|
|
31
41
|
|
|
32
42
|
// Store for modal visibility with subscription support
|
|
33
43
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -55,11 +65,6 @@ const SignInModal = () => {
|
|
|
55
65
|
const [visible, setVisible] = useState(false);
|
|
56
66
|
const insets = useSafeAreaInsets();
|
|
57
67
|
const theme = useTheme();
|
|
58
|
-
const {
|
|
59
|
-
oxyServices,
|
|
60
|
-
handleWebSession,
|
|
61
|
-
clientId
|
|
62
|
-
} = useOxy();
|
|
63
68
|
|
|
64
69
|
// Register the imperative visibility callback.
|
|
65
70
|
useEffect(() => {
|
|
@@ -70,56 +75,71 @@ const SignInModal = () => {
|
|
|
70
75
|
}, []);
|
|
71
76
|
if (!visible) return null;
|
|
72
77
|
|
|
73
|
-
//
|
|
74
|
-
//
|
|
75
|
-
// cleaned up on close) — the inner component is unmounted when `visible`
|
|
76
|
-
// flips false, which runs the hook's unmount cleanup.
|
|
78
|
+
// Mounting the content only while visible preserves the session-created-on-open
|
|
79
|
+
// / cleaned-up-on-close behaviour and resets the phase state on every reopen.
|
|
77
80
|
return /*#__PURE__*/_jsx(SignInModalContent, {
|
|
78
81
|
theme: theme,
|
|
79
|
-
insets: insets
|
|
80
|
-
oxyServices: oxyServices,
|
|
81
|
-
handleWebSession: handleWebSession,
|
|
82
|
-
clientId: clientId
|
|
82
|
+
insets: insets
|
|
83
83
|
});
|
|
84
84
|
};
|
|
85
85
|
const SignInModalContent = ({
|
|
86
86
|
theme,
|
|
87
|
-
insets
|
|
88
|
-
oxyServices,
|
|
89
|
-
handleWebSession,
|
|
90
|
-
clientId
|
|
87
|
+
insets
|
|
91
88
|
}) => {
|
|
89
|
+
const {
|
|
90
|
+
oxyServices,
|
|
91
|
+
handleWebSession,
|
|
92
|
+
clientId,
|
|
93
|
+
switchToAccount
|
|
94
|
+
} = useOxy();
|
|
95
|
+
const {
|
|
96
|
+
t
|
|
97
|
+
} = useI18n();
|
|
98
|
+
const {
|
|
99
|
+
accounts
|
|
100
|
+
} = useSwitchableAccounts();
|
|
101
|
+
|
|
102
|
+
// Phase: the chooser is the front screen whenever accounts exist AND the user
|
|
103
|
+
// has not tapped "Use another account" this session.
|
|
104
|
+
const [useAnother, setUseAnother] = useState(false);
|
|
105
|
+
const [switchingId, setSwitchingId] = useState(null);
|
|
106
|
+
const showChooser = !useAnother && accounts.length > 0;
|
|
92
107
|
const {
|
|
93
108
|
qrData,
|
|
94
109
|
qrPayload,
|
|
95
110
|
isLoading,
|
|
96
111
|
error,
|
|
97
112
|
isWaiting,
|
|
98
|
-
openAuthApproval,
|
|
99
113
|
openSameDeviceApproval,
|
|
100
114
|
retry
|
|
101
115
|
} = useOxyAuthSession(oxyServices, clientId, handleWebSession, {
|
|
102
116
|
onSignedIn: hideSignInModal
|
|
103
117
|
});
|
|
104
118
|
|
|
105
|
-
//
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
const crossApexWeb = isCrossApexWeb();
|
|
119
|
+
// First-party password sign-in — the PRIMARY option once past the chooser.
|
|
120
|
+
const pw = usePasswordSignIn({
|
|
121
|
+
onSignedIn: hideSignInModal
|
|
122
|
+
});
|
|
110
123
|
|
|
111
|
-
// Entrance animation.
|
|
124
|
+
// Entrance animation (respects reduced motion).
|
|
112
125
|
const opacity = useSharedValue(0);
|
|
113
126
|
const scale = useSharedValue(0.96);
|
|
114
|
-
|
|
115
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: opacity/scale are Reanimated SharedValues (stable refs) and must not be listed as deps; this runs once on mount to play the entrance.
|
|
127
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: opacity/scale are Reanimated SharedValues (stable refs), not deps; runs once on mount.
|
|
116
128
|
useEffect(() => {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
129
|
+
let cancelled = false;
|
|
130
|
+
AccessibilityInfo.isReduceMotionEnabled().then(reduced => {
|
|
131
|
+
if (cancelled) return;
|
|
132
|
+
const duration = reduced ? 0 : 250;
|
|
133
|
+
opacity.value = withTiming(1, {
|
|
134
|
+
duration
|
|
135
|
+
});
|
|
136
|
+
scale.value = withTiming(1, {
|
|
137
|
+
duration
|
|
138
|
+
});
|
|
122
139
|
});
|
|
140
|
+
return () => {
|
|
141
|
+
cancelled = true;
|
|
142
|
+
};
|
|
123
143
|
}, []);
|
|
124
144
|
const backdropStyle = useAnimatedStyle(() => ({
|
|
125
145
|
opacity: opacity.value
|
|
@@ -130,12 +150,32 @@ const SignInModalContent = ({
|
|
|
130
150
|
scale: scale.value
|
|
131
151
|
}]
|
|
132
152
|
}));
|
|
133
|
-
const handleClose = useCallback(() =>
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
153
|
+
const handleClose = useCallback(() => hideSignInModal(), []);
|
|
154
|
+
const handleCreateAccount = useCallback(() => Linking.openURL(OXY_ACCOUNTS_WEB_URL), []);
|
|
155
|
+
const handleSelectAccount = useCallback(async account => {
|
|
156
|
+
// The active account is already signed in — selecting it just continues.
|
|
157
|
+
if (account.isCurrent) {
|
|
158
|
+
hideSignInModal();
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
if (switchingId) return;
|
|
162
|
+
setSwitchingId(account.accountId);
|
|
163
|
+
try {
|
|
164
|
+
await switchToAccount(account.accountId);
|
|
165
|
+
hideSignInModal();
|
|
166
|
+
} catch (switchError) {
|
|
167
|
+
if (isDev()) {
|
|
168
|
+
loggerUtil.warn('SignInModal: switch account failed', {
|
|
169
|
+
component: 'SignInModal'
|
|
170
|
+
}, switchError);
|
|
171
|
+
}
|
|
172
|
+
toast.error(t('accountSwitcher.toasts.switchFailed') || 'Failed to switch account');
|
|
173
|
+
} finally {
|
|
174
|
+
setSwitchingId(null);
|
|
175
|
+
}
|
|
176
|
+
}, [switchingId, switchToAccount, t]);
|
|
177
|
+
const title = showChooser ? t('signin.chooser.title') : 'Sign in to Oxy';
|
|
178
|
+
const subtitle = showChooser ? t('signin.chooser.subtitle') : 'Continue with your Oxy identity to sign in securely.';
|
|
139
179
|
return /*#__PURE__*/_jsx(Modal, {
|
|
140
180
|
visible: true,
|
|
141
181
|
transparent: true,
|
|
@@ -153,7 +193,7 @@ const SignInModalContent = ({
|
|
|
153
193
|
}), /*#__PURE__*/_jsxs(Animated.View, {
|
|
154
194
|
style: [styles.card, {
|
|
155
195
|
backgroundColor: theme.colors.card,
|
|
156
|
-
paddingTop: insets.top +
|
|
196
|
+
paddingTop: insets.top + 28,
|
|
157
197
|
paddingBottom: insets.bottom + 24
|
|
158
198
|
}, contentStyle],
|
|
159
199
|
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
@@ -163,72 +203,159 @@ const SignInModalContent = ({
|
|
|
163
203
|
onPress: handleClose,
|
|
164
204
|
accessibilityRole: "button",
|
|
165
205
|
accessibilityLabel: "Close sign in",
|
|
166
|
-
children: /*#__PURE__*/_jsx(
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
children: "\xD7"
|
|
206
|
+
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
207
|
+
name: "close",
|
|
208
|
+
size: 22,
|
|
209
|
+
color: theme.colors.textSecondary
|
|
171
210
|
})
|
|
172
211
|
}), /*#__PURE__*/_jsxs(View, {
|
|
173
212
|
style: styles.header,
|
|
174
213
|
children: [/*#__PURE__*/_jsx(OxyLogo, {
|
|
175
214
|
variant: "icon",
|
|
176
|
-
size:
|
|
215
|
+
size: 52
|
|
177
216
|
}), /*#__PURE__*/_jsx(Text, {
|
|
178
217
|
className: "text-foreground",
|
|
179
218
|
style: styles.title,
|
|
180
|
-
children:
|
|
219
|
+
children: title
|
|
181
220
|
}), /*#__PURE__*/_jsx(Text, {
|
|
182
221
|
className: "text-muted-foreground",
|
|
183
222
|
style: styles.subtitle,
|
|
184
|
-
children:
|
|
223
|
+
children: subtitle
|
|
185
224
|
})]
|
|
186
|
-
}),
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
225
|
+
}), showChooser ? /*#__PURE__*/_jsx(Animated.View, {
|
|
226
|
+
entering: FadeIn.duration(180),
|
|
227
|
+
style: styles.phase,
|
|
228
|
+
children: /*#__PURE__*/_jsx(SignInAccountChooser, {
|
|
229
|
+
accounts: accounts,
|
|
230
|
+
onSelectAccount: handleSelectAccount,
|
|
231
|
+
onUseAnother: () => setUseAnother(true),
|
|
232
|
+
pendingAccountId: switchingId,
|
|
233
|
+
disabled: switchingId !== null
|
|
234
|
+
})
|
|
235
|
+
}, "chooser") : /*#__PURE__*/_jsxs(Animated.View, {
|
|
236
|
+
entering: FadeIn.duration(180),
|
|
237
|
+
style: styles.phase,
|
|
238
|
+
children: [accounts.length > 0 && /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
239
|
+
onPress: () => setUseAnother(false),
|
|
240
|
+
accessibilityRole: "button",
|
|
241
|
+
style: styles.backRow,
|
|
242
|
+
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
243
|
+
name: "chevron-back",
|
|
244
|
+
size: 18,
|
|
245
|
+
color: theme.colors.textSecondary
|
|
246
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
247
|
+
style: [styles.backText, {
|
|
248
|
+
color: theme.colors.textSecondary
|
|
249
|
+
}],
|
|
250
|
+
children: t('signin.chooser.title')
|
|
251
|
+
})]
|
|
252
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
253
|
+
style: styles.form,
|
|
254
|
+
children: [pw.step === 'identifier' && /*#__PURE__*/_jsx(TextInput, {
|
|
255
|
+
style: [styles.input, {
|
|
256
|
+
borderColor: theme.colors.border,
|
|
257
|
+
color: theme.colors.text,
|
|
258
|
+
backgroundColor: theme.colors.backgroundSecondary
|
|
259
|
+
}],
|
|
260
|
+
value: pw.identifier,
|
|
261
|
+
onChangeText: pw.setIdentifier,
|
|
262
|
+
onSubmitEditing: pw.submitIdentifier,
|
|
263
|
+
placeholder: "Username or email",
|
|
264
|
+
placeholderTextColor: theme.colors.textSecondary,
|
|
265
|
+
autoCapitalize: "none",
|
|
266
|
+
autoCorrect: false,
|
|
267
|
+
keyboardType: "email-address",
|
|
268
|
+
returnKeyType: "next",
|
|
269
|
+
accessibilityLabel: "Username or email"
|
|
270
|
+
}), pw.step === 'password' && /*#__PURE__*/_jsxs(_Fragment, {
|
|
271
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
272
|
+
style: [styles.contextText, {
|
|
273
|
+
color: theme.colors.textSecondary
|
|
274
|
+
}],
|
|
275
|
+
children: pw.identifier
|
|
276
|
+
}), /*#__PURE__*/_jsx(TextInput, {
|
|
277
|
+
style: [styles.input, {
|
|
278
|
+
borderColor: theme.colors.border,
|
|
279
|
+
color: theme.colors.text,
|
|
280
|
+
backgroundColor: theme.colors.backgroundSecondary
|
|
281
|
+
}],
|
|
282
|
+
value: pw.password,
|
|
283
|
+
onChangeText: pw.setPassword,
|
|
284
|
+
onSubmitEditing: pw.submitPassword,
|
|
285
|
+
placeholder: "Password",
|
|
286
|
+
placeholderTextColor: theme.colors.textSecondary,
|
|
287
|
+
secureTextEntry: true,
|
|
288
|
+
autoCapitalize: "none",
|
|
289
|
+
autoCorrect: false,
|
|
290
|
+
returnKeyType: "go",
|
|
291
|
+
accessibilityLabel: "Password"
|
|
292
|
+
})]
|
|
293
|
+
}), pw.step === 'twoFactor' && /*#__PURE__*/_jsx(TextInput, {
|
|
294
|
+
style: [styles.input, {
|
|
295
|
+
borderColor: theme.colors.border,
|
|
296
|
+
color: theme.colors.text,
|
|
297
|
+
backgroundColor: theme.colors.backgroundSecondary
|
|
298
|
+
}],
|
|
299
|
+
value: pw.code,
|
|
300
|
+
onChangeText: pw.setCode,
|
|
301
|
+
onSubmitEditing: pw.submitTwoFactor,
|
|
302
|
+
placeholder: pw.useBackupCode ? 'Backup code' : '6-digit code',
|
|
303
|
+
placeholderTextColor: theme.colors.textSecondary,
|
|
304
|
+
autoCapitalize: "none",
|
|
305
|
+
autoCorrect: false,
|
|
306
|
+
keyboardType: pw.useBackupCode ? 'default' : 'number-pad',
|
|
307
|
+
returnKeyType: "go",
|
|
308
|
+
accessibilityLabel: pw.useBackupCode ? 'Backup code' : 'Two-factor code'
|
|
309
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
310
|
+
variant: "primary",
|
|
311
|
+
onPress: pw.step === 'identifier' ? pw.submitIdentifier : pw.step === 'password' ? pw.submitPassword : pw.submitTwoFactor,
|
|
312
|
+
loading: pw.isSubmitting,
|
|
313
|
+
disabled: pw.isSubmitting,
|
|
314
|
+
style: styles.primaryButton,
|
|
315
|
+
children: pw.step === 'identifier' ? 'Continue' : pw.step === 'password' ? 'Sign in' : 'Verify'
|
|
316
|
+
}), pw.error && /*#__PURE__*/_jsx(Text, {
|
|
317
|
+
className: "text-destructive",
|
|
318
|
+
style: styles.formError,
|
|
319
|
+
children: pw.error
|
|
320
|
+
}), pw.step === 'twoFactor' && /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
321
|
+
onPress: () => pw.setUseBackupCode(!pw.useBackupCode),
|
|
322
|
+
accessibilityRole: "button",
|
|
323
|
+
style: styles.linkButton,
|
|
324
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
325
|
+
style: [styles.linkText, {
|
|
326
|
+
color: theme.colors.primary
|
|
327
|
+
}],
|
|
328
|
+
children: pw.useBackupCode ? 'Use authenticator code' : 'Use a backup code'
|
|
329
|
+
})
|
|
330
|
+
}), pw.step !== 'identifier' && /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
331
|
+
onPress: pw.back,
|
|
332
|
+
accessibilityRole: "button",
|
|
333
|
+
style: styles.linkButton,
|
|
334
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
335
|
+
style: [styles.linkText, {
|
|
336
|
+
color: theme.colors.textSecondary
|
|
337
|
+
}],
|
|
338
|
+
children: "Back"
|
|
339
|
+
})
|
|
340
|
+
})]
|
|
341
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
342
|
+
style: styles.dividerRow,
|
|
343
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
344
|
+
style: [styles.dividerLine, {
|
|
345
|
+
backgroundColor: theme.colors.border
|
|
346
|
+
}]
|
|
347
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
348
|
+
style: [styles.dividerText, {
|
|
349
|
+
color: theme.colors.textSecondary
|
|
350
|
+
}],
|
|
351
|
+
children: "or"
|
|
352
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
353
|
+
style: [styles.dividerLine, {
|
|
354
|
+
backgroundColor: theme.colors.border
|
|
355
|
+
}]
|
|
356
|
+
})]
|
|
357
|
+
}), isLoading ? /*#__PURE__*/_jsxs(View, {
|
|
358
|
+
style: styles.deviceLoading,
|
|
232
359
|
children: [/*#__PURE__*/_jsx(Loading, {
|
|
233
360
|
size: "small",
|
|
234
361
|
style: styles.statusSpinner
|
|
@@ -236,16 +363,52 @@ const SignInModalContent = ({
|
|
|
236
363
|
style: [styles.statusText, {
|
|
237
364
|
color: theme.colors.textSecondary
|
|
238
365
|
}],
|
|
239
|
-
children: "
|
|
366
|
+
children: "Preparing sign in\u2026"
|
|
367
|
+
})]
|
|
368
|
+
}) : error ? /*#__PURE__*/_jsxs(View, {
|
|
369
|
+
style: styles.errorContainer,
|
|
370
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
371
|
+
className: "text-destructive",
|
|
372
|
+
style: styles.errorText,
|
|
373
|
+
children: error
|
|
374
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
375
|
+
variant: "secondary",
|
|
376
|
+
onPress: retry,
|
|
377
|
+
style: styles.secondaryButton,
|
|
378
|
+
children: "Try Again"
|
|
379
|
+
})]
|
|
380
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
381
|
+
children: [qrPayload && /*#__PURE__*/_jsx(Button, {
|
|
382
|
+
variant: "secondary",
|
|
383
|
+
onPress: openSameDeviceApproval,
|
|
384
|
+
icon: /*#__PURE__*/_jsx(OxyLogo, {
|
|
385
|
+
variant: "icon",
|
|
386
|
+
size: 20,
|
|
387
|
+
fillColor: theme.colors.text,
|
|
388
|
+
style: styles.buttonIcon
|
|
389
|
+
}),
|
|
390
|
+
style: styles.secondaryButton,
|
|
391
|
+
children: "Sign in with the Oxy app"
|
|
392
|
+
}), isWaiting && /*#__PURE__*/_jsxs(View, {
|
|
393
|
+
style: styles.statusContainer,
|
|
394
|
+
children: [/*#__PURE__*/_jsx(Loading, {
|
|
395
|
+
size: "small",
|
|
396
|
+
style: styles.statusSpinner
|
|
397
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
398
|
+
style: [styles.statusText, {
|
|
399
|
+
color: theme.colors.textSecondary
|
|
400
|
+
}],
|
|
401
|
+
children: "Waiting for authorization\u2026"
|
|
402
|
+
})]
|
|
403
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
404
|
+
style: styles.qrSection,
|
|
405
|
+
children: /*#__PURE__*/_jsx(AnotherDeviceQR, {
|
|
406
|
+
qrData: qrData,
|
|
407
|
+
qrPayload: qrPayload
|
|
408
|
+
})
|
|
240
409
|
})]
|
|
241
|
-
}), !crossApexWeb && /*#__PURE__*/_jsx(View, {
|
|
242
|
-
style: styles.qrSection,
|
|
243
|
-
children: /*#__PURE__*/_jsx(AnotherDeviceQR, {
|
|
244
|
-
qrData: qrData,
|
|
245
|
-
qrPayload: qrPayload
|
|
246
|
-
})
|
|
247
410
|
})]
|
|
248
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
411
|
+
}, "signIn"), /*#__PURE__*/_jsxs(View, {
|
|
249
412
|
style: styles.footer,
|
|
250
413
|
children: [/*#__PURE__*/_jsxs(Text, {
|
|
251
414
|
style: styles.footerText,
|
|
@@ -273,42 +436,54 @@ const styles = StyleSheet.create({
|
|
|
273
436
|
},
|
|
274
437
|
card: {
|
|
275
438
|
width: '100%',
|
|
276
|
-
maxWidth:
|
|
439
|
+
maxWidth: 420,
|
|
277
440
|
alignItems: 'center',
|
|
278
441
|
paddingHorizontal: 24,
|
|
279
|
-
borderRadius:
|
|
442
|
+
borderRadius: 28
|
|
280
443
|
},
|
|
281
444
|
closeButton: {
|
|
282
445
|
position: 'absolute',
|
|
283
446
|
top: 16,
|
|
284
447
|
right: 16,
|
|
285
|
-
width:
|
|
286
|
-
height:
|
|
287
|
-
borderRadius:
|
|
448
|
+
width: 36,
|
|
449
|
+
height: 36,
|
|
450
|
+
borderRadius: 18,
|
|
288
451
|
justifyContent: 'center',
|
|
289
452
|
alignItems: 'center',
|
|
290
453
|
zIndex: 10
|
|
291
454
|
},
|
|
292
|
-
closeButtonText: {
|
|
293
|
-
fontSize: 28,
|
|
294
|
-
fontWeight: '300',
|
|
295
|
-
lineHeight: 32
|
|
296
|
-
},
|
|
297
455
|
header: {
|
|
298
456
|
alignItems: 'center',
|
|
299
|
-
marginBottom:
|
|
457
|
+
marginBottom: 24
|
|
300
458
|
},
|
|
301
459
|
title: {
|
|
302
460
|
fontSize: 26,
|
|
303
|
-
fontWeight: '
|
|
461
|
+
fontWeight: '800',
|
|
462
|
+
letterSpacing: -0.5,
|
|
304
463
|
marginTop: 16,
|
|
305
464
|
textAlign: 'center'
|
|
306
465
|
},
|
|
307
466
|
subtitle: {
|
|
308
467
|
fontSize: 15,
|
|
468
|
+
lineHeight: 21,
|
|
309
469
|
marginTop: 8,
|
|
310
470
|
textAlign: 'center'
|
|
311
471
|
},
|
|
472
|
+
phase: {
|
|
473
|
+
width: '100%'
|
|
474
|
+
},
|
|
475
|
+
backRow: {
|
|
476
|
+
flexDirection: 'row',
|
|
477
|
+
alignItems: 'center',
|
|
478
|
+
gap: 4,
|
|
479
|
+
alignSelf: 'flex-start',
|
|
480
|
+
paddingVertical: 6,
|
|
481
|
+
marginBottom: 8
|
|
482
|
+
},
|
|
483
|
+
backText: {
|
|
484
|
+
fontSize: 14,
|
|
485
|
+
fontWeight: '600'
|
|
486
|
+
},
|
|
312
487
|
primaryButton: {
|
|
313
488
|
width: '100%',
|
|
314
489
|
borderRadius: 12
|
|
@@ -321,6 +496,57 @@ const styles = StyleSheet.create({
|
|
|
321
496
|
buttonIcon: {
|
|
322
497
|
marginRight: 10
|
|
323
498
|
},
|
|
499
|
+
form: {
|
|
500
|
+
width: '100%'
|
|
501
|
+
},
|
|
502
|
+
input: {
|
|
503
|
+
width: '100%',
|
|
504
|
+
borderWidth: 1,
|
|
505
|
+
borderRadius: 12,
|
|
506
|
+
paddingHorizontal: 16,
|
|
507
|
+
paddingVertical: 13,
|
|
508
|
+
fontSize: 15,
|
|
509
|
+
marginBottom: 12
|
|
510
|
+
},
|
|
511
|
+
contextText: {
|
|
512
|
+
fontSize: 14,
|
|
513
|
+
textAlign: 'center',
|
|
514
|
+
marginBottom: 12
|
|
515
|
+
},
|
|
516
|
+
formError: {
|
|
517
|
+
fontSize: 14,
|
|
518
|
+
textAlign: 'center',
|
|
519
|
+
marginTop: 12
|
|
520
|
+
},
|
|
521
|
+
linkButton: {
|
|
522
|
+
alignSelf: 'center',
|
|
523
|
+
paddingVertical: 8,
|
|
524
|
+
marginTop: 8
|
|
525
|
+
},
|
|
526
|
+
linkText: {
|
|
527
|
+
fontSize: 14,
|
|
528
|
+
fontWeight: '600'
|
|
529
|
+
},
|
|
530
|
+
dividerRow: {
|
|
531
|
+
flexDirection: 'row',
|
|
532
|
+
alignItems: 'center',
|
|
533
|
+
width: '100%',
|
|
534
|
+
marginVertical: 20
|
|
535
|
+
},
|
|
536
|
+
dividerLine: {
|
|
537
|
+
flex: 1,
|
|
538
|
+
height: 1
|
|
539
|
+
},
|
|
540
|
+
dividerText: {
|
|
541
|
+
marginHorizontal: 12,
|
|
542
|
+
fontSize: 13
|
|
543
|
+
},
|
|
544
|
+
deviceLoading: {
|
|
545
|
+
flexDirection: 'row',
|
|
546
|
+
alignItems: 'center',
|
|
547
|
+
justifyContent: 'center',
|
|
548
|
+
paddingVertical: 12
|
|
549
|
+
},
|
|
324
550
|
statusContainer: {
|
|
325
551
|
flexDirection: 'row',
|
|
326
552
|
alignItems: 'center',
|
|
@@ -337,14 +563,6 @@ const styles = StyleSheet.create({
|
|
|
337
563
|
width: '100%',
|
|
338
564
|
marginTop: 24
|
|
339
565
|
},
|
|
340
|
-
loadingContainer: {
|
|
341
|
-
alignItems: 'center',
|
|
342
|
-
paddingVertical: 40
|
|
343
|
-
},
|
|
344
|
-
loadingText: {
|
|
345
|
-
marginTop: 16,
|
|
346
|
-
fontSize: 14
|
|
347
|
-
},
|
|
348
566
|
errorContainer: {
|
|
349
567
|
alignItems: 'center',
|
|
350
568
|
paddingVertical: 20,
|