@oxyhq/services 5.7.5 → 5.8.2
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/README.md +76 -76
- package/lib/commonjs/core/index.js +177 -102
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/index.js +69 -28
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/Avatar.js +15 -6
- package/lib/commonjs/ui/components/Avatar.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +100 -12
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedItem.js +58 -13
- package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedSection.js +7 -1
- package/lib/commonjs/ui/components/GroupedSection.js.map +1 -1
- package/lib/commonjs/ui/components/Header.js +356 -0
- package/lib/commonjs/ui/components/Header.js.map +1 -0
- package/lib/commonjs/ui/components/OxyProvider.js +28 -7
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/index.js +7 -0
- package/lib/commonjs/ui/components/index.js.map +1 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +1 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/commonjs/ui/components/internal/TextField.js +606 -546
- package/lib/commonjs/ui/components/internal/TextField.js.map +1 -1
- package/lib/commonjs/ui/components/internal/TextField.md +436 -0
- package/lib/commonjs/ui/context/OxyContext.js +181 -199
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/index.js +6 -0
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFollow.js +59 -2
- package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionSocket.js +5 -2
- package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/commonjs/ui/navigation/OxyRouter.js +11 -1
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +6 -6
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountManagementDemo.js +3 -3
- package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +241 -598
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +1160 -406
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +135 -237
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +246 -463
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +3 -3
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +808 -650
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +214 -37
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js +51 -72
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +11 -29
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignInScreen.js +30 -303
- package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +4 -4
- package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +90 -0
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +19 -31
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +7 -10
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js +11 -5
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js +11 -4
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +9 -6
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +3 -30
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +37 -46
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +9 -12
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +9 -12
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +9 -12
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/stores/authStore.js +36 -6
- package/lib/commonjs/ui/stores/authStore.js.map +1 -1
- package/lib/commonjs/ui/stores/followStore.js +106 -1
- package/lib/commonjs/ui/stores/followStore.js.map +1 -1
- package/lib/commonjs/ui/styles/authStyles.js +337 -0
- package/lib/commonjs/ui/styles/authStyles.js.map +1 -0
- package/lib/commonjs/ui/styles/index.js +11 -0
- package/lib/commonjs/ui/styles/index.js.map +1 -1
- package/lib/module/core/index.js +177 -41
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/index.js +24 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/Avatar.js +15 -6
- package/lib/module/ui/components/Avatar.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +101 -13
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/GroupedItem.js +59 -14
- package/lib/module/ui/components/GroupedItem.js.map +1 -1
- package/lib/module/ui/components/GroupedSection.js +7 -1
- package/lib/module/ui/components/GroupedSection.js.map +1 -1
- package/lib/module/ui/components/Header.js +351 -0
- package/lib/module/ui/components/Header.js.map +1 -0
- package/lib/module/ui/components/OxyProvider.js +30 -9
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/index.js +1 -0
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/module/ui/components/internal/TextField.js +607 -547
- package/lib/module/ui/components/internal/TextField.js.map +1 -1
- package/lib/module/ui/components/internal/TextField.md +436 -0
- package/lib/module/ui/context/OxyContext.js +180 -198
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/index.js +1 -1
- package/lib/module/ui/hooks/index.js.map +1 -1
- package/lib/module/ui/hooks/useFollow.js +57 -1
- package/lib/module/ui/hooks/useFollow.js.map +1 -1
- package/lib/module/ui/hooks/useSessionSocket.js +5 -2
- package/lib/module/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/module/ui/navigation/OxyRouter.js +11 -1
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +6 -6
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountManagementDemo.js +3 -3
- package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +242 -597
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +1161 -407
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +135 -237
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +248 -465
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +3 -3
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +809 -651
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +214 -37
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/RecoverAccountScreen.js +53 -74
- package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +11 -29
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +32 -305
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/SignUpScreen.js +5 -5
- package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +85 -0
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -0
- package/lib/module/ui/screens/internal/SignInPasswordStep.js +19 -31
- package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -1
- package/lib/module/ui/screens/internal/SignInUsernameStep.js +7 -10
- package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -1
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js +11 -5
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js.map +1 -1
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js +11 -4
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js +9 -6
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +3 -30
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js +37 -46
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +9 -12
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +9 -12
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js +9 -12
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/module/ui/stores/authStore.js +36 -6
- package/lib/module/ui/stores/authStore.js.map +1 -1
- package/lib/module/ui/stores/followStore.js +106 -1
- package/lib/module/ui/stores/followStore.js.map +1 -1
- package/lib/module/ui/styles/authStyles.js +332 -0
- package/lib/module/ui/styles/authStyles.js.map +1 -0
- package/lib/module/ui/styles/index.js +1 -0
- package/lib/module/ui/styles/index.js.map +1 -1
- package/lib/typescript/core/index.d.ts +68 -24
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +13 -3
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/Avatar.d.ts.map +1 -1
- package/lib/typescript/ui/components/FollowButton.d.ts +1 -0
- package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/GroupedItem.d.ts +6 -0
- package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
- package/lib/typescript/ui/components/GroupedSection.d.ts +6 -0
- package/lib/typescript/ui/components/GroupedSection.d.ts.map +1 -1
- package/lib/typescript/ui/components/Header.d.ts +24 -0
- package/lib/typescript/ui/components/Header.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/index.d.ts +1 -0
- package/lib/typescript/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/TextField.d.ts +31 -16
- package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts +5 -2
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/index.d.ts +1 -1
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useFollow.d.ts +20 -0
- package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/types.d.ts +9 -2
- package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +5 -1
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/UserLinksScreen.d.ts +15 -0
- package/lib/typescript/ui/screens/UserLinksScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +1 -1
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +0 -1
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -1
- package/lib/typescript/ui/stores/authStore.d.ts +3 -1
- package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
- package/lib/typescript/ui/stores/followStore.d.ts +10 -0
- package/lib/typescript/ui/stores/followStore.d.ts.map +1 -1
- package/lib/typescript/ui/styles/authStyles.d.ts +326 -0
- package/lib/typescript/ui/styles/authStyles.d.ts.map +1 -0
- package/lib/typescript/ui/styles/index.d.ts +1 -0
- package/lib/typescript/ui/styles/index.d.ts.map +1 -1
- package/package.json +1 -4
- package/src/core/index.ts +195 -41
- package/src/index.ts +64 -4
- package/src/ui/components/Avatar.tsx +11 -5
- package/src/ui/components/FollowButton.tsx +95 -11
- package/src/ui/components/GroupedItem.tsx +57 -9
- package/src/ui/components/GroupedSection.tsx +12 -0
- package/src/ui/components/Header.tsx +405 -0
- package/src/ui/components/OxyProvider.tsx +37 -15
- package/src/ui/components/index.ts +1 -0
- package/src/ui/components/internal/GroupedPillButtons.tsx +1 -1
- package/src/ui/components/internal/TextField.md +436 -0
- package/src/ui/components/internal/TextField.tsx +720 -620
- package/src/ui/context/OxyContext.tsx +211 -195
- package/src/ui/hooks/index.ts +1 -1
- package/src/ui/hooks/useFollow.ts +63 -0
- package/src/ui/hooks/useSessionSocket.ts +5 -2
- package/src/ui/navigation/OxyRouter.tsx +11 -1
- package/src/ui/navigation/types.ts +10 -2
- package/src/ui/screens/AccountCenterScreen.tsx +5 -5
- package/src/ui/screens/AccountManagementDemo.tsx +9 -9
- package/src/ui/screens/AccountOverviewScreen.tsx +265 -414
- package/src/ui/screens/AccountSettingsScreen.tsx +1173 -403
- package/src/ui/screens/AccountSwitcherScreen.tsx +158 -202
- package/src/ui/screens/AppInfoScreen.tsx +270 -497
- package/src/ui/screens/FeedbackScreen.tsx +3 -3
- package/src/ui/screens/PaymentGatewayScreen.tsx +668 -365
- package/src/ui/screens/ProfileScreen.tsx +196 -33
- package/src/ui/screens/RecoverAccountScreen.tsx +46 -74
- package/src/ui/screens/SessionManagementScreen.tsx +14 -22
- package/src/ui/screens/SignInScreen.tsx +27 -294
- package/src/ui/screens/SignUpScreen.tsx +5 -5
- package/src/ui/screens/UserLinksScreen.tsx +96 -0
- package/src/ui/screens/internal/SignInPasswordStep.tsx +11 -22
- package/src/ui/screens/internal/SignInUsernameStep.tsx +3 -10
- package/src/ui/screens/internal/SignUpIdentityStep.tsx +2 -5
- package/src/ui/screens/internal/SignUpSecurityStep.tsx +3 -4
- package/src/ui/screens/karma/KarmaAboutScreen.tsx +9 -2
- package/src/ui/screens/karma/KarmaCenterScreen.tsx +1 -20
- package/src/ui/screens/karma/KarmaFAQScreen.tsx +40 -24
- package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +9 -3
- package/src/ui/screens/karma/KarmaRewardsScreen.tsx +9 -3
- package/src/ui/screens/karma/KarmaRulesScreen.tsx +9 -3
- package/src/ui/stores/authStore.ts +34 -7
- package/src/ui/stores/followStore.ts +102 -1
- package/src/ui/styles/authStyles.ts +352 -0
- package/src/ui/styles/index.ts +1 -0
- package/lib/commonjs/core/auth-manager.js +0 -440
- package/lib/commonjs/core/auth-manager.js.map +0 -1
- package/lib/commonjs/core/use-auth.js +0 -244
- package/lib/commonjs/core/use-auth.js.map +0 -1
- package/lib/module/core/auth-manager.js +0 -432
- package/lib/module/core/auth-manager.js.map +0 -1
- package/lib/module/core/use-auth.js +0 -235
- package/lib/module/core/use-auth.js.map +0 -1
- package/lib/typescript/core/auth-manager.d.ts +0 -136
- package/lib/typescript/core/auth-manager.d.ts.map +0 -1
- package/lib/typescript/core/use-auth.d.ts +0 -79
- package/lib/typescript/core/use-auth.d.ts.map +0 -1
- package/src/__tests__/middleware.test.ts +0 -105
- package/src/__tests__/setup.ts +0 -10
- package/src/__tests__/zero-config-auth.test.ts +0 -607
- package/src/core/auth-manager.ts +0 -500
- package/src/core/use-auth.tsx +0 -245
|
@@ -7,13 +7,12 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _OxyContext = require("../context/OxyContext");
|
|
10
|
-
var _Avatar = _interopRequireDefault(require("../components/Avatar"));
|
|
11
10
|
var _OxyIcon = _interopRequireDefault(require("../components/icon/OxyIcon"));
|
|
12
|
-
var _vectorIcons = require("@expo/vector-icons");
|
|
13
11
|
var _sonner = require("../../lib/sonner");
|
|
14
12
|
var _fonts = require("../styles/fonts");
|
|
15
13
|
var _confirmAction = require("../utils/confirmAction");
|
|
16
14
|
var _authStore = require("../stores/authStore");
|
|
15
|
+
var _components = require("../components");
|
|
17
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
18
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
@@ -57,6 +56,17 @@ const AccountSettingsScreen = ({
|
|
|
57
56
|
const [tempBio, setTempBio] = (0, _react.useState)('');
|
|
58
57
|
const [tempLocation, setTempLocation] = (0, _react.useState)('');
|
|
59
58
|
const [tempLinks, setTempLinks] = (0, _react.useState)([]);
|
|
59
|
+
const [tempLinksWithMetadata, setTempLinksWithMetadata] = (0, _react.useState)([]);
|
|
60
|
+
const [isAddingLink, setIsAddingLink] = (0, _react.useState)(false);
|
|
61
|
+
const [newLinkUrl, setNewLinkUrl] = (0, _react.useState)('');
|
|
62
|
+
const [isFetchingMetadata, setIsFetchingMetadata] = (0, _react.useState)(false);
|
|
63
|
+
|
|
64
|
+
// Location management state
|
|
65
|
+
const [tempLocations, setTempLocations] = (0, _react.useState)([]);
|
|
66
|
+
const [isAddingLocation, setIsAddingLocation] = (0, _react.useState)(false);
|
|
67
|
+
const [newLocationQuery, setNewLocationQuery] = (0, _react.useState)('');
|
|
68
|
+
const [locationSearchResults, setLocationSearchResults] = (0, _react.useState)([]);
|
|
69
|
+
const [isSearchingLocations, setIsSearchingLocations] = (0, _react.useState)(false);
|
|
60
70
|
|
|
61
71
|
// Memoize theme-related calculations to prevent unnecessary recalculations
|
|
62
72
|
const themeStyles = (0, _react.useMemo)(() => {
|
|
@@ -72,7 +82,7 @@ const AccountSettingsScreen = ({
|
|
|
72
82
|
const animateSaveButton = (0, _react.useCallback)(toValue => {
|
|
73
83
|
_reactNative.Animated.spring(saveButtonScale, {
|
|
74
84
|
toValue,
|
|
75
|
-
useNativeDriver:
|
|
85
|
+
useNativeDriver: _reactNative.Platform.OS !== 'web',
|
|
76
86
|
tension: 150,
|
|
77
87
|
friction: 8
|
|
78
88
|
}).start();
|
|
@@ -89,7 +99,59 @@ const AccountSettingsScreen = ({
|
|
|
89
99
|
setEmail(user.email || '');
|
|
90
100
|
setBio(user.bio || '');
|
|
91
101
|
setLocation(user.location || '');
|
|
92
|
-
|
|
102
|
+
|
|
103
|
+
// Handle locations - convert single location to array format
|
|
104
|
+
if (user.locations && Array.isArray(user.locations)) {
|
|
105
|
+
setTempLocations(user.locations.map((loc, index) => ({
|
|
106
|
+
id: loc.id || `existing-${index}`,
|
|
107
|
+
name: loc.name,
|
|
108
|
+
label: loc.label,
|
|
109
|
+
coordinates: loc.coordinates
|
|
110
|
+
})));
|
|
111
|
+
} else if (user.location) {
|
|
112
|
+
// Convert single location string to array format
|
|
113
|
+
setTempLocations([{
|
|
114
|
+
id: 'existing-0',
|
|
115
|
+
name: user.location,
|
|
116
|
+
label: 'Location'
|
|
117
|
+
}]);
|
|
118
|
+
} else {
|
|
119
|
+
setTempLocations([]);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Handle links - simple and direct like other fields
|
|
123
|
+
if (user.linksMetadata && Array.isArray(user.linksMetadata)) {
|
|
124
|
+
const urls = user.linksMetadata.map(l => l.url);
|
|
125
|
+
setLinks(urls);
|
|
126
|
+
const metadataWithIds = user.linksMetadata.map((link, index) => ({
|
|
127
|
+
...link,
|
|
128
|
+
id: link.id || `existing-${index}`
|
|
129
|
+
}));
|
|
130
|
+
setTempLinksWithMetadata(metadataWithIds);
|
|
131
|
+
} else if (Array.isArray(user.links)) {
|
|
132
|
+
const simpleLinks = user.links.map(l => typeof l === 'string' ? l : l.link).filter(Boolean);
|
|
133
|
+
setLinks(simpleLinks);
|
|
134
|
+
const linksWithMetadata = simpleLinks.map((url, index) => ({
|
|
135
|
+
url,
|
|
136
|
+
title: url.replace(/^https?:\/\//, '').replace(/\/$/, ''),
|
|
137
|
+
description: `Link to ${url}`,
|
|
138
|
+
image: undefined,
|
|
139
|
+
id: `existing-${index}`
|
|
140
|
+
}));
|
|
141
|
+
setTempLinksWithMetadata(linksWithMetadata);
|
|
142
|
+
} else if (user.website) {
|
|
143
|
+
setLinks([user.website]);
|
|
144
|
+
setTempLinksWithMetadata([{
|
|
145
|
+
url: user.website,
|
|
146
|
+
title: user.website.replace(/^https?:\/\//, '').replace(/\/$/, ''),
|
|
147
|
+
description: `Link to ${user.website}`,
|
|
148
|
+
image: undefined,
|
|
149
|
+
id: 'existing-0'
|
|
150
|
+
}]);
|
|
151
|
+
} else {
|
|
152
|
+
setLinks([]);
|
|
153
|
+
setTempLinksWithMetadata([]);
|
|
154
|
+
}
|
|
93
155
|
setAvatarUrl(user.avatar?.url || '');
|
|
94
156
|
}
|
|
95
157
|
}, [user]);
|
|
@@ -103,9 +165,14 @@ const AccountSettingsScreen = ({
|
|
|
103
165
|
username,
|
|
104
166
|
email,
|
|
105
167
|
bio,
|
|
106
|
-
location,
|
|
107
|
-
|
|
168
|
+
location: tempLocations.length > 0 ? tempLocations[0].name : '',
|
|
169
|
+
// Keep backward compatibility
|
|
170
|
+
locations: tempLocations.length > 0 ? tempLocations : undefined,
|
|
171
|
+
links,
|
|
172
|
+
linksMetadata: tempLinksWithMetadata.length > 0 ? tempLinksWithMetadata : undefined
|
|
108
173
|
};
|
|
174
|
+
console.log('Saving updates:', updates);
|
|
175
|
+
console.log('Links metadata being saved:', tempLinksWithMetadata);
|
|
109
176
|
|
|
110
177
|
// Handle name field
|
|
111
178
|
if (displayName || lastName) {
|
|
@@ -160,10 +227,11 @@ const AccountSettingsScreen = ({
|
|
|
160
227
|
setTempBio(currentValue);
|
|
161
228
|
break;
|
|
162
229
|
case 'location':
|
|
163
|
-
|
|
230
|
+
// Don't reset the locations - keep the existing data
|
|
164
231
|
break;
|
|
165
232
|
case 'links':
|
|
166
|
-
|
|
233
|
+
// Don't reset the metadata - keep the existing rich metadata
|
|
234
|
+
// The tempLinksWithMetadata should already contain the rich data from the database
|
|
167
235
|
break;
|
|
168
236
|
}
|
|
169
237
|
setEditingField(type);
|
|
@@ -186,10 +254,13 @@ const AccountSettingsScreen = ({
|
|
|
186
254
|
setBio(tempBio);
|
|
187
255
|
break;
|
|
188
256
|
case 'location':
|
|
189
|
-
|
|
257
|
+
// Locations are handled in the main save function
|
|
190
258
|
break;
|
|
191
259
|
case 'links':
|
|
192
|
-
|
|
260
|
+
// Save both URLs and metadata
|
|
261
|
+
setLinks(tempLinksWithMetadata.map(link => link.url));
|
|
262
|
+
// Store full metadata for database
|
|
263
|
+
setTempLinksWithMetadata(tempLinksWithMetadata);
|
|
193
264
|
break;
|
|
194
265
|
}
|
|
195
266
|
|
|
@@ -202,91 +273,439 @@ const AccountSettingsScreen = ({
|
|
|
202
273
|
const cancelEditing = () => {
|
|
203
274
|
setEditingField(null);
|
|
204
275
|
};
|
|
205
|
-
const
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
276
|
+
const fetchLinkMetadata = async url => {
|
|
277
|
+
try {
|
|
278
|
+
setIsFetchingMetadata(true);
|
|
279
|
+
console.log('Fetching metadata for URL:', url);
|
|
280
|
+
|
|
281
|
+
// Use the backend API to fetch metadata
|
|
282
|
+
const metadata = await oxyServices.fetchLinkMetadata(url);
|
|
283
|
+
console.log('Received metadata:', metadata);
|
|
284
|
+
return {
|
|
285
|
+
...metadata,
|
|
286
|
+
id: Date.now().toString()
|
|
287
|
+
};
|
|
288
|
+
} catch (error) {
|
|
289
|
+
console.error('Error fetching metadata:', error);
|
|
290
|
+
// Fallback to basic metadata
|
|
291
|
+
return {
|
|
292
|
+
url: url.startsWith('http') ? url : 'https://' + url,
|
|
293
|
+
title: url.replace(/^https?:\/\//, '').replace(/\/$/, ''),
|
|
294
|
+
description: 'Link',
|
|
295
|
+
image: undefined,
|
|
296
|
+
id: Date.now().toString()
|
|
297
|
+
};
|
|
298
|
+
} finally {
|
|
299
|
+
setIsFetchingMetadata(false);
|
|
300
|
+
}
|
|
215
301
|
};
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
302
|
+
const searchLocations = async query => {
|
|
303
|
+
if (!query.trim() || query.length < 3) {
|
|
304
|
+
setLocationSearchResults([]);
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
try {
|
|
308
|
+
setIsSearchingLocations(true);
|
|
309
|
+
const response = await fetch(`https://nominatim.openstreetmap.org/search?format=json&q=${encodeURIComponent(query)}&limit=5&addressdetails=1`);
|
|
310
|
+
const data = await response.json();
|
|
311
|
+
setLocationSearchResults(data);
|
|
312
|
+
} catch (error) {
|
|
313
|
+
console.error('Error searching locations:', error);
|
|
314
|
+
setLocationSearchResults([]);
|
|
315
|
+
} finally {
|
|
316
|
+
setIsSearchingLocations(false);
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
const addLocation = locationData => {
|
|
320
|
+
const newLocation = {
|
|
321
|
+
id: Date.now().toString(),
|
|
322
|
+
name: locationData.display_name,
|
|
323
|
+
label: locationData.type === 'city' ? 'City' : locationData.type === 'country' ? 'Country' : locationData.type === 'state' ? 'State' : 'Location',
|
|
324
|
+
coordinates: {
|
|
325
|
+
lat: parseFloat(locationData.lat),
|
|
326
|
+
lon: parseFloat(locationData.lon)
|
|
241
327
|
}
|
|
242
328
|
};
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
329
|
+
setTempLocations(prev => [...prev, newLocation]);
|
|
330
|
+
setNewLocationQuery('');
|
|
331
|
+
setLocationSearchResults([]);
|
|
332
|
+
setIsAddingLocation(false);
|
|
333
|
+
};
|
|
334
|
+
const removeLocation = id => {
|
|
335
|
+
setTempLocations(prev => prev.filter(loc => loc.id !== id));
|
|
336
|
+
};
|
|
337
|
+
const moveLocation = (fromIndex, toIndex) => {
|
|
338
|
+
setTempLocations(prev => {
|
|
339
|
+
const newLocations = [...prev];
|
|
340
|
+
const [movedLocation] = newLocations.splice(fromIndex, 1);
|
|
341
|
+
newLocations.splice(toIndex, 0, movedLocation);
|
|
342
|
+
return newLocations;
|
|
343
|
+
});
|
|
344
|
+
};
|
|
345
|
+
const addLink = async () => {
|
|
346
|
+
if (!newLinkUrl.trim()) return;
|
|
347
|
+
const url = newLinkUrl.trim();
|
|
348
|
+
console.log('Adding link:', url);
|
|
349
|
+
const metadata = await fetchLinkMetadata(url);
|
|
350
|
+
console.log('Final metadata for adding:', metadata);
|
|
351
|
+
setTempLinksWithMetadata(prev => [...prev, metadata]);
|
|
352
|
+
setNewLinkUrl('');
|
|
353
|
+
setIsAddingLink(false);
|
|
354
|
+
};
|
|
355
|
+
const removeLink = id => {
|
|
356
|
+
setTempLinksWithMetadata(prev => prev.filter(link => link.id !== id));
|
|
357
|
+
};
|
|
358
|
+
const moveLink = (fromIndex, toIndex) => {
|
|
359
|
+
setTempLinksWithMetadata(prev => {
|
|
360
|
+
const newLinks = [...prev];
|
|
361
|
+
const [movedLink] = newLinks.splice(fromIndex, 1);
|
|
362
|
+
newLinks.splice(toIndex, 0, movedLink);
|
|
363
|
+
return newLinks;
|
|
364
|
+
});
|
|
247
365
|
};
|
|
248
366
|
const renderEditingField = type => {
|
|
249
367
|
if (type === 'displayName') {
|
|
250
368
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
251
|
-
style: styles.editingFieldContainer,
|
|
369
|
+
style: [styles.editingFieldContainer, {
|
|
370
|
+
backgroundColor: themeStyles.backgroundColor
|
|
371
|
+
}],
|
|
252
372
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
253
373
|
style: styles.editingFieldContent,
|
|
254
374
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
255
|
-
style:
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
style: styles.editingFieldLabel,
|
|
265
|
-
children: "First Name"
|
|
266
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
267
|
-
style: styles.editingFieldInput,
|
|
268
|
-
value: tempDisplayName,
|
|
269
|
-
onChangeText: setTempDisplayName,
|
|
270
|
-
placeholder: "Enter your first name",
|
|
271
|
-
placeholderTextColor: themeStyles.isDarkTheme ? '#aaa' : '#999',
|
|
272
|
-
autoFocus: true,
|
|
273
|
-
selectionColor: themeStyles.primaryColor
|
|
274
|
-
})]
|
|
375
|
+
style: styles.newValueSection,
|
|
376
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
377
|
+
style: styles.editingFieldHeader,
|
|
378
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
379
|
+
style: [styles.editingFieldLabel, {
|
|
380
|
+
color: themeStyles.isDarkTheme ? '#FFFFFF' : '#1A1A1A'
|
|
381
|
+
}],
|
|
382
|
+
children: "Edit Display Name"
|
|
383
|
+
})
|
|
275
384
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
276
385
|
style: {
|
|
277
|
-
|
|
386
|
+
flexDirection: 'row',
|
|
387
|
+
gap: 12
|
|
278
388
|
},
|
|
279
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
280
|
-
style:
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
389
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
390
|
+
style: {
|
|
391
|
+
flex: 1
|
|
392
|
+
},
|
|
393
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
394
|
+
style: styles.editingFieldLabel,
|
|
395
|
+
children: "First Name"
|
|
396
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
397
|
+
style: styles.editingFieldInput,
|
|
398
|
+
value: tempDisplayName,
|
|
399
|
+
onChangeText: setTempDisplayName,
|
|
400
|
+
placeholder: "Enter your first name",
|
|
401
|
+
placeholderTextColor: themeStyles.isDarkTheme ? '#aaa' : '#999',
|
|
402
|
+
autoFocus: true,
|
|
403
|
+
selectionColor: themeStyles.primaryColor
|
|
404
|
+
})]
|
|
405
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
406
|
+
style: {
|
|
407
|
+
flex: 1
|
|
408
|
+
},
|
|
409
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
410
|
+
style: styles.editingFieldLabel,
|
|
411
|
+
children: "Last Name"
|
|
412
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
413
|
+
style: styles.editingFieldInput,
|
|
414
|
+
value: tempLastName,
|
|
415
|
+
onChangeText: setTempLastName,
|
|
416
|
+
placeholder: "Enter your last name",
|
|
417
|
+
placeholderTextColor: themeStyles.isDarkTheme ? '#aaa' : '#999',
|
|
418
|
+
selectionColor: themeStyles.primaryColor
|
|
419
|
+
})]
|
|
420
|
+
})]
|
|
421
|
+
})]
|
|
422
|
+
})
|
|
423
|
+
})
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
if (type === 'location') {
|
|
427
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
428
|
+
style: [styles.editingFieldContainer, {
|
|
429
|
+
backgroundColor: themeStyles.backgroundColor
|
|
430
|
+
}],
|
|
431
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
432
|
+
style: styles.editingFieldContent,
|
|
433
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
434
|
+
style: styles.newValueSection,
|
|
435
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
436
|
+
style: styles.editingFieldHeader,
|
|
437
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
438
|
+
style: [styles.editingFieldLabel, {
|
|
439
|
+
color: themeStyles.isDarkTheme ? '#FFFFFF' : '#1A1A1A'
|
|
440
|
+
}],
|
|
441
|
+
children: "Manage Your Locations"
|
|
442
|
+
})
|
|
443
|
+
}), isAddingLocation ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
444
|
+
style: styles.addLocationSection,
|
|
445
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
446
|
+
style: styles.addLocationLabel,
|
|
447
|
+
children: ["Add New Location", isSearchingLocations && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
448
|
+
style: styles.searchingText,
|
|
449
|
+
children: " \u2022 Searching..."
|
|
450
|
+
})]
|
|
451
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
452
|
+
style: styles.addLocationInputContainer,
|
|
453
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
454
|
+
style: styles.addLocationInput,
|
|
455
|
+
value: newLocationQuery,
|
|
456
|
+
onChangeText: text => {
|
|
457
|
+
setNewLocationQuery(text);
|
|
458
|
+
searchLocations(text);
|
|
459
|
+
},
|
|
460
|
+
placeholder: "Search for a location...",
|
|
461
|
+
placeholderTextColor: themeStyles.isDarkTheme ? '#aaa' : '#999',
|
|
462
|
+
autoFocus: true,
|
|
463
|
+
selectionColor: themeStyles.primaryColor
|
|
464
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
465
|
+
style: styles.addLocationButtons,
|
|
466
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
467
|
+
style: [styles.addLocationButton, styles.cancelButton],
|
|
468
|
+
onPress: () => {
|
|
469
|
+
setIsAddingLocation(false);
|
|
470
|
+
setNewLocationQuery('');
|
|
471
|
+
setLocationSearchResults([]);
|
|
472
|
+
},
|
|
473
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
474
|
+
style: styles.cancelButtonText,
|
|
475
|
+
children: "Cancel"
|
|
476
|
+
})
|
|
477
|
+
})
|
|
478
|
+
})]
|
|
479
|
+
}), locationSearchResults.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
480
|
+
style: styles.searchResults,
|
|
481
|
+
children: locationSearchResults.map(result => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
482
|
+
style: styles.searchResultItem,
|
|
483
|
+
onPress: () => addLocation(result),
|
|
484
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
485
|
+
style: styles.searchResultName,
|
|
486
|
+
numberOfLines: 2,
|
|
487
|
+
children: result.display_name
|
|
488
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
489
|
+
style: styles.searchResultType,
|
|
490
|
+
children: result.type
|
|
491
|
+
})]
|
|
492
|
+
}, result.place_id))
|
|
493
|
+
})]
|
|
494
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
495
|
+
style: styles.addLocationTrigger,
|
|
496
|
+
onPress: () => setIsAddingLocation(true),
|
|
497
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
|
|
498
|
+
name: "add",
|
|
499
|
+
size: 20,
|
|
500
|
+
color: themeStyles.primaryColor
|
|
501
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
502
|
+
style: styles.addLocationTriggerText,
|
|
503
|
+
children: "Add a new location"
|
|
289
504
|
})]
|
|
505
|
+
}), tempLocations.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
506
|
+
style: styles.locationsList,
|
|
507
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
508
|
+
style: styles.locationsListTitle,
|
|
509
|
+
children: ["Your Locations (", tempLocations.length, ")"]
|
|
510
|
+
}), tempLocations.map((location, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
511
|
+
style: styles.locationItem,
|
|
512
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
513
|
+
style: styles.locationItemContent,
|
|
514
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
515
|
+
style: styles.locationItemDragHandle,
|
|
516
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
517
|
+
style: styles.reorderButtons,
|
|
518
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
519
|
+
style: [styles.reorderButton, index === 0 && styles.reorderButtonDisabled],
|
|
520
|
+
onPress: () => index > 0 && moveLocation(index, index - 1),
|
|
521
|
+
disabled: index === 0,
|
|
522
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
|
|
523
|
+
name: "chevron-up",
|
|
524
|
+
size: 12,
|
|
525
|
+
color: index === 0 ? "#ccc" : "#666"
|
|
526
|
+
})
|
|
527
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
528
|
+
style: [styles.reorderButton, index === tempLocations.length - 1 && styles.reorderButtonDisabled],
|
|
529
|
+
onPress: () => index < tempLocations.length - 1 && moveLocation(index, index + 1),
|
|
530
|
+
disabled: index === tempLocations.length - 1,
|
|
531
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
|
|
532
|
+
name: "chevron-down",
|
|
533
|
+
size: 12,
|
|
534
|
+
color: index === tempLocations.length - 1 ? "#ccc" : "#666"
|
|
535
|
+
})
|
|
536
|
+
})]
|
|
537
|
+
})
|
|
538
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
539
|
+
style: styles.locationItemInfo,
|
|
540
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
541
|
+
style: styles.locationItemHeader,
|
|
542
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
543
|
+
style: styles.locationItemName,
|
|
544
|
+
numberOfLines: 1,
|
|
545
|
+
children: location.name
|
|
546
|
+
}), location.label && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
547
|
+
style: styles.locationLabel,
|
|
548
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
549
|
+
style: styles.locationLabelText,
|
|
550
|
+
children: location.label
|
|
551
|
+
})
|
|
552
|
+
})]
|
|
553
|
+
}), location.coordinates && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
554
|
+
style: styles.locationCoordinates,
|
|
555
|
+
children: [location.coordinates.lat.toFixed(4), ", ", location.coordinates.lon.toFixed(4)]
|
|
556
|
+
})]
|
|
557
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
558
|
+
style: styles.locationItemActions,
|
|
559
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
560
|
+
style: styles.locationItemButton,
|
|
561
|
+
onPress: () => removeLocation(location.id),
|
|
562
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
|
|
563
|
+
name: "trash",
|
|
564
|
+
size: 14,
|
|
565
|
+
color: "#FF3B30"
|
|
566
|
+
})
|
|
567
|
+
})
|
|
568
|
+
})]
|
|
569
|
+
}), index < tempLocations.length - 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
570
|
+
style: styles.locationItemDivider
|
|
571
|
+
})]
|
|
572
|
+
}, location.id)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
573
|
+
style: styles.reorderHint,
|
|
574
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
575
|
+
style: styles.reorderHintText,
|
|
576
|
+
children: "Use \u2191\u2193 buttons to reorder your locations"
|
|
577
|
+
})
|
|
578
|
+
})]
|
|
579
|
+
})]
|
|
580
|
+
})
|
|
581
|
+
})
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
if (type === 'links') {
|
|
585
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
586
|
+
style: [styles.editingFieldContainer, {
|
|
587
|
+
backgroundColor: themeStyles.backgroundColor
|
|
588
|
+
}],
|
|
589
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
590
|
+
style: styles.editingFieldContent,
|
|
591
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
592
|
+
style: styles.newValueSection,
|
|
593
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
594
|
+
style: styles.editingFieldHeader,
|
|
595
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
596
|
+
style: [styles.editingFieldLabel, {
|
|
597
|
+
color: themeStyles.isDarkTheme ? '#FFFFFF' : '#1A1A1A'
|
|
598
|
+
}],
|
|
599
|
+
children: "Manage Your Links"
|
|
600
|
+
})
|
|
601
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
|
|
602
|
+
items: [
|
|
603
|
+
// Add new link item
|
|
604
|
+
...(isAddingLink ? [{
|
|
605
|
+
id: 'add-link-input',
|
|
606
|
+
icon: 'add',
|
|
607
|
+
iconColor: '#32D74B',
|
|
608
|
+
title: 'Add New Link',
|
|
609
|
+
subtitle: isFetchingMetadata ? 'Fetching metadata...' : 'Enter URL to add a new link',
|
|
610
|
+
multiRow: true,
|
|
611
|
+
customContent: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
612
|
+
style: styles.addLinkInputContainer,
|
|
613
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
614
|
+
style: styles.addLinkInput,
|
|
615
|
+
value: newLinkUrl,
|
|
616
|
+
onChangeText: setNewLinkUrl,
|
|
617
|
+
placeholder: "Enter URL (e.g., https://example.com)",
|
|
618
|
+
placeholderTextColor: themeStyles.isDarkTheme ? '#aaa' : '#999',
|
|
619
|
+
keyboardType: "url",
|
|
620
|
+
autoFocus: true,
|
|
621
|
+
selectionColor: themeStyles.primaryColor
|
|
622
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
623
|
+
style: styles.addLinkButtons,
|
|
624
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
625
|
+
style: [styles.addLinkButton, styles.cancelButton],
|
|
626
|
+
onPress: () => {
|
|
627
|
+
setIsAddingLink(false);
|
|
628
|
+
setNewLinkUrl('');
|
|
629
|
+
},
|
|
630
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
631
|
+
style: styles.cancelButtonText,
|
|
632
|
+
children: "Cancel"
|
|
633
|
+
})
|
|
634
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
635
|
+
style: [styles.addLinkButton, styles.addButton, {
|
|
636
|
+
opacity: isFetchingMetadata ? 0.5 : 1
|
|
637
|
+
}],
|
|
638
|
+
onPress: addLink,
|
|
639
|
+
disabled: isFetchingMetadata,
|
|
640
|
+
children: isFetchingMetadata ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
641
|
+
size: "small",
|
|
642
|
+
color: "#fff"
|
|
643
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
644
|
+
style: styles.addButtonText,
|
|
645
|
+
children: "Add"
|
|
646
|
+
})
|
|
647
|
+
})]
|
|
648
|
+
})]
|
|
649
|
+
})
|
|
650
|
+
}] : [{
|
|
651
|
+
id: 'add-link-trigger',
|
|
652
|
+
icon: 'add',
|
|
653
|
+
iconColor: '#32D74B',
|
|
654
|
+
title: 'Add a new link',
|
|
655
|
+
subtitle: 'Tap to add a new link to your profile',
|
|
656
|
+
onPress: () => setIsAddingLink(true)
|
|
657
|
+
}]),
|
|
658
|
+
// Existing links
|
|
659
|
+
...tempLinksWithMetadata.map((link, index) => ({
|
|
660
|
+
id: link.id,
|
|
661
|
+
image: link.image || undefined,
|
|
662
|
+
imageSize: 32,
|
|
663
|
+
icon: link.image ? undefined : 'link',
|
|
664
|
+
iconColor: '#32D74B',
|
|
665
|
+
title: link.title || link.url,
|
|
666
|
+
subtitle: link.description && link.description !== link.title ? link.description : link.url,
|
|
667
|
+
multiRow: true,
|
|
668
|
+
customContent: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
669
|
+
style: styles.linkItemActions,
|
|
670
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
671
|
+
style: styles.reorderButtons,
|
|
672
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
673
|
+
style: [styles.reorderButton, index === 0 && styles.reorderButtonDisabled],
|
|
674
|
+
onPress: () => index > 0 && moveLink(index, index - 1),
|
|
675
|
+
disabled: index === 0,
|
|
676
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
|
|
677
|
+
name: "chevron-up",
|
|
678
|
+
size: 12,
|
|
679
|
+
color: index === 0 ? "#ccc" : "#666"
|
|
680
|
+
})
|
|
681
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
682
|
+
style: [styles.reorderButton, index === tempLinksWithMetadata.length - 1 && styles.reorderButtonDisabled],
|
|
683
|
+
onPress: () => index < tempLinksWithMetadata.length - 1 && moveLink(index, index + 1),
|
|
684
|
+
disabled: index === tempLinksWithMetadata.length - 1,
|
|
685
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
|
|
686
|
+
name: "chevron-down",
|
|
687
|
+
size: 12,
|
|
688
|
+
color: index === tempLinksWithMetadata.length - 1 ? "#ccc" : "#666"
|
|
689
|
+
})
|
|
690
|
+
})]
|
|
691
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
692
|
+
style: styles.linkItemButton,
|
|
693
|
+
onPress: () => removeLink(link.id),
|
|
694
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
|
|
695
|
+
name: "trash",
|
|
696
|
+
size: 14,
|
|
697
|
+
color: "#FF3B30"
|
|
698
|
+
})
|
|
699
|
+
})]
|
|
700
|
+
})
|
|
701
|
+
}))],
|
|
702
|
+
theme: theme
|
|
703
|
+
}), tempLinksWithMetadata.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
704
|
+
style: styles.reorderHint,
|
|
705
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
706
|
+
style: styles.reorderHintText,
|
|
707
|
+
children: "Use \u2191\u2193 buttons to reorder your links"
|
|
708
|
+
})
|
|
290
709
|
})]
|
|
291
710
|
})
|
|
292
711
|
})
|
|
@@ -391,14 +810,21 @@ const AccountSettingsScreen = ({
|
|
|
391
810
|
}
|
|
392
811
|
};
|
|
393
812
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
394
|
-
style: styles.editingFieldContainer,
|
|
813
|
+
style: [styles.editingFieldContainer, {
|
|
814
|
+
backgroundColor: themeStyles.backgroundColor
|
|
815
|
+
}],
|
|
395
816
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
396
817
|
style: styles.editingFieldContent,
|
|
397
818
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
398
819
|
style: styles.newValueSection,
|
|
399
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.
|
|
400
|
-
style: styles.
|
|
401
|
-
children:
|
|
820
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
821
|
+
style: styles.editingFieldHeader,
|
|
822
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
823
|
+
style: [styles.editingFieldLabel, {
|
|
824
|
+
color: themeStyles.isDarkTheme ? '#FFFFFF' : '#1A1A1A'
|
|
825
|
+
}],
|
|
826
|
+
children: `Enter ${config.label.toLowerCase()}:`
|
|
827
|
+
})
|
|
402
828
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
403
829
|
style: [config.multiline ? styles.editingFieldTextArea : styles.editingFieldInput, {
|
|
404
830
|
backgroundColor: themeStyles.isDarkTheme ? '#333' : '#fff',
|
|
@@ -419,34 +845,6 @@ const AccountSettingsScreen = ({
|
|
|
419
845
|
})
|
|
420
846
|
});
|
|
421
847
|
};
|
|
422
|
-
const renderField = (type, label, value, placeholder, icon, iconColor, multiline = false, keyboardType = 'default', isFirst = false, isLast = false) => {
|
|
423
|
-
const itemStyles = [styles.settingItem, isFirst && styles.firstSettingItem, isLast && styles.lastSettingItem];
|
|
424
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
425
|
-
style: itemStyles,
|
|
426
|
-
onPress: () => startEditing(type, value),
|
|
427
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
428
|
-
style: styles.settingInfo,
|
|
429
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
|
|
430
|
-
name: icon,
|
|
431
|
-
size: 20,
|
|
432
|
-
color: iconColor,
|
|
433
|
-
style: styles.settingIcon
|
|
434
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
435
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
436
|
-
style: styles.settingLabel,
|
|
437
|
-
children: label
|
|
438
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
439
|
-
style: styles.settingDescription,
|
|
440
|
-
children: value || placeholder
|
|
441
|
-
})]
|
|
442
|
-
})]
|
|
443
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
|
|
444
|
-
name: "chevron-forward",
|
|
445
|
-
size: 16,
|
|
446
|
-
color: "#ccc"
|
|
447
|
-
})]
|
|
448
|
-
});
|
|
449
|
-
};
|
|
450
848
|
if (authLoading || !isAuthenticated) {
|
|
451
849
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
452
850
|
style: [styles.container, {
|
|
@@ -463,93 +861,64 @@ const AccountSettingsScreen = ({
|
|
|
463
861
|
style: [styles.container, {
|
|
464
862
|
backgroundColor: themeStyles.backgroundColor
|
|
465
863
|
}],
|
|
466
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
467
|
-
style: styles.
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
style: styles.cancelButton,
|
|
474
|
-
onPress: cancelEditing,
|
|
475
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
476
|
-
name: "close",
|
|
477
|
-
size: 24,
|
|
478
|
-
color: "#666"
|
|
479
|
-
})
|
|
480
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
481
|
-
style: {
|
|
482
|
-
transform: [{
|
|
483
|
-
scale: saveButtonScale
|
|
484
|
-
}]
|
|
485
|
-
},
|
|
486
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
487
|
-
style: [styles.saveHeaderButton, {
|
|
488
|
-
opacity: isSaving ? 0.7 : 1,
|
|
489
|
-
backgroundColor: editingField ? getFieldIcon(editingField).color : '#007AFF'
|
|
490
|
-
}],
|
|
491
|
-
onPress: () => saveField(editingField),
|
|
492
|
-
disabled: isSaving,
|
|
493
|
-
children: isSaving ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
494
|
-
size: "small",
|
|
495
|
-
color: "#fff"
|
|
496
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
497
|
-
style: styles.saveButtonText,
|
|
498
|
-
children: "Save"
|
|
499
|
-
})
|
|
500
|
-
})
|
|
501
|
-
})]
|
|
502
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
503
|
-
style: styles.editingHeaderBottom,
|
|
504
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
505
|
-
style: styles.headerTitleWithIcon,
|
|
506
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
|
|
507
|
-
name: getFieldIcon(editingField).name,
|
|
508
|
-
size: 50,
|
|
509
|
-
color: getFieldIcon(editingField).color,
|
|
510
|
-
style: styles.headerIcon
|
|
511
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
512
|
-
style: styles.headerTitleLarge,
|
|
513
|
-
children: getFieldLabel(editingField)
|
|
514
|
-
})]
|
|
515
|
-
})
|
|
516
|
-
})]
|
|
517
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
518
|
-
style: styles.normalHeader,
|
|
864
|
+
children: [editingField ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
865
|
+
style: [styles.editingHeader, {
|
|
866
|
+
backgroundColor: '#FFFFFF',
|
|
867
|
+
borderBottomColor: themeStyles.isDarkTheme ? '#38383A' : '#E9ECEF'
|
|
868
|
+
}],
|
|
869
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
870
|
+
style: styles.editingHeaderContent,
|
|
519
871
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
520
|
-
style: styles.
|
|
521
|
-
onPress:
|
|
522
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
523
|
-
name: "
|
|
524
|
-
size:
|
|
525
|
-
color:
|
|
872
|
+
style: styles.editingBackButton,
|
|
873
|
+
onPress: cancelEditing,
|
|
874
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
|
|
875
|
+
name: "chevron-back",
|
|
876
|
+
size: 20,
|
|
877
|
+
color: themeStyles.primaryColor
|
|
526
878
|
})
|
|
527
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.
|
|
528
|
-
style: styles.
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
onPress: handleSave,
|
|
541
|
-
disabled: isSaving,
|
|
542
|
-
children: isSaving ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
543
|
-
size: "small",
|
|
544
|
-
color: themeStyles.primaryColor
|
|
545
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
546
|
-
name: "checkmark",
|
|
547
|
-
size: 24,
|
|
879
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
880
|
+
style: styles.editingTitleContainer
|
|
881
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
882
|
+
style: [styles.editingSaveButton, {
|
|
883
|
+
opacity: isSaving ? 0.5 : 1
|
|
884
|
+
}],
|
|
885
|
+
onPress: () => saveField(editingField),
|
|
886
|
+
disabled: isSaving,
|
|
887
|
+
children: isSaving ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
888
|
+
size: "small",
|
|
889
|
+
color: themeStyles.primaryColor
|
|
890
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
891
|
+
style: [styles.editingSaveButtonText, {
|
|
548
892
|
color: themeStyles.primaryColor
|
|
549
|
-
}
|
|
893
|
+
}],
|
|
894
|
+
children: "Save"
|
|
550
895
|
})
|
|
551
896
|
})]
|
|
552
|
-
})
|
|
897
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
898
|
+
style: styles.editingHeaderBottom,
|
|
899
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
|
|
900
|
+
name: editingField === 'displayName' ? 'person' : editingField === 'username' ? 'at' : editingField === 'email' ? 'mail' : editingField === 'bio' ? 'document-text' : editingField === 'location' ? 'location' : editingField === 'links' ? 'link' : 'person',
|
|
901
|
+
size: 56,
|
|
902
|
+
color: editingField === 'displayName' ? '#007AFF' : editingField === 'username' ? '#5856D6' : editingField === 'email' ? '#FF9500' : editingField === 'bio' ? '#34C759' : editingField === 'location' ? '#FF3B30' : editingField === 'links' ? '#32D74B' : '#007AFF',
|
|
903
|
+
style: styles.editingBottomIcon
|
|
904
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
905
|
+
style: [styles.editingBottomTitle, {
|
|
906
|
+
color: themeStyles.isDarkTheme ? '#FFFFFF' : '#1A1A1A'
|
|
907
|
+
}],
|
|
908
|
+
children: editingField === 'displayName' ? 'Display Name' : editingField === 'username' ? 'Username' : editingField === 'email' ? 'Email' : editingField === 'bio' ? 'Bio' : editingField === 'location' ? 'Location' : editingField === 'links' ? 'Links' : 'Field'
|
|
909
|
+
})]
|
|
910
|
+
})]
|
|
911
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Header, {
|
|
912
|
+
title: "Edit Profile",
|
|
913
|
+
theme: theme,
|
|
914
|
+
onBack: goBack || onClose,
|
|
915
|
+
rightAction: {
|
|
916
|
+
icon: 'checkmark',
|
|
917
|
+
onPress: handleSave,
|
|
918
|
+
loading: isSaving,
|
|
919
|
+
disabled: isSaving
|
|
920
|
+
},
|
|
921
|
+
elevation: "subtle"
|
|
553
922
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
554
923
|
style: editingField ? styles.contentEditing : styles.content,
|
|
555
924
|
children: editingField ?
|
|
@@ -567,101 +936,162 @@ const AccountSettingsScreen = ({
|
|
|
567
936
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
568
937
|
style: styles.sectionTitle,
|
|
569
938
|
children: "Profile Picture"
|
|
570
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
style: styles.settingInfo,
|
|
583
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
584
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
585
|
-
style: styles.settingLabel,
|
|
586
|
-
children: "Profile Photo"
|
|
587
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
588
|
-
style: styles.settingDescription,
|
|
589
|
-
children: avatarUrl ? 'Tap to change your profile picture' : 'Tap to add a profile picture'
|
|
590
|
-
})]
|
|
591
|
-
})
|
|
592
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
|
|
593
|
-
name: "chevron-forward",
|
|
594
|
-
size: 16,
|
|
595
|
-
color: "#ccc"
|
|
596
|
-
})]
|
|
939
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
|
|
940
|
+
items: [{
|
|
941
|
+
id: 'profile-photo',
|
|
942
|
+
icon: avatarUrl ? undefined : 'person',
|
|
943
|
+
iconColor: '#007AFF',
|
|
944
|
+
image: avatarUrl || undefined,
|
|
945
|
+
imageSize: 40,
|
|
946
|
+
title: 'Profile Photo',
|
|
947
|
+
subtitle: avatarUrl ? 'Tap to change your profile picture' : 'Tap to add a profile picture',
|
|
948
|
+
onPress: handleAvatarUpdate
|
|
949
|
+
}],
|
|
950
|
+
theme: theme
|
|
597
951
|
})]
|
|
598
952
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
599
953
|
style: styles.section,
|
|
600
954
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
601
955
|
style: styles.sectionTitle,
|
|
602
956
|
children: "Basic Information"
|
|
603
|
-
}),
|
|
604
|
-
|
|
605
|
-
|
|
957
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
|
|
958
|
+
items: [{
|
|
959
|
+
id: 'display-name',
|
|
960
|
+
icon: 'person',
|
|
961
|
+
iconColor: '#007AFF',
|
|
962
|
+
title: 'Display Name',
|
|
963
|
+
subtitle: [displayName, lastName].filter(Boolean).join(' ') || 'Add your display name',
|
|
964
|
+
onPress: () => startEditing('displayName', '')
|
|
965
|
+
}, {
|
|
966
|
+
id: 'username',
|
|
967
|
+
icon: 'at',
|
|
968
|
+
iconColor: '#5856D6',
|
|
969
|
+
title: 'Username',
|
|
970
|
+
subtitle: username || 'Choose a username',
|
|
971
|
+
onPress: () => startEditing('username', username)
|
|
972
|
+
}, {
|
|
973
|
+
id: 'email',
|
|
974
|
+
icon: 'mail',
|
|
975
|
+
iconColor: '#FF9500',
|
|
976
|
+
title: 'Email',
|
|
977
|
+
subtitle: email || 'Add your email address',
|
|
978
|
+
onPress: () => startEditing('email', email)
|
|
979
|
+
}],
|
|
980
|
+
theme: theme
|
|
981
|
+
})]
|
|
606
982
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
607
983
|
style: styles.section,
|
|
608
984
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
609
985
|
style: styles.sectionTitle,
|
|
610
986
|
children: "About You"
|
|
611
|
-
}),
|
|
987
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
|
|
988
|
+
items: [{
|
|
989
|
+
id: 'bio',
|
|
990
|
+
icon: 'document-text',
|
|
991
|
+
iconColor: '#34C759',
|
|
992
|
+
title: 'Bio',
|
|
993
|
+
subtitle: bio || 'Tell people about yourself',
|
|
994
|
+
onPress: () => startEditing('bio', bio)
|
|
995
|
+
}, {
|
|
996
|
+
id: 'locations',
|
|
997
|
+
icon: 'location',
|
|
998
|
+
iconColor: '#FF3B30',
|
|
999
|
+
title: 'Locations',
|
|
1000
|
+
subtitle: tempLocations.length > 0 ? `${tempLocations.length} location${tempLocations.length !== 1 ? 's' : ''} added` : 'Add your locations',
|
|
1001
|
+
onPress: () => startEditing('location', ''),
|
|
1002
|
+
customContentBelow: tempLocations.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1003
|
+
style: styles.linksPreviewContainer,
|
|
1004
|
+
children: [tempLocations.slice(0, 2).map((location, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1005
|
+
style: styles.linkPreviewItem,
|
|
1006
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
1007
|
+
style: styles.linkPreviewImage,
|
|
1008
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
1009
|
+
style: styles.linkPreviewImageText,
|
|
1010
|
+
children: location.name.charAt(0).toUpperCase()
|
|
1011
|
+
})
|
|
1012
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1013
|
+
style: styles.linkPreviewContent,
|
|
1014
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
1015
|
+
style: styles.linkPreviewTitle,
|
|
1016
|
+
numberOfLines: 1,
|
|
1017
|
+
children: location.name
|
|
1018
|
+
}), location.label && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
1019
|
+
style: styles.linkPreviewSubtitle,
|
|
1020
|
+
children: location.label
|
|
1021
|
+
})]
|
|
1022
|
+
})]
|
|
1023
|
+
}, location.id || index)), tempLocations.length > 2 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
1024
|
+
style: styles.linkPreviewMore,
|
|
1025
|
+
children: ["+", tempLocations.length - 2, " more"]
|
|
1026
|
+
})]
|
|
1027
|
+
})
|
|
1028
|
+
}, {
|
|
1029
|
+
id: 'links',
|
|
1030
|
+
icon: 'link',
|
|
1031
|
+
iconColor: '#32D74B',
|
|
1032
|
+
title: 'Links',
|
|
1033
|
+
subtitle: tempLinksWithMetadata.length > 0 ? `${tempLinksWithMetadata.length} link${tempLinksWithMetadata.length !== 1 ? 's' : ''} added` : 'Add your links',
|
|
1034
|
+
onPress: () => startEditing('links', ''),
|
|
1035
|
+
multiRow: true,
|
|
1036
|
+
customContentBelow: tempLinksWithMetadata.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1037
|
+
style: styles.linksPreviewContainer,
|
|
1038
|
+
children: [tempLinksWithMetadata.slice(0, 2).map((link, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
1039
|
+
style: styles.linkPreviewItem,
|
|
1040
|
+
children: [link.image ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
1041
|
+
source: {
|
|
1042
|
+
uri: link.image
|
|
1043
|
+
},
|
|
1044
|
+
style: styles.linkPreviewImage
|
|
1045
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
1046
|
+
style: styles.linkPreviewImage,
|
|
1047
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
1048
|
+
style: styles.linkPreviewImageText,
|
|
1049
|
+
children: link.title?.charAt(0).toUpperCase() || link.url.charAt(0).toUpperCase()
|
|
1050
|
+
})
|
|
1051
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
1052
|
+
style: styles.linkPreviewTitle,
|
|
1053
|
+
numberOfLines: 1,
|
|
1054
|
+
children: link.title || link.url
|
|
1055
|
+
})]
|
|
1056
|
+
}, link.id || index)), tempLinksWithMetadata.length > 2 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
1057
|
+
style: styles.linkPreviewMore,
|
|
1058
|
+
children: ["+", tempLinksWithMetadata.length - 2, " more"]
|
|
1059
|
+
})]
|
|
1060
|
+
})
|
|
1061
|
+
}],
|
|
1062
|
+
theme: theme
|
|
1063
|
+
})]
|
|
612
1064
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
613
1065
|
style: styles.section,
|
|
614
1066
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
615
1067
|
style: styles.sectionTitle,
|
|
616
1068
|
children: "Quick Actions"
|
|
617
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
onPress: () => _sonner.toast.info('Account verification coming soon!'),
|
|
644
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
645
|
-
style: styles.settingInfo,
|
|
646
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
|
|
647
|
-
name: "checkmark-circle",
|
|
648
|
-
size: 20,
|
|
649
|
-
color: "#30D158",
|
|
650
|
-
style: styles.settingIcon
|
|
651
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
652
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
653
|
-
style: styles.settingLabel,
|
|
654
|
-
children: "Verify Account"
|
|
655
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
656
|
-
style: styles.settingDescription,
|
|
657
|
-
children: "Get a verified badge"
|
|
658
|
-
})]
|
|
659
|
-
})]
|
|
660
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
|
|
661
|
-
name: "chevron-forward",
|
|
662
|
-
size: 16,
|
|
663
|
-
color: "#ccc"
|
|
664
|
-
})]
|
|
1069
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
|
|
1070
|
+
items: [{
|
|
1071
|
+
id: 'preview-profile',
|
|
1072
|
+
icon: 'eye',
|
|
1073
|
+
iconColor: '#007AFF',
|
|
1074
|
+
title: 'Preview Profile',
|
|
1075
|
+
subtitle: 'See how your profile looks to others',
|
|
1076
|
+
onPress: () => navigate?.('Profile', {
|
|
1077
|
+
userId: user?.id
|
|
1078
|
+
})
|
|
1079
|
+
}, {
|
|
1080
|
+
id: 'privacy-settings',
|
|
1081
|
+
icon: 'shield-checkmark',
|
|
1082
|
+
iconColor: '#8E8E93',
|
|
1083
|
+
title: 'Privacy Settings',
|
|
1084
|
+
subtitle: 'Control who can see your profile',
|
|
1085
|
+
onPress: () => _sonner.toast.info('Privacy settings coming soon!')
|
|
1086
|
+
}, {
|
|
1087
|
+
id: 'verify-account',
|
|
1088
|
+
icon: 'checkmark-circle',
|
|
1089
|
+
iconColor: '#30D158',
|
|
1090
|
+
title: 'Verify Account',
|
|
1091
|
+
subtitle: 'Get a verified badge',
|
|
1092
|
+
onPress: () => _sonner.toast.info('Account verification coming soon!')
|
|
1093
|
+
}],
|
|
1094
|
+
theme: theme
|
|
665
1095
|
})]
|
|
666
1096
|
})]
|
|
667
1097
|
})
|
|
@@ -673,203 +1103,416 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
673
1103
|
flex: 1,
|
|
674
1104
|
backgroundColor: '#f2f2f2'
|
|
675
1105
|
},
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
1106
|
+
content: {
|
|
1107
|
+
flex: 1,
|
|
1108
|
+
padding: 16
|
|
1109
|
+
},
|
|
1110
|
+
contentEditing: {
|
|
1111
|
+
flex: 1,
|
|
1112
|
+
padding: 0
|
|
1113
|
+
},
|
|
1114
|
+
section: {
|
|
1115
|
+
marginBottom: 24
|
|
1116
|
+
},
|
|
1117
|
+
sectionTitle: {
|
|
1118
|
+
fontSize: 16,
|
|
1119
|
+
fontWeight: '600',
|
|
1120
|
+
color: '#333',
|
|
1121
|
+
marginBottom: 12,
|
|
1122
|
+
fontFamily: _fonts.fontFamilies.phuduSemiBold
|
|
1123
|
+
},
|
|
1124
|
+
userIcon: {
|
|
1125
|
+
marginRight: 12
|
|
1126
|
+
},
|
|
1127
|
+
// Editing-only mode styles
|
|
1128
|
+
editingOnlyContainer: {
|
|
1129
|
+
flex: 1
|
|
1130
|
+
},
|
|
1131
|
+
editingFieldContainer: {
|
|
679
1132
|
backgroundColor: '#fff',
|
|
680
|
-
|
|
681
|
-
|
|
1133
|
+
padding: 16,
|
|
1134
|
+
flex: 1
|
|
1135
|
+
},
|
|
1136
|
+
editingFieldHeader: {
|
|
1137
|
+
marginBottom: 8,
|
|
1138
|
+
flexDirection: 'row',
|
|
1139
|
+
alignItems: 'center'
|
|
682
1140
|
},
|
|
683
|
-
|
|
1141
|
+
editingFieldTitleContainer: {
|
|
684
1142
|
flexDirection: 'row',
|
|
685
|
-
justifyContent: 'space-between',
|
|
686
1143
|
alignItems: 'center'
|
|
687
1144
|
},
|
|
1145
|
+
editingFieldIcon: {
|
|
1146
|
+
marginRight: 12
|
|
1147
|
+
},
|
|
1148
|
+
editingFieldTitle: {
|
|
1149
|
+
fontSize: 20,
|
|
1150
|
+
fontWeight: '600',
|
|
1151
|
+
color: '#000'
|
|
1152
|
+
},
|
|
1153
|
+
editingFieldContent: {
|
|
1154
|
+
flex: 1
|
|
1155
|
+
},
|
|
1156
|
+
newValueSection: {
|
|
1157
|
+
flex: 1
|
|
1158
|
+
},
|
|
1159
|
+
editingFieldLabel: {
|
|
1160
|
+
fontSize: 16,
|
|
1161
|
+
fontWeight: '600',
|
|
1162
|
+
color: '#333',
|
|
1163
|
+
marginBottom: 12,
|
|
1164
|
+
fontFamily: _fonts.fontFamilies.phuduSemiBold
|
|
1165
|
+
},
|
|
1166
|
+
editingFieldInput: {
|
|
1167
|
+
backgroundColor: '#fff',
|
|
1168
|
+
borderWidth: 2,
|
|
1169
|
+
borderColor: '#e0e0e0',
|
|
1170
|
+
borderRadius: 12,
|
|
1171
|
+
padding: 16,
|
|
1172
|
+
fontSize: 17,
|
|
1173
|
+
minHeight: 52,
|
|
1174
|
+
fontWeight: '400'
|
|
1175
|
+
},
|
|
1176
|
+
editingFieldTextArea: {
|
|
1177
|
+
backgroundColor: '#fff',
|
|
1178
|
+
borderWidth: 2,
|
|
1179
|
+
borderColor: '#e0e0e0',
|
|
1180
|
+
borderRadius: 12,
|
|
1181
|
+
padding: 16,
|
|
1182
|
+
fontSize: 17,
|
|
1183
|
+
minHeight: 120,
|
|
1184
|
+
textAlignVertical: 'top',
|
|
1185
|
+
fontWeight: '400'
|
|
1186
|
+
},
|
|
1187
|
+
// Custom editing header styles
|
|
688
1188
|
editingHeader: {
|
|
689
|
-
|
|
1189
|
+
paddingTop: _reactNative.Platform.OS === 'ios' ? 50 : 16,
|
|
1190
|
+
paddingBottom: 0,
|
|
1191
|
+
borderBottomWidth: 1,
|
|
1192
|
+
backgroundColor: '#fff'
|
|
690
1193
|
},
|
|
691
|
-
|
|
1194
|
+
editingHeaderContent: {
|
|
692
1195
|
flexDirection: 'row',
|
|
693
|
-
justifyContent: 'space-between',
|
|
694
1196
|
alignItems: 'center',
|
|
695
|
-
|
|
1197
|
+
paddingHorizontal: 16,
|
|
1198
|
+
minHeight: 44
|
|
696
1199
|
},
|
|
697
|
-
|
|
698
|
-
|
|
1200
|
+
editingBackButton: {
|
|
1201
|
+
width: 32,
|
|
1202
|
+
height: 32,
|
|
1203
|
+
borderRadius: 16,
|
|
1204
|
+
backgroundColor: '#F8F9FA',
|
|
699
1205
|
alignItems: 'center',
|
|
700
|
-
justifyContent: '
|
|
701
|
-
|
|
702
|
-
headerTitle: {
|
|
703
|
-
fontSize: 24,
|
|
704
|
-
fontWeight: 'bold',
|
|
705
|
-
color: '#000',
|
|
706
|
-
fontFamily: _fonts.fontFamilies.phuduBold
|
|
1206
|
+
justifyContent: 'center',
|
|
1207
|
+
marginRight: 12
|
|
707
1208
|
},
|
|
708
|
-
|
|
1209
|
+
editingTitleContainer: {
|
|
1210
|
+
flex: 1,
|
|
709
1211
|
flexDirection: 'column',
|
|
710
1212
|
alignItems: 'flex-start',
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
maxWidth: '90%'
|
|
1213
|
+
justifyContent: 'flex-end',
|
|
1214
|
+
paddingBottom: 8
|
|
714
1215
|
},
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
color: '#000',
|
|
719
|
-
fontFamily: _fonts.fontFamilies.phuduExtraBold,
|
|
720
|
-
textAlign: 'left'
|
|
1216
|
+
editingTitleIcon: {
|
|
1217
|
+
marginBottom: 4,
|
|
1218
|
+
alignSelf: 'flex-start'
|
|
721
1219
|
},
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
1220
|
+
editingTitle: {
|
|
1221
|
+
fontSize: 18,
|
|
1222
|
+
fontWeight: '700',
|
|
1223
|
+
fontFamily: _fonts.fontFamilies.phuduBold,
|
|
1224
|
+
letterSpacing: -0.3,
|
|
1225
|
+
lineHeight: 22,
|
|
1226
|
+
textAlign: 'left',
|
|
1227
|
+
alignSelf: 'flex-start'
|
|
727
1228
|
},
|
|
728
|
-
|
|
1229
|
+
editingSaveButton: {
|
|
729
1230
|
paddingHorizontal: 16,
|
|
730
1231
|
paddingVertical: 8,
|
|
731
|
-
borderRadius:
|
|
1232
|
+
borderRadius: 18,
|
|
1233
|
+
backgroundColor: '#F8F9FA',
|
|
732
1234
|
minWidth: 60,
|
|
733
1235
|
alignItems: 'center',
|
|
734
1236
|
justifyContent: 'center'
|
|
735
1237
|
},
|
|
736
|
-
|
|
737
|
-
padding: 5
|
|
738
|
-
},
|
|
739
|
-
saveButtonText: {
|
|
740
|
-
color: '#fff',
|
|
1238
|
+
editingSaveButtonText: {
|
|
741
1239
|
fontSize: 16,
|
|
742
1240
|
fontWeight: '600',
|
|
743
1241
|
fontFamily: _fonts.fontFamilies.phuduSemiBold
|
|
744
1242
|
},
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
1243
|
+
editingHeaderBottom: {
|
|
1244
|
+
flexDirection: 'column',
|
|
1245
|
+
alignItems: 'flex-start',
|
|
1246
|
+
paddingHorizontal: 16,
|
|
1247
|
+
paddingBottom: 8,
|
|
1248
|
+
paddingTop: 8
|
|
748
1249
|
},
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
1250
|
+
editingBottomIcon: {
|
|
1251
|
+
marginBottom: 8,
|
|
1252
|
+
alignSelf: 'flex-start'
|
|
752
1253
|
},
|
|
753
|
-
|
|
754
|
-
|
|
1254
|
+
editingBottomTitle: {
|
|
1255
|
+
fontSize: 32,
|
|
1256
|
+
fontWeight: '700',
|
|
1257
|
+
fontFamily: _fonts.fontFamilies.phuduBold,
|
|
1258
|
+
letterSpacing: -0.5,
|
|
1259
|
+
lineHeight: 36,
|
|
1260
|
+
textAlign: 'left',
|
|
1261
|
+
alignSelf: 'flex-start'
|
|
755
1262
|
},
|
|
756
|
-
|
|
757
|
-
|
|
1263
|
+
// Links management styles
|
|
1264
|
+
addLinkSection: {
|
|
1265
|
+
marginBottom: 16,
|
|
1266
|
+
padding: 12,
|
|
1267
|
+
backgroundColor: '#F8F9FA',
|
|
1268
|
+
borderRadius: 8,
|
|
1269
|
+
borderWidth: 1,
|
|
1270
|
+
borderColor: '#E9ECEF'
|
|
1271
|
+
},
|
|
1272
|
+
addLinkLabel: {
|
|
1273
|
+
fontSize: 14,
|
|
758
1274
|
fontWeight: '600',
|
|
759
1275
|
color: '#333',
|
|
760
|
-
marginBottom:
|
|
761
|
-
|
|
1276
|
+
marginBottom: 8
|
|
1277
|
+
},
|
|
1278
|
+
addLinkInputContainer: {
|
|
1279
|
+
gap: 8
|
|
762
1280
|
},
|
|
763
|
-
|
|
1281
|
+
addLinkInput: {
|
|
764
1282
|
backgroundColor: '#fff',
|
|
765
|
-
|
|
1283
|
+
borderWidth: 1,
|
|
1284
|
+
borderColor: '#E9ECEF',
|
|
1285
|
+
borderRadius: 6,
|
|
1286
|
+
padding: 10,
|
|
1287
|
+
fontSize: 14,
|
|
1288
|
+
minHeight: 36
|
|
1289
|
+
},
|
|
1290
|
+
addLinkButtons: {
|
|
766
1291
|
flexDirection: 'row',
|
|
1292
|
+
gap: 6
|
|
1293
|
+
},
|
|
1294
|
+
addLinkButton: {
|
|
1295
|
+
flex: 1,
|
|
1296
|
+
paddingVertical: 8,
|
|
1297
|
+
paddingHorizontal: 12,
|
|
1298
|
+
borderRadius: 6,
|
|
767
1299
|
alignItems: 'center',
|
|
768
|
-
justifyContent: '
|
|
769
|
-
marginBottom: 2
|
|
1300
|
+
justifyContent: 'center'
|
|
770
1301
|
},
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
1302
|
+
cancelButton: {
|
|
1303
|
+
backgroundColor: '#F8F9FA',
|
|
1304
|
+
borderWidth: 1,
|
|
1305
|
+
borderColor: '#E9ECEF'
|
|
774
1306
|
},
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
1307
|
+
cancelButtonText: {
|
|
1308
|
+
fontSize: 14,
|
|
1309
|
+
fontWeight: '600',
|
|
1310
|
+
color: '#6C757D'
|
|
779
1311
|
},
|
|
780
|
-
|
|
1312
|
+
addButton: {
|
|
1313
|
+
backgroundColor: '#007AFF'
|
|
1314
|
+
},
|
|
1315
|
+
addButtonText: {
|
|
1316
|
+
fontSize: 14,
|
|
1317
|
+
fontWeight: '600',
|
|
1318
|
+
color: '#fff'
|
|
1319
|
+
},
|
|
1320
|
+
addLinkTrigger: {
|
|
781
1321
|
flexDirection: 'row',
|
|
782
1322
|
alignItems: 'center',
|
|
783
|
-
|
|
1323
|
+
padding: 12,
|
|
1324
|
+
backgroundColor: '#F8F9FA',
|
|
1325
|
+
borderRadius: 8,
|
|
1326
|
+
borderWidth: 1,
|
|
1327
|
+
borderColor: '#E9ECEF',
|
|
1328
|
+
borderStyle: 'dashed',
|
|
1329
|
+
marginBottom: 16
|
|
784
1330
|
},
|
|
785
|
-
|
|
786
|
-
|
|
1331
|
+
addLinkTriggerText: {
|
|
1332
|
+
fontSize: 14,
|
|
1333
|
+
fontWeight: '600',
|
|
1334
|
+
color: '#007AFF',
|
|
1335
|
+
marginLeft: 6
|
|
1336
|
+
},
|
|
1337
|
+
linksList: {
|
|
1338
|
+
gap: 8
|
|
787
1339
|
},
|
|
788
|
-
|
|
1340
|
+
linksListTitle: {
|
|
789
1341
|
fontSize: 16,
|
|
790
|
-
fontWeight: '
|
|
1342
|
+
fontWeight: '700',
|
|
791
1343
|
color: '#333',
|
|
792
|
-
marginBottom:
|
|
1344
|
+
marginBottom: 6
|
|
1345
|
+
},
|
|
1346
|
+
linkItem: {
|
|
1347
|
+
backgroundColor: '#fff',
|
|
1348
|
+
borderRadius: 8,
|
|
1349
|
+
borderWidth: 1,
|
|
1350
|
+
borderColor: '#E9ECEF',
|
|
1351
|
+
overflow: 'hidden'
|
|
1352
|
+
},
|
|
1353
|
+
linkItemContent: {
|
|
1354
|
+
flexDirection: 'row',
|
|
1355
|
+
padding: 12,
|
|
1356
|
+
alignItems: 'center'
|
|
1357
|
+
},
|
|
1358
|
+
linkItemDragHandle: {
|
|
1359
|
+
width: 24,
|
|
1360
|
+
height: 24,
|
|
1361
|
+
alignItems: 'center',
|
|
1362
|
+
justifyContent: 'center',
|
|
1363
|
+
marginRight: 8
|
|
793
1364
|
},
|
|
794
|
-
|
|
1365
|
+
linkItemInfo: {
|
|
1366
|
+
flex: 1,
|
|
1367
|
+
marginRight: 8
|
|
1368
|
+
},
|
|
1369
|
+
linkItemTitle: {
|
|
795
1370
|
fontSize: 14,
|
|
796
|
-
|
|
1371
|
+
fontWeight: '600',
|
|
1372
|
+
color: '#333',
|
|
1373
|
+
marginBottom: 2
|
|
797
1374
|
},
|
|
798
|
-
|
|
799
|
-
|
|
1375
|
+
linkItemDescription: {
|
|
1376
|
+
fontSize: 12,
|
|
1377
|
+
color: '#666',
|
|
1378
|
+
marginBottom: 2
|
|
800
1379
|
},
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
1380
|
+
linkItemUrl: {
|
|
1381
|
+
fontSize: 12,
|
|
1382
|
+
color: '#6C757D'
|
|
804
1383
|
},
|
|
805
|
-
|
|
1384
|
+
linkItemActions: {
|
|
806
1385
|
flexDirection: 'row',
|
|
1386
|
+
gap: 6
|
|
1387
|
+
},
|
|
1388
|
+
linkItemButton: {
|
|
1389
|
+
width: 28,
|
|
1390
|
+
height: 28,
|
|
1391
|
+
borderRadius: 14,
|
|
1392
|
+
backgroundColor: '#F8F9FA',
|
|
1393
|
+
alignItems: 'center',
|
|
1394
|
+
justifyContent: 'center'
|
|
1395
|
+
},
|
|
1396
|
+
linkItemDivider: {
|
|
1397
|
+
height: 1,
|
|
1398
|
+
backgroundColor: '#E9ECEF',
|
|
1399
|
+
marginHorizontal: 12
|
|
1400
|
+
},
|
|
1401
|
+
reorderHint: {
|
|
1402
|
+
padding: 8,
|
|
807
1403
|
alignItems: 'center'
|
|
808
1404
|
},
|
|
809
|
-
|
|
810
|
-
|
|
1405
|
+
reorderHintText: {
|
|
1406
|
+
fontSize: 12,
|
|
1407
|
+
color: '#999',
|
|
1408
|
+
fontStyle: 'italic'
|
|
811
1409
|
},
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
1410
|
+
reorderButtons: {
|
|
1411
|
+
flexDirection: 'column',
|
|
1412
|
+
gap: 2
|
|
815
1413
|
},
|
|
816
|
-
|
|
817
|
-
|
|
1414
|
+
reorderButton: {
|
|
1415
|
+
width: 20,
|
|
1416
|
+
height: 16,
|
|
1417
|
+
borderRadius: 3,
|
|
1418
|
+
backgroundColor: '#F8F9FA',
|
|
1419
|
+
alignItems: 'center',
|
|
1420
|
+
justifyContent: 'center',
|
|
818
1421
|
borderWidth: 1,
|
|
819
|
-
borderColor: '#
|
|
820
|
-
borderRadius: 8,
|
|
821
|
-
padding: 12,
|
|
822
|
-
fontSize: 16,
|
|
823
|
-
minHeight: 44
|
|
1422
|
+
borderColor: '#E9ECEF'
|
|
824
1423
|
},
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
borderWidth: 1,
|
|
828
|
-
borderColor: '#e0e0e0',
|
|
829
|
-
borderRadius: 8,
|
|
830
|
-
padding: 12,
|
|
831
|
-
fontSize: 16,
|
|
832
|
-
minHeight: 100,
|
|
833
|
-
textAlignVertical: 'top'
|
|
1424
|
+
reorderButtonDisabled: {
|
|
1425
|
+
opacity: 0.3
|
|
834
1426
|
},
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
1427
|
+
linkItemImage: {
|
|
1428
|
+
width: 32,
|
|
1429
|
+
height: 32,
|
|
1430
|
+
borderRadius: 16,
|
|
1431
|
+
backgroundColor: '#007AFF',
|
|
1432
|
+
alignItems: 'center',
|
|
1433
|
+
justifyContent: 'center',
|
|
1434
|
+
marginRight: 8
|
|
838
1435
|
},
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
1436
|
+
linkItemImageText: {
|
|
1437
|
+
fontSize: 12,
|
|
1438
|
+
fontWeight: '600',
|
|
1439
|
+
color: '#fff'
|
|
843
1440
|
},
|
|
844
|
-
|
|
845
|
-
|
|
1441
|
+
fetchingText: {
|
|
1442
|
+
fontSize: 12,
|
|
1443
|
+
color: '#007AFF',
|
|
1444
|
+
fontStyle: 'italic'
|
|
846
1445
|
},
|
|
847
|
-
|
|
1446
|
+
linksFieldContent: {
|
|
1447
|
+
flex: 1,
|
|
1448
|
+
marginLeft: 12
|
|
1449
|
+
},
|
|
1450
|
+
linksPreview: {
|
|
1451
|
+
marginTop: 4,
|
|
1452
|
+
flexDirection: 'column'
|
|
1453
|
+
},
|
|
1454
|
+
linksPreviewContainer: {
|
|
1455
|
+
marginTop: 4,
|
|
1456
|
+
flexDirection: 'column',
|
|
1457
|
+
width: '100%'
|
|
1458
|
+
},
|
|
1459
|
+
linkPreviewItem: {
|
|
848
1460
|
flexDirection: 'row',
|
|
849
|
-
alignItems: 'center'
|
|
1461
|
+
alignItems: 'center',
|
|
1462
|
+
marginBottom: 4
|
|
850
1463
|
},
|
|
851
|
-
|
|
852
|
-
|
|
1464
|
+
linkPreviewImage: {
|
|
1465
|
+
width: 20,
|
|
1466
|
+
height: 20,
|
|
1467
|
+
borderRadius: 10,
|
|
1468
|
+
backgroundColor: '#007AFF',
|
|
1469
|
+
alignItems: 'center',
|
|
1470
|
+
justifyContent: 'center',
|
|
1471
|
+
marginRight: 6
|
|
853
1472
|
},
|
|
854
|
-
|
|
855
|
-
fontSize:
|
|
1473
|
+
linkPreviewImageText: {
|
|
1474
|
+
fontSize: 10,
|
|
856
1475
|
fontWeight: '600',
|
|
857
|
-
color: '#
|
|
1476
|
+
color: '#fff'
|
|
858
1477
|
},
|
|
859
|
-
|
|
1478
|
+
linkPreviewTitle: {
|
|
1479
|
+
fontSize: 13,
|
|
1480
|
+
color: '#666',
|
|
860
1481
|
flex: 1
|
|
861
1482
|
},
|
|
862
|
-
|
|
1483
|
+
linkPreviewContent: {
|
|
863
1484
|
flex: 1
|
|
864
1485
|
},
|
|
865
|
-
|
|
866
|
-
fontSize:
|
|
1486
|
+
linkPreviewSubtitle: {
|
|
1487
|
+
fontSize: 11,
|
|
1488
|
+
color: '#999',
|
|
1489
|
+
marginTop: 1
|
|
1490
|
+
},
|
|
1491
|
+
linkPreviewMore: {
|
|
1492
|
+
fontSize: 12,
|
|
1493
|
+
color: '#999',
|
|
1494
|
+
fontStyle: 'italic'
|
|
1495
|
+
},
|
|
1496
|
+
// Location management styles
|
|
1497
|
+
addLocationSection: {
|
|
1498
|
+
marginBottom: 16
|
|
1499
|
+
},
|
|
1500
|
+
addLocationLabel: {
|
|
1501
|
+
fontSize: 14,
|
|
867
1502
|
fontWeight: '600',
|
|
868
1503
|
color: '#333',
|
|
869
|
-
marginBottom:
|
|
1504
|
+
marginBottom: 8,
|
|
870
1505
|
fontFamily: _fonts.fontFamilies.phuduSemiBold
|
|
871
1506
|
},
|
|
872
|
-
|
|
1507
|
+
searchingText: {
|
|
1508
|
+
fontSize: 12,
|
|
1509
|
+
color: '#007AFF',
|
|
1510
|
+
fontStyle: 'italic'
|
|
1511
|
+
},
|
|
1512
|
+
addLocationInputContainer: {
|
|
1513
|
+
marginBottom: 8
|
|
1514
|
+
},
|
|
1515
|
+
addLocationInput: {
|
|
873
1516
|
backgroundColor: '#fff',
|
|
874
1517
|
borderWidth: 2,
|
|
875
1518
|
borderColor: '#e0e0e0',
|
|
@@ -877,18 +1520,129 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
877
1520
|
padding: 16,
|
|
878
1521
|
fontSize: 17,
|
|
879
1522
|
minHeight: 52,
|
|
880
|
-
fontWeight: '400'
|
|
1523
|
+
fontWeight: '400',
|
|
1524
|
+
marginBottom: 8
|
|
881
1525
|
},
|
|
882
|
-
|
|
1526
|
+
addLocationButtons: {
|
|
1527
|
+
flexDirection: 'row',
|
|
1528
|
+
gap: 8
|
|
1529
|
+
},
|
|
1530
|
+
addLocationButton: {
|
|
1531
|
+
flex: 1,
|
|
1532
|
+
paddingVertical: 12,
|
|
1533
|
+
paddingHorizontal: 16,
|
|
1534
|
+
borderRadius: 8,
|
|
1535
|
+
alignItems: 'center',
|
|
1536
|
+
justifyContent: 'center'
|
|
1537
|
+
},
|
|
1538
|
+
addLocationTrigger: {
|
|
1539
|
+
flexDirection: 'row',
|
|
1540
|
+
alignItems: 'center',
|
|
1541
|
+
paddingVertical: 12,
|
|
1542
|
+
paddingHorizontal: 16,
|
|
1543
|
+
backgroundColor: '#F8F9FA',
|
|
1544
|
+
borderRadius: 8,
|
|
1545
|
+
marginBottom: 16
|
|
1546
|
+
},
|
|
1547
|
+
addLocationTriggerText: {
|
|
1548
|
+
marginLeft: 8,
|
|
1549
|
+
fontSize: 16,
|
|
1550
|
+
color: '#007AFF',
|
|
1551
|
+
fontWeight: '500'
|
|
1552
|
+
},
|
|
1553
|
+
searchResults: {
|
|
883
1554
|
backgroundColor: '#fff',
|
|
884
|
-
borderWidth:
|
|
1555
|
+
borderWidth: 1,
|
|
885
1556
|
borderColor: '#e0e0e0',
|
|
886
|
-
borderRadius:
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
1557
|
+
borderRadius: 8,
|
|
1558
|
+
maxHeight: 200
|
|
1559
|
+
},
|
|
1560
|
+
searchResultItem: {
|
|
1561
|
+
padding: 12,
|
|
1562
|
+
borderBottomWidth: 1,
|
|
1563
|
+
borderBottomColor: '#f0f0f0'
|
|
1564
|
+
},
|
|
1565
|
+
searchResultName: {
|
|
1566
|
+
fontSize: 14,
|
|
1567
|
+
fontWeight: '500',
|
|
1568
|
+
color: '#333',
|
|
1569
|
+
marginBottom: 2
|
|
1570
|
+
},
|
|
1571
|
+
searchResultType: {
|
|
1572
|
+
fontSize: 12,
|
|
1573
|
+
color: '#666',
|
|
1574
|
+
textTransform: 'capitalize'
|
|
1575
|
+
},
|
|
1576
|
+
locationsList: {
|
|
1577
|
+
marginTop: 8
|
|
1578
|
+
},
|
|
1579
|
+
locationsListTitle: {
|
|
1580
|
+
fontSize: 14,
|
|
1581
|
+
fontWeight: '600',
|
|
1582
|
+
color: '#333',
|
|
1583
|
+
marginBottom: 12,
|
|
1584
|
+
fontFamily: _fonts.fontFamilies.phuduSemiBold
|
|
1585
|
+
},
|
|
1586
|
+
locationItem: {
|
|
1587
|
+
marginBottom: 8
|
|
1588
|
+
},
|
|
1589
|
+
locationItemContent: {
|
|
1590
|
+
flexDirection: 'row',
|
|
1591
|
+
alignItems: 'center',
|
|
1592
|
+
padding: 12,
|
|
1593
|
+
backgroundColor: '#F8F9FA',
|
|
1594
|
+
borderRadius: 8
|
|
1595
|
+
},
|
|
1596
|
+
locationItemDragHandle: {
|
|
1597
|
+
marginRight: 12
|
|
1598
|
+
},
|
|
1599
|
+
locationItemInfo: {
|
|
1600
|
+
flex: 1
|
|
1601
|
+
},
|
|
1602
|
+
locationItemHeader: {
|
|
1603
|
+
flexDirection: 'row',
|
|
1604
|
+
alignItems: 'center',
|
|
1605
|
+
marginBottom: 4
|
|
1606
|
+
},
|
|
1607
|
+
locationItemName: {
|
|
1608
|
+
fontSize: 14,
|
|
1609
|
+
fontWeight: '500',
|
|
1610
|
+
color: '#333',
|
|
1611
|
+
flex: 1
|
|
1612
|
+
},
|
|
1613
|
+
locationLabel: {
|
|
1614
|
+
backgroundColor: '#007AFF',
|
|
1615
|
+
paddingHorizontal: 6,
|
|
1616
|
+
paddingVertical: 2,
|
|
1617
|
+
borderRadius: 4,
|
|
1618
|
+
marginLeft: 8
|
|
1619
|
+
},
|
|
1620
|
+
locationLabelText: {
|
|
1621
|
+
fontSize: 10,
|
|
1622
|
+
fontWeight: '600',
|
|
1623
|
+
color: '#fff',
|
|
1624
|
+
textTransform: 'uppercase'
|
|
1625
|
+
},
|
|
1626
|
+
locationCoordinates: {
|
|
1627
|
+
fontSize: 12,
|
|
1628
|
+
color: '#666',
|
|
1629
|
+
fontFamily: 'monospace'
|
|
1630
|
+
},
|
|
1631
|
+
locationItemActions: {
|
|
1632
|
+
marginLeft: 8
|
|
1633
|
+
},
|
|
1634
|
+
locationItemButton: {
|
|
1635
|
+
width: 28,
|
|
1636
|
+
height: 28,
|
|
1637
|
+
borderRadius: 14,
|
|
1638
|
+
backgroundColor: '#F8F9FA',
|
|
1639
|
+
alignItems: 'center',
|
|
1640
|
+
justifyContent: 'center'
|
|
1641
|
+
},
|
|
1642
|
+
locationItemDivider: {
|
|
1643
|
+
height: 1,
|
|
1644
|
+
backgroundColor: '#E9ECEF',
|
|
1645
|
+
marginHorizontal: 12
|
|
892
1646
|
}
|
|
893
1647
|
});
|
|
894
1648
|
var _default = exports.default = /*#__PURE__*/_react.default.memo(AccountSettingsScreen);
|