@oxyhq/services 5.21.6 → 5.22.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.
Files changed (478) hide show
  1. package/README.md +201 -2
  2. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  3. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  4. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  5. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  6. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  7. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  8. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  9. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  10. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  11. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  12. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  13. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  14. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  15. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  16. package/lib/commonjs/core/HttpService.js +87 -2
  17. package/lib/commonjs/core/HttpService.js.map +1 -1
  18. package/lib/commonjs/core/mixins/OxyServices.assets.js +3 -1
  19. package/lib/commonjs/core/mixins/OxyServices.assets.js.map +1 -1
  20. package/lib/commonjs/crypto/keyManager.js +67 -22
  21. package/lib/commonjs/crypto/keyManager.js.map +1 -1
  22. package/lib/commonjs/i18n/locales/en-US.json +3 -3
  23. package/lib/commonjs/i18n/locales/es-ES.json +240 -19
  24. package/lib/commonjs/index.js +66 -0
  25. package/lib/commonjs/index.js.map +1 -1
  26. package/lib/commonjs/ui/components/Avatar.js +1 -1
  27. package/lib/commonjs/ui/components/Avatar.js.map +1 -1
  28. package/lib/commonjs/ui/components/FollowButton.js +1 -1
  29. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  30. package/lib/commonjs/ui/components/FontLoader.js +34 -34
  31. package/lib/commonjs/ui/components/FontLoader.js.map +1 -1
  32. package/lib/commonjs/ui/components/Header.js +4 -4
  33. package/lib/commonjs/ui/components/Header.js.map +1 -1
  34. package/lib/commonjs/ui/components/OxyPayButton.js +1 -1
  35. package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -1
  36. package/lib/commonjs/ui/components/OxySignInButton.js +2 -1
  37. package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
  38. package/lib/commonjs/ui/components/ProfileCard.js +1 -1
  39. package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
  40. package/lib/commonjs/ui/components/SectionTitle.js +1 -1
  41. package/lib/commonjs/ui/components/SectionTitle.js.map +1 -1
  42. package/lib/commonjs/ui/components/StepBasedScreen.js +2 -1
  43. package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -1
  44. package/lib/commonjs/ui/components/feedback/feedbackStyles.js +2 -1
  45. package/lib/commonjs/ui/components/feedback/feedbackStyles.js.map +1 -1
  46. package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js +57 -0
  47. package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js.map +1 -0
  48. package/lib/commonjs/ui/components/fileManagement/styles.js +17 -17
  49. package/lib/commonjs/ui/components/fileManagement/styles.js.map +1 -1
  50. package/lib/commonjs/ui/components/payment/paymentStyles.js +7 -7
  51. package/lib/commonjs/ui/components/payment/paymentStyles.js.map +1 -1
  52. package/lib/commonjs/ui/hooks/mutations/mutationFactory.js +177 -0
  53. package/lib/commonjs/ui/hooks/mutations/mutationFactory.js.map +1 -0
  54. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +10 -123
  55. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  56. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +2 -32
  57. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
  58. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +2 -31
  59. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
  60. package/lib/commonjs/ui/hooks/useFileFiltering.js +76 -0
  61. package/lib/commonjs/ui/hooks/useFileFiltering.js.map +1 -0
  62. package/lib/commonjs/ui/navigation/routes.js +2 -0
  63. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  64. package/lib/commonjs/ui/screens/AccountCenterScreen.js +4 -2
  65. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  66. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +13 -5
  67. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  68. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +273 -1820
  69. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  70. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +1 -1
  71. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  72. package/lib/commonjs/ui/screens/AccountVerificationScreen.js +3 -1
  73. package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
  74. package/lib/commonjs/ui/screens/AppInfoScreen.js +2 -2
  75. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  76. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +640 -0
  77. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -0
  78. package/lib/commonjs/ui/screens/FileManagementScreen.js +41 -23
  79. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  80. package/lib/commonjs/ui/screens/HistoryViewScreen.js +9 -3
  81. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  82. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +4 -2
  83. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  84. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +3 -1
  85. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
  86. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +11 -12
  87. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  88. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +12 -4
  89. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  90. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +3 -1
  91. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  92. package/lib/commonjs/ui/screens/SessionManagementScreen.js +15 -5
  93. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
  94. package/lib/commonjs/ui/screens/UserLinksScreen.js +3 -1
  95. package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
  96. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +2 -1
  97. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  98. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +2 -4
  99. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  100. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +3 -3
  101. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  102. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +3 -3
  103. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  104. package/lib/commonjs/ui/styles/authStyles.js +5 -4
  105. package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
  106. package/lib/commonjs/ui/styles/fonts.js +27 -27
  107. package/lib/commonjs/ui/styles/fonts.js.map +1 -1
  108. package/lib/commonjs/ui/styles/theme.js +3 -3
  109. package/lib/commonjs/ui/styles/theme.js.map +1 -1
  110. package/lib/commonjs/ui/utils/authHelpers.js +164 -0
  111. package/lib/commonjs/ui/utils/authHelpers.js.map +1 -0
  112. package/lib/commonjs/ui/utils/avatarUtils.js +18 -61
  113. package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
  114. package/lib/commonjs/web.js +682 -0
  115. package/lib/commonjs/web.js.map +1 -0
  116. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  117. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  118. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  119. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  120. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  121. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  122. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  123. package/lib/module/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  124. package/lib/module/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  125. package/lib/module/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  126. package/lib/module/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  127. package/lib/module/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  128. package/lib/module/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  129. package/lib/module/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  130. package/lib/module/core/HttpService.js +87 -2
  131. package/lib/module/core/HttpService.js.map +1 -1
  132. package/lib/module/core/mixins/OxyServices.assets.js +3 -1
  133. package/lib/module/core/mixins/OxyServices.assets.js.map +1 -1
  134. package/lib/module/crypto/keyManager.js +67 -22
  135. package/lib/module/crypto/keyManager.js.map +1 -1
  136. package/lib/module/i18n/locales/en-US.json +3 -3
  137. package/lib/module/i18n/locales/es-ES.json +240 -19
  138. package/lib/module/index.js +6 -0
  139. package/lib/module/index.js.map +1 -1
  140. package/lib/module/ui/components/Avatar.js +1 -1
  141. package/lib/module/ui/components/Avatar.js.map +1 -1
  142. package/lib/module/ui/components/FollowButton.js +1 -1
  143. package/lib/module/ui/components/FollowButton.js.map +1 -1
  144. package/lib/module/ui/components/FontLoader.js +34 -34
  145. package/lib/module/ui/components/FontLoader.js.map +1 -1
  146. package/lib/module/ui/components/Header.js +4 -4
  147. package/lib/module/ui/components/Header.js.map +1 -1
  148. package/lib/module/ui/components/OxyPayButton.js +1 -1
  149. package/lib/module/ui/components/OxyPayButton.js.map +1 -1
  150. package/lib/module/ui/components/OxySignInButton.js +2 -1
  151. package/lib/module/ui/components/OxySignInButton.js.map +1 -1
  152. package/lib/module/ui/components/ProfileCard.js +1 -1
  153. package/lib/module/ui/components/ProfileCard.js.map +1 -1
  154. package/lib/module/ui/components/SectionTitle.js +1 -1
  155. package/lib/module/ui/components/SectionTitle.js.map +1 -1
  156. package/lib/module/ui/components/StepBasedScreen.js +2 -1
  157. package/lib/module/ui/components/StepBasedScreen.js.map +1 -1
  158. package/lib/module/ui/components/feedback/feedbackStyles.js +2 -1
  159. package/lib/module/ui/components/feedback/feedbackStyles.js.map +1 -1
  160. package/lib/module/ui/components/fileManagement/AnimatedButton.js +50 -0
  161. package/lib/module/ui/components/fileManagement/AnimatedButton.js.map +1 -0
  162. package/lib/module/ui/components/fileManagement/styles.js +17 -17
  163. package/lib/module/ui/components/fileManagement/styles.js.map +1 -1
  164. package/lib/module/ui/components/payment/paymentStyles.js +7 -7
  165. package/lib/module/ui/components/payment/paymentStyles.js.map +1 -1
  166. package/lib/module/ui/hooks/mutations/mutationFactory.js +173 -0
  167. package/lib/module/ui/hooks/mutations/mutationFactory.js.map +1 -0
  168. package/lib/module/ui/hooks/mutations/useAccountMutations.js +10 -122
  169. package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  170. package/lib/module/ui/hooks/queries/useAccountQueries.js +2 -32
  171. package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
  172. package/lib/module/ui/hooks/queries/useServicesQueries.js +2 -31
  173. package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
  174. package/lib/module/ui/hooks/useFileFiltering.js +72 -0
  175. package/lib/module/ui/hooks/useFileFiltering.js.map +1 -0
  176. package/lib/module/ui/navigation/routes.js +2 -0
  177. package/lib/module/ui/navigation/routes.js.map +1 -1
  178. package/lib/module/ui/screens/AccountCenterScreen.js +4 -2
  179. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  180. package/lib/module/ui/screens/AccountOverviewScreen.js +13 -5
  181. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  182. package/lib/module/ui/screens/AccountSettingsScreen.js +277 -1824
  183. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  184. package/lib/module/ui/screens/AccountSwitcherScreen.js +1 -1
  185. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  186. package/lib/module/ui/screens/AccountVerificationScreen.js +3 -1
  187. package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
  188. package/lib/module/ui/screens/AppInfoScreen.js +2 -2
  189. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  190. package/lib/module/ui/screens/EditProfileFieldScreen.js +635 -0
  191. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -0
  192. package/lib/module/ui/screens/FileManagementScreen.js +41 -23
  193. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  194. package/lib/module/ui/screens/HistoryViewScreen.js +9 -3
  195. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  196. package/lib/module/ui/screens/LanguageSelectorScreen.js +4 -2
  197. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  198. package/lib/module/ui/screens/LegalDocumentsScreen.js +3 -1
  199. package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
  200. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +11 -12
  201. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  202. package/lib/module/ui/screens/PrivacySettingsScreen.js +12 -4
  203. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  204. package/lib/module/ui/screens/SearchSettingsScreen.js +3 -1
  205. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  206. package/lib/module/ui/screens/SessionManagementScreen.js +15 -5
  207. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
  208. package/lib/module/ui/screens/UserLinksScreen.js +3 -1
  209. package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
  210. package/lib/module/ui/screens/WelcomeNewUserScreen.js +2 -1
  211. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  212. package/lib/module/ui/screens/karma/KarmaAboutScreen.js +2 -4
  213. package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  214. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +3 -3
  215. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  216. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +3 -3
  217. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  218. package/lib/module/ui/styles/authStyles.js +5 -4
  219. package/lib/module/ui/styles/authStyles.js.map +1 -1
  220. package/lib/module/ui/styles/fonts.js +27 -27
  221. package/lib/module/ui/styles/fonts.js.map +1 -1
  222. package/lib/module/ui/styles/theme.js +3 -3
  223. package/lib/module/ui/styles/theme.js.map +1 -1
  224. package/lib/module/ui/utils/authHelpers.js +154 -0
  225. package/lib/module/ui/utils/authHelpers.js.map +1 -0
  226. package/lib/module/ui/utils/avatarUtils.js +18 -61
  227. package/lib/module/ui/utils/avatarUtils.js.map +1 -1
  228. package/lib/module/web.js +75 -0
  229. package/lib/module/web.js.map +1 -0
  230. package/lib/typescript/commonjs/core/HttpService.d.ts +5 -0
  231. package/lib/typescript/commonjs/core/HttpService.d.ts.map +1 -1
  232. package/lib/typescript/commonjs/crypto/keyManager.d.ts.map +1 -1
  233. package/lib/typescript/commonjs/index.d.ts +6 -0
  234. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  235. package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
  236. package/lib/typescript/commonjs/ui/components/StepBasedScreen.d.ts.map +1 -1
  237. package/lib/typescript/commonjs/ui/components/feedback/feedbackStyles.d.ts.map +1 -1
  238. package/lib/typescript/commonjs/ui/components/fileManagement/AnimatedButton.d.ts +16 -0
  239. package/lib/typescript/commonjs/ui/components/fileManagement/AnimatedButton.d.ts.map +1 -0
  240. package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts +76 -0
  241. package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts.map +1 -0
  242. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +29 -4
  243. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  244. package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts +1 -1
  245. package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  246. package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts +1 -1
  247. package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  248. package/lib/typescript/commonjs/ui/hooks/useFileFiltering.d.ts +29 -0
  249. package/lib/typescript/commonjs/ui/hooks/useFileFiltering.d.ts.map +1 -0
  250. package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
  251. package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  253. package/lib/typescript/commonjs/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  254. package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  255. package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  256. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts +13 -0
  257. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -0
  258. package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
  259. package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  261. package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  262. package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  263. package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  264. package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  265. package/lib/typescript/commonjs/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  266. package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
  267. package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  268. package/lib/typescript/commonjs/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
  269. package/lib/typescript/commonjs/ui/styles/fonts.d.ts +7 -7
  270. package/lib/typescript/commonjs/ui/styles/theme.d.ts.map +1 -1
  271. package/lib/typescript/commonjs/ui/utils/authHelpers.d.ts +99 -0
  272. package/lib/typescript/commonjs/ui/utils/authHelpers.d.ts.map +1 -0
  273. package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts.map +1 -1
  274. package/lib/typescript/commonjs/web.d.ts +54 -0
  275. package/lib/typescript/commonjs/web.d.ts.map +1 -0
  276. package/lib/typescript/module/core/HttpService.d.ts +5 -0
  277. package/lib/typescript/module/core/HttpService.d.ts.map +1 -1
  278. package/lib/typescript/module/crypto/keyManager.d.ts.map +1 -1
  279. package/lib/typescript/module/index.d.ts +6 -0
  280. package/lib/typescript/module/index.d.ts.map +1 -1
  281. package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
  282. package/lib/typescript/module/ui/components/StepBasedScreen.d.ts.map +1 -1
  283. package/lib/typescript/module/ui/components/feedback/feedbackStyles.d.ts.map +1 -1
  284. package/lib/typescript/module/ui/components/fileManagement/AnimatedButton.d.ts +16 -0
  285. package/lib/typescript/module/ui/components/fileManagement/AnimatedButton.d.ts.map +1 -0
  286. package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts +76 -0
  287. package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts.map +1 -0
  288. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +29 -4
  289. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  290. package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts +1 -1
  291. package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  292. package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts +1 -1
  293. package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  294. package/lib/typescript/module/ui/hooks/useFileFiltering.d.ts +29 -0
  295. package/lib/typescript/module/ui/hooks/useFileFiltering.d.ts.map +1 -0
  296. package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
  297. package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
  298. package/lib/typescript/module/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  299. package/lib/typescript/module/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  300. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  301. package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  302. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts +13 -0
  303. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -0
  304. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
  305. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  306. package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  307. package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  308. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  309. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  310. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  311. package/lib/typescript/module/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  312. package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
  313. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  314. package/lib/typescript/module/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
  315. package/lib/typescript/module/ui/styles/fonts.d.ts +7 -7
  316. package/lib/typescript/module/ui/styles/theme.d.ts.map +1 -1
  317. package/lib/typescript/module/ui/utils/authHelpers.d.ts +99 -0
  318. package/lib/typescript/module/ui/utils/authHelpers.d.ts.map +1 -0
  319. package/lib/typescript/module/ui/utils/avatarUtils.d.ts.map +1 -1
  320. package/lib/typescript/module/web.d.ts +54 -0
  321. package/lib/typescript/module/web.d.ts.map +1 -0
  322. package/package.json +27 -41
  323. package/src/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  324. package/src/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  325. package/src/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  326. package/src/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  327. package/src/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  328. package/src/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  329. package/src/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  330. package/src/core/HttpService.ts +91 -0
  331. package/src/core/mixins/OxyServices.assets.ts +1 -1
  332. package/src/crypto/keyManager.ts +23 -22
  333. package/src/i18n/locales/en-US.json +3 -3
  334. package/src/i18n/locales/es-ES.json +240 -19
  335. package/src/index.ts +25 -0
  336. package/src/ui/components/Avatar.tsx +1 -1
  337. package/src/ui/components/FollowButton.tsx +1 -1
  338. package/src/ui/components/FontLoader.tsx +34 -34
  339. package/src/ui/components/Header.tsx +4 -4
  340. package/src/ui/components/OxyPayButton.tsx +1 -1
  341. package/src/ui/components/OxySignInButton.tsx +2 -1
  342. package/src/ui/components/ProfileCard.tsx +1 -1
  343. package/src/ui/components/SectionTitle.tsx +1 -1
  344. package/src/ui/components/StepBasedScreen.tsx +2 -1
  345. package/src/ui/components/feedback/feedbackStyles.ts +2 -1
  346. package/src/ui/components/fileManagement/AnimatedButton.tsx +56 -0
  347. package/src/ui/components/fileManagement/styles.ts +17 -17
  348. package/src/ui/components/payment/paymentStyles.ts +7 -7
  349. package/src/ui/hooks/mutations/mutationFactory.ts +215 -0
  350. package/src/ui/hooks/mutations/useAccountMutations.ts +48 -136
  351. package/src/ui/hooks/queries/useAccountQueries.ts +6 -33
  352. package/src/ui/hooks/queries/useServicesQueries.ts +6 -32
  353. package/src/ui/hooks/useFileFiltering.ts +115 -0
  354. package/src/ui/navigation/routes.ts +3 -0
  355. package/src/ui/screens/AccountCenterScreen.tsx +4 -2
  356. package/src/ui/screens/AccountOverviewScreen.tsx +13 -5
  357. package/src/ui/screens/AccountSettingsScreen.tsx +35 -1511
  358. package/src/ui/screens/AccountSwitcherScreen.tsx +1 -1
  359. package/src/ui/screens/AccountVerificationScreen.tsx +3 -1
  360. package/src/ui/screens/AppInfoScreen.tsx +2 -2
  361. package/src/ui/screens/EditProfileFieldScreen.tsx +685 -0
  362. package/src/ui/screens/FileManagementScreen.tsx +35 -17
  363. package/src/ui/screens/HistoryViewScreen.tsx +9 -3
  364. package/src/ui/screens/LanguageSelectorScreen.tsx +4 -2
  365. package/src/ui/screens/LegalDocumentsScreen.tsx +3 -1
  366. package/src/ui/screens/PremiumSubscriptionScreen.tsx +11 -13
  367. package/src/ui/screens/PrivacySettingsScreen.tsx +12 -4
  368. package/src/ui/screens/SearchSettingsScreen.tsx +3 -1
  369. package/src/ui/screens/SessionManagementScreen.tsx +15 -5
  370. package/src/ui/screens/UserLinksScreen.tsx +3 -1
  371. package/src/ui/screens/WelcomeNewUserScreen.tsx +2 -1
  372. package/src/ui/screens/karma/KarmaAboutScreen.tsx +6 -8
  373. package/src/ui/screens/karma/KarmaCenterScreen.tsx +3 -3
  374. package/src/ui/screens/karma/KarmaRewardsScreen.tsx +3 -3
  375. package/src/ui/styles/authStyles.ts +4 -4
  376. package/src/ui/styles/fonts.ts +26 -26
  377. package/src/ui/styles/theme.ts +3 -5
  378. package/src/ui/utils/authHelpers.ts +183 -0
  379. package/src/ui/utils/avatarUtils.ts +25 -65
  380. package/src/web.ts +230 -0
  381. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  382. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  383. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  384. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  385. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  386. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  387. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  388. package/lib/commonjs/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  389. package/lib/commonjs/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  390. package/lib/commonjs/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  391. package/lib/commonjs/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  392. package/lib/commonjs/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  393. package/lib/commonjs/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  394. package/lib/commonjs/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  395. package/lib/commonjs/ui/components/profile/EditBioModal.js +0 -181
  396. package/lib/commonjs/ui/components/profile/EditBioModal.js.map +0 -1
  397. package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js +0 -204
  398. package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js.map +0 -1
  399. package/lib/commonjs/ui/components/profile/EditEmailModal.js +0 -184
  400. package/lib/commonjs/ui/components/profile/EditEmailModal.js.map +0 -1
  401. package/lib/commonjs/ui/components/profile/EditFieldModal.js +0 -412
  402. package/lib/commonjs/ui/components/profile/EditFieldModal.js.map +0 -1
  403. package/lib/commonjs/ui/components/profile/EditLinksModal.js +0 -315
  404. package/lib/commonjs/ui/components/profile/EditLinksModal.js.map +0 -1
  405. package/lib/commonjs/ui/components/profile/EditLocationModal.js +0 -273
  406. package/lib/commonjs/ui/components/profile/EditLocationModal.js.map +0 -1
  407. package/lib/commonjs/ui/components/profile/EditUsernameModal.js +0 -180
  408. package/lib/commonjs/ui/components/profile/EditUsernameModal.js.map +0 -1
  409. package/lib/module/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  410. package/lib/module/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  411. package/lib/module/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  412. package/lib/module/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  413. package/lib/module/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  414. package/lib/module/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  415. package/lib/module/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  416. package/lib/module/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  417. package/lib/module/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  418. package/lib/module/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  419. package/lib/module/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  420. package/lib/module/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  421. package/lib/module/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  422. package/lib/module/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  423. package/lib/module/ui/components/profile/EditBioModal.js +0 -175
  424. package/lib/module/ui/components/profile/EditBioModal.js.map +0 -1
  425. package/lib/module/ui/components/profile/EditDisplayNameModal.js +0 -198
  426. package/lib/module/ui/components/profile/EditDisplayNameModal.js.map +0 -1
  427. package/lib/module/ui/components/profile/EditEmailModal.js +0 -178
  428. package/lib/module/ui/components/profile/EditEmailModal.js.map +0 -1
  429. package/lib/module/ui/components/profile/EditFieldModal.js +0 -406
  430. package/lib/module/ui/components/profile/EditFieldModal.js.map +0 -1
  431. package/lib/module/ui/components/profile/EditLinksModal.js +0 -309
  432. package/lib/module/ui/components/profile/EditLinksModal.js.map +0 -1
  433. package/lib/module/ui/components/profile/EditLocationModal.js +0 -267
  434. package/lib/module/ui/components/profile/EditLocationModal.js.map +0 -1
  435. package/lib/module/ui/components/profile/EditUsernameModal.js +0 -174
  436. package/lib/module/ui/components/profile/EditUsernameModal.js.map +0 -1
  437. package/lib/typescript/commonjs/ui/components/profile/EditBioModal.d.ts +0 -11
  438. package/lib/typescript/commonjs/ui/components/profile/EditBioModal.d.ts.map +0 -1
  439. package/lib/typescript/commonjs/ui/components/profile/EditDisplayNameModal.d.ts +0 -12
  440. package/lib/typescript/commonjs/ui/components/profile/EditDisplayNameModal.d.ts.map +0 -1
  441. package/lib/typescript/commonjs/ui/components/profile/EditEmailModal.d.ts +0 -11
  442. package/lib/typescript/commonjs/ui/components/profile/EditEmailModal.d.ts.map +0 -1
  443. package/lib/typescript/commonjs/ui/components/profile/EditFieldModal.d.ts +0 -110
  444. package/lib/typescript/commonjs/ui/components/profile/EditFieldModal.d.ts.map +0 -1
  445. package/lib/typescript/commonjs/ui/components/profile/EditLinksModal.d.ts +0 -18
  446. package/lib/typescript/commonjs/ui/components/profile/EditLinksModal.d.ts.map +0 -1
  447. package/lib/typescript/commonjs/ui/components/profile/EditLocationModal.d.ts +0 -20
  448. package/lib/typescript/commonjs/ui/components/profile/EditLocationModal.d.ts.map +0 -1
  449. package/lib/typescript/commonjs/ui/components/profile/EditUsernameModal.d.ts +0 -11
  450. package/lib/typescript/commonjs/ui/components/profile/EditUsernameModal.d.ts.map +0 -1
  451. package/lib/typescript/module/ui/components/profile/EditBioModal.d.ts +0 -11
  452. package/lib/typescript/module/ui/components/profile/EditBioModal.d.ts.map +0 -1
  453. package/lib/typescript/module/ui/components/profile/EditDisplayNameModal.d.ts +0 -12
  454. package/lib/typescript/module/ui/components/profile/EditDisplayNameModal.d.ts.map +0 -1
  455. package/lib/typescript/module/ui/components/profile/EditEmailModal.d.ts +0 -11
  456. package/lib/typescript/module/ui/components/profile/EditEmailModal.d.ts.map +0 -1
  457. package/lib/typescript/module/ui/components/profile/EditFieldModal.d.ts +0 -110
  458. package/lib/typescript/module/ui/components/profile/EditFieldModal.d.ts.map +0 -1
  459. package/lib/typescript/module/ui/components/profile/EditLinksModal.d.ts +0 -18
  460. package/lib/typescript/module/ui/components/profile/EditLinksModal.d.ts.map +0 -1
  461. package/lib/typescript/module/ui/components/profile/EditLocationModal.d.ts +0 -20
  462. package/lib/typescript/module/ui/components/profile/EditLocationModal.d.ts.map +0 -1
  463. package/lib/typescript/module/ui/components/profile/EditUsernameModal.d.ts +0 -11
  464. package/lib/typescript/module/ui/components/profile/EditUsernameModal.d.ts.map +0 -1
  465. package/src/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  466. package/src/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  467. package/src/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  468. package/src/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  469. package/src/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  470. package/src/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  471. package/src/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  472. package/src/ui/components/profile/EditBioModal.tsx +0 -184
  473. package/src/ui/components/profile/EditDisplayNameModal.tsx +0 -203
  474. package/src/ui/components/profile/EditEmailModal.tsx +0 -188
  475. package/src/ui/components/profile/EditFieldModal.tsx +0 -465
  476. package/src/ui/components/profile/EditLinksModal.tsx +0 -316
  477. package/src/ui/components/profile/EditLocationModal.tsx +0 -278
  478. package/src/ui/components/profile/EditUsernameModal.tsx +0 -183
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  import React, { useState, useEffect, useRef, useMemo, useCallback } from 'react';
4
- import { View, Text, TouchableOpacity, StyleSheet, ActivityIndicator, ScrollView, TextInput, Animated, Platform, Image } from 'react-native';
5
- import OxyIcon from "../components/icon/OxyIcon.js";
6
- import { Ionicons } from '@expo/vector-icons';
7
- // @ts-ignore - MaterialCommunityIcons is available at runtime
8
- import { MaterialCommunityIcons } from '@expo/vector-icons';
4
+ import { View, Text, StyleSheet, ActivityIndicator, ScrollView, Animated, Platform, Image } from 'react-native';
9
5
  import { toast } from "../../lib/sonner.js";
10
6
  import { fontFamilies } from "../styles/fonts.js";
11
7
  import { confirmAction } from "../utils/confirmAction.js";
@@ -15,26 +11,13 @@ import { useI18n } from "../hooks/useI18n.js";
15
11
  import { useThemeStyles } from "../hooks/useThemeStyles.js";
16
12
  import { useColorScheme } from "../hooks/use-color-scheme.js";
17
13
  import { Colors } from "../constants/theme.js";
18
- import { normalizeColorScheme, normalizeTheme } from "../utils/themeUtils.js";
19
- import { EditDisplayNameModal } from "../components/profile/EditDisplayNameModal.js";
20
- import { EditUsernameModal } from "../components/profile/EditUsernameModal.js";
21
- import { EditEmailModal } from "../components/profile/EditEmailModal.js";
22
- import { EditBioModal } from "../components/profile/EditBioModal.js";
23
- import { EditLocationModal } from "../components/profile/EditLocationModal.js";
24
- import { EditLinksModal } from "../components/profile/EditLinksModal.js";
14
+ import { normalizeColorScheme } from "../utils/themeUtils.js";
25
15
  import { getDisplayName } from "../utils/user-utils.js";
26
- import { TTLCache, registerCacheForCleanup } from "../../utils/cache.js";
27
16
  import { useOxy } from "../context/OxyContext.js";
28
17
  import { useCurrentUser } from "../hooks/queries/useAccountQueries.js";
29
- import { useUpdateProfile, useUploadAvatar } from "../hooks/mutations/useAccountMutations.js";
18
+ import { useUploadAvatar } from "../hooks/mutations/useAccountMutations.js";
30
19
  import { SECTION_GAP_LARGE, COMPONENT_GAP, HEADER_PADDING_TOP_SETTINGS, createScreenContentStyle } from "../constants/spacing.js";
31
-
32
- // Caches for link metadata and location searches
33
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
34
- const linkMetadataCache = new TTLCache(30 * 60 * 1000); // 30 minutes cache for link metadata
35
- const locationSearchCache = new TTLCache(60 * 60 * 1000); // 1 hour cache for location searches
36
- registerCacheForCleanup(linkMetadataCache);
37
- registerCacheForCleanup(locationSearchCache);
20
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
38
21
  const AccountSettingsScreen = ({
39
22
  onClose,
40
23
  theme,
@@ -47,13 +30,11 @@ const AccountSettingsScreen = ({
47
30
  // Use useOxy() hook for OxyContext values
48
31
  const {
49
32
  oxyServices,
50
- isAuthenticated,
51
- activeSessionId
33
+ isAuthenticated
52
34
  } = useOxy();
53
35
  const {
54
36
  t
55
37
  } = useI18n();
56
- const normalizedTheme = normalizeTheme(theme);
57
38
 
58
39
  // Use TanStack Query for user data
59
40
  const {
@@ -62,19 +43,15 @@ const AccountSettingsScreen = ({
62
43
  } = useCurrentUser({
63
44
  enabled: isAuthenticated
64
45
  });
65
- const updateProfileMutation = useUpdateProfile();
66
46
  const uploadAvatarMutation = useUploadAvatar();
67
47
 
68
48
  // Fallback to store for backward compatibility
69
49
  const userFromStore = useAuthStore(state => state.user);
70
50
  const finalUser = user || userFromStore;
71
- const [isLoading, setIsLoading] = useState(false);
72
- const isSaving = updateProfileMutation.isPending;
73
51
  const isUpdatingAvatar = uploadAvatarMutation.isPending;
74
52
  const [optimisticAvatarId, setOptimisticAvatarId] = useState(null);
75
53
  const scrollViewRef = useRef(null);
76
54
  const avatarSectionRef = useRef(null);
77
- const [avatarSectionY, setAvatarSectionY] = useState(null);
78
55
 
79
56
  // Section refs for navigation
80
57
  const profilePictureSectionRef = useRef(null);
@@ -90,9 +67,6 @@ const AccountSettingsScreen = ({
90
67
  const [quickActionsSectionY, setQuickActionsSectionY] = useState(null);
91
68
  const [securitySectionY, setSecuritySectionY] = useState(null);
92
69
 
93
- // Animation refs
94
- const saveButtonScale = useRef(new Animated.Value(1)).current;
95
-
96
70
  // Form state
97
71
  const [displayName, setDisplayName] = useState('');
98
72
  const [lastName, setLastName] = useState('');
@@ -103,37 +77,17 @@ const AccountSettingsScreen = ({
103
77
  const [links, setLinks] = useState([]);
104
78
  const [avatarFileId, setAvatarFileId] = useState('');
105
79
 
106
- // Modal visibility states
107
- const [showEditDisplayNameModal, setShowEditDisplayNameModal] = useState(false);
108
- const [showEditUsernameModal, setShowEditUsernameModal] = useState(false);
109
- const [showEditEmailModal, setShowEditEmailModal] = useState(false);
110
- const [showEditBioModal, setShowEditBioModal] = useState(false);
111
- const [showEditLocationModal, setShowEditLocationModal] = useState(false);
112
- const [showEditLinksModal, setShowEditLinksModal] = useState(false);
80
+ // Navigation helper for editing fields
81
+ const navigateToEditField = useCallback(fieldType => {
82
+ navigate?.('EditProfileField', {
83
+ fieldType
84
+ });
85
+ }, [navigate]);
113
86
 
114
87
  // Location and links state (for display only - modals handle editing)
115
88
  const [locations, setLocations] = useState([]);
116
89
  const [linksMetadata, setLinksMetadata] = useState([]);
117
90
 
118
- // State for inline editing (used by old renderEditingField code)
119
- const [editingField, setEditingField] = useState(null);
120
- const [tempDisplayName, setTempDisplayName] = useState('');
121
- const [tempLastName, setTempLastName] = useState('');
122
- const [tempUsername, setTempUsername] = useState('');
123
- const [tempEmail, setTempEmail] = useState('');
124
- const [tempBio, setTempBio] = useState('');
125
- const [tempLocation, setTempLocation] = useState('');
126
- const [tempLinks, setTempLinks] = useState([]);
127
- const [tempLocations, setTempLocations] = useState([]);
128
- const [tempLinksWithMetadata, setTempLinksWithMetadata] = useState([]);
129
- const [isAddingLocation, setIsAddingLocation] = useState(false);
130
- const [isSearchingLocations, setIsSearchingLocations] = useState(false);
131
- const [locationSearchResults, setLocationSearchResults] = useState([]);
132
- const [newLocationQuery, setNewLocationQuery] = useState('');
133
- const [isAddingLink, setIsAddingLink] = useState(false);
134
- const [isFetchingMetadata, setIsFetchingMetadata] = useState(false);
135
- const [newLinkUrl, setNewLinkUrl] = useState('');
136
-
137
91
  // Get theme colors using centralized hook
138
92
  const colorScheme = useColorScheme();
139
93
  const themeStyles = useThemeStyles(theme || 'light', colorScheme);
@@ -142,25 +96,6 @@ const AccountSettingsScreen = ({
142
96
  // useThemeStyles always returns colors, but add safety check for edge cases
143
97
  const colors = themeStyles.colors || Colors[normalizeColorScheme(colorScheme, theme || 'light')];
144
98
 
145
- // Memoize onBack handler to provide stable reference for Reanimated
146
- const handleBack = useMemo(() => {
147
- return goBack || onClose || undefined;
148
- }, [goBack, onClose]);
149
-
150
- // Memoize animation function to prevent recreation on every render
151
- const animateSaveButton = useCallback((toValue, onComplete) => {
152
- Animated.spring(saveButtonScale, {
153
- toValue,
154
- useNativeDriver: Platform.OS !== 'web',
155
- tension: 150,
156
- friction: 8
157
- }).start(onComplete ? finished => {
158
- if (finished) {
159
- onComplete();
160
- }
161
- } : undefined);
162
- }, [saveButtonScale]);
163
-
164
99
  // Track initialization to prevent unnecessary resets
165
100
  const isInitializedRef = useRef(false);
166
101
  const previousUserIdRef = useRef(null);
@@ -262,129 +197,6 @@ const AccountSettingsScreen = ({
262
197
  }, [finalUser, avatarFileId, isUpdatingAvatar, optimisticAvatarId]);
263
198
 
264
199
  // Set initial editing field if provided via props (e.g., from navigation)
265
- // Use a ref to track if we've already set the initial field to avoid loops
266
- const hasSetInitialFieldRef = useRef(false);
267
- const previousInitialFieldRef = useRef(undefined);
268
- const initialFieldTimeoutRef = useRef(null);
269
-
270
- // Delay constant for scroll completion
271
- const SCROLL_DELAY_MS = 600;
272
-
273
- // Helper functions for inline editing (legacy support)
274
- const startEditing = useCallback((field, initialValue) => {
275
- setEditingField(field);
276
- switch (field) {
277
- case 'displayName':
278
- setTempDisplayName(initialValue || displayName);
279
- setTempLastName(lastName);
280
- break;
281
- case 'username':
282
- setTempUsername(initialValue || username);
283
- break;
284
- case 'email':
285
- setTempEmail(initialValue || email);
286
- break;
287
- case 'bio':
288
- setTempBio(initialValue || bio);
289
- break;
290
- case 'location':
291
- setTempLocations([...locations]);
292
- break;
293
- case 'links':
294
- setTempLinksWithMetadata([...linksMetadata]);
295
- break;
296
- }
297
- }, [displayName, lastName, username, email, bio, locations, linksMetadata]);
298
- const cancelEditing = useCallback(() => {
299
- setEditingField(null);
300
- setTempDisplayName('');
301
- setTempLastName('');
302
- setTempUsername('');
303
- setTempEmail('');
304
- setTempBio('');
305
- setTempLocation('');
306
- setTempLinks([]);
307
- setTempLocations([]);
308
- setTempLinksWithMetadata([]);
309
- setIsAddingLocation(false);
310
- setIsSearchingLocations(false);
311
- setLocationSearchResults([]);
312
- setNewLocationQuery('');
313
- setIsAddingLink(false);
314
- setIsFetchingMetadata(false);
315
- setNewLinkUrl('');
316
- }, []);
317
- const saveField = useCallback(async field => {
318
- if (!field) return;
319
- try {
320
- switch (field) {
321
- case 'displayName':
322
- await updateProfileMutation.mutateAsync({
323
- name: {
324
- first: tempDisplayName,
325
- last: tempLastName
326
- }
327
- });
328
- setDisplayName(tempDisplayName);
329
- setLastName(tempLastName);
330
- break;
331
- case 'username':
332
- await updateProfileMutation.mutateAsync({
333
- username: tempUsername
334
- });
335
- setUsername(tempUsername);
336
- break;
337
- case 'email':
338
- await updateProfileMutation.mutateAsync({
339
- email: tempEmail
340
- });
341
- setEmail(tempEmail);
342
- break;
343
- case 'bio':
344
- await updateProfileMutation.mutateAsync({
345
- bio: tempBio
346
- });
347
- setBio(tempBio);
348
- break;
349
- case 'location':
350
- await updateProfileMutation.mutateAsync({
351
- locations: tempLocations
352
- });
353
- setLocations(tempLocations);
354
- break;
355
- case 'links':
356
- await updateProfileMutation.mutateAsync({
357
- linksMetadata: tempLinksWithMetadata
358
- });
359
- setLinksMetadata(tempLinksWithMetadata);
360
- setLinks(tempLinksWithMetadata.map(l => l.url));
361
- break;
362
- }
363
- setEditingField(null);
364
- toast.success(t('editProfile.toasts.saved') || 'Saved');
365
- } catch (error) {
366
- // Error is already handled by mutation's onError
367
- }
368
- }, [tempDisplayName, tempLastName, tempUsername, tempEmail, tempBio, tempLocations, tempLinksWithMetadata, updateProfileMutation, t]);
369
-
370
- // Helper to get current value for a field
371
- const getFieldCurrentValue = useCallback(field => {
372
- switch (field) {
373
- case 'displayName':
374
- return displayName;
375
- case 'username':
376
- return username;
377
- case 'email':
378
- return email;
379
- case 'bio':
380
- return bio;
381
- case 'location':
382
- case 'links':
383
- default:
384
- return '';
385
- }
386
- }, [displayName, username, email, bio]);
387
-
388
200
  // Handle initialSection prop to scroll to specific section
389
201
  const hasScrolledToSectionRef = useRef(false);
390
202
  const previousInitialSectionRef = useRef(undefined);
@@ -418,48 +230,6 @@ const AccountSettingsScreen = ({
418
230
  }
419
231
  }
420
232
  }, [initialSection, sectionYPositions]);
421
- const handleSave = async () => {
422
- if (!finalUser) return;
423
- try {
424
- animateSaveButton(0.95); // Scale down slightly for animation
425
-
426
- const updates = {
427
- username,
428
- email,
429
- bio,
430
- location: locations.length > 0 ? locations[0].name : '',
431
- // Keep backward compatibility
432
- locations: locations.length > 0 ? locations : undefined,
433
- links,
434
- linksMetadata: linksMetadata.length > 0 ? linksMetadata : undefined
435
- };
436
-
437
- // Handle name field
438
- if (displayName || lastName) {
439
- updates.name = {
440
- first: displayName,
441
- last: lastName
442
- };
443
- }
444
-
445
- // Handle avatar
446
- if (avatarFileId !== (typeof finalUser.avatar === 'string' ? finalUser.avatar : '')) {
447
- updates.avatar = avatarFileId;
448
- }
449
- await updateProfileMutation.mutateAsync(updates);
450
- toast.success(t('editProfile.toasts.profileUpdated') || 'Profile updated successfully');
451
- animateSaveButton(1); // Scale back to normal
452
-
453
- if (onClose) {
454
- onClose();
455
- } else if (goBack) {
456
- goBack();
457
- }
458
- } catch (error) {
459
- // Error is already handled by mutation's onError
460
- animateSaveButton(1); // Scale back to normal on error
461
- }
462
- };
463
233
  const handleAvatarRemove = () => {
464
234
  confirmAction(t('editProfile.confirms.removeAvatar') || 'Remove your profile picture?', () => {
465
235
  setAvatarFileId('');
@@ -470,62 +240,15 @@ const AccountSettingsScreen = ({
470
240
  openAvatarPicker
471
241
  } = useOxy();
472
242
 
473
- // Handlers to open modals
474
- const handleOpenDisplayNameModal = useCallback(() => setShowEditDisplayNameModal(true), []);
475
- const handleOpenUsernameModal = useCallback(() => setShowEditUsernameModal(true), []);
476
- const handleOpenEmailModal = useCallback(() => setShowEditEmailModal(true), []);
477
- const handleOpenBioModal = useCallback(() => setShowEditBioModal(true), []);
478
- const handleOpenLocationModal = useCallback(() => setShowEditLocationModal(true), []);
479
- const handleOpenLinksModal = useCallback(() => setShowEditLinksModal(true), []);
480
-
481
- // Handler to refresh data after modal saves
482
- // Note: Access user directly from store when invoked to get latest value,
483
- // not from closure which may be stale after modal saves update the backend
484
- const handleModalSave = useCallback(() => {
485
- // Get fresh user data from store to ensure we have the latest values
486
- // after the modal's save operation updates the backend
487
- // Read from store directly (not from closure) to avoid stale data
488
- const currentUser = useAuthStore.getState().user;
489
-
490
- // Reload user data to reflect changes
491
- if (currentUser) {
492
- const userDisplayName = typeof currentUser.name === 'string' ? currentUser.name : currentUser.name?.first || currentUser.name?.full || '';
493
- const userLastName = typeof currentUser.name === 'object' ? currentUser.name?.last || '' : '';
494
- setDisplayName(userDisplayName);
495
- setLastName(userLastName);
496
- setUsername(currentUser.username || '');
497
- setEmail(currentUser.email || '');
498
- setBio(currentUser.bio || '');
499
-
500
- // Reload locations and links
501
- if (currentUser.locations && Array.isArray(currentUser.locations)) {
502
- setLocations(currentUser.locations.map((loc, index) => ({
503
- id: loc.id || `existing-${index}`,
504
- name: loc.name,
505
- label: loc.label,
506
- coordinates: loc.coordinates
507
- })));
508
- } else if (currentUser.location) {
509
- setLocations([{
510
- id: 'existing-0',
511
- name: currentUser.location,
512
- label: 'Location'
513
- }]);
514
- } else {
515
- setLocations([]);
516
- }
517
- if (currentUser.linksMetadata && Array.isArray(currentUser.linksMetadata)) {
518
- setLinksMetadata(currentUser.linksMetadata.map((link, index) => ({
519
- ...link,
520
- id: link.id || `existing-${index}`
521
- })));
522
- } else {
523
- setLinksMetadata([]);
524
- }
525
- }
526
- }, []); // Empty dependency array - callback reads fresh data from store at call time
243
+ // Handlers to navigate to edit screens
244
+ const handleOpenDisplayNameModal = useCallback(() => navigateToEditField('displayName'), [navigateToEditField]);
245
+ const handleOpenUsernameModal = useCallback(() => navigateToEditField('username'), [navigateToEditField]);
246
+ const handleOpenEmailModal = useCallback(() => navigateToEditField('email'), [navigateToEditField]);
247
+ const handleOpenBioModal = useCallback(() => navigateToEditField('bio'), [navigateToEditField]);
248
+ const handleOpenLocationModal = useCallback(() => navigateToEditField('locations'), [navigateToEditField]);
249
+ const handleOpenLinksModal = useCallback(() => navigateToEditField('links'), [navigateToEditField]);
527
250
 
528
- // Handle initialField prop - open appropriate modal
251
+ // Handle initialField prop - navigate to appropriate edit screen
529
252
  useEffect(() => {
530
253
  if (initialField) {
531
254
  // Special handling for avatar - open avatar picker directly
@@ -534,644 +257,28 @@ const AccountSettingsScreen = ({
534
257
  openAvatarPicker();
535
258
  }, 300);
536
259
  } else {
537
- // Open appropriate modal
260
+ // Navigate to edit screen
538
261
  setTimeout(() => {
539
- switch (initialField) {
540
- case 'displayName':
541
- setShowEditDisplayNameModal(true);
542
- break;
543
- case 'username':
544
- setShowEditUsernameModal(true);
545
- break;
546
- case 'email':
547
- setShowEditEmailModal(true);
548
- break;
549
- case 'bio':
550
- setShowEditBioModal(true);
551
- break;
552
- case 'location':
553
- setShowEditLocationModal(true);
554
- break;
555
- case 'links':
556
- setShowEditLinksModal(true);
557
- break;
262
+ const fieldTypeMap = {
263
+ displayName: 'displayName',
264
+ username: 'username',
265
+ email: 'email',
266
+ bio: 'bio',
267
+ location: 'locations',
268
+ locations: 'locations',
269
+ links: 'links'
270
+ };
271
+ const fieldType = fieldTypeMap[initialField];
272
+ if (fieldType) {
273
+ navigateToEditField(fieldType);
558
274
  }
559
275
  }, 300);
560
276
  }
561
277
  }
562
- }, [initialField, openAvatarPicker]);
563
-
564
- // Removed fetchLinkMetadata - now handled by EditLinksModal
565
- const _fetchLinkMetadata = async url => {
566
- // Check cache first
567
- const cacheKey = url.toLowerCase().trim();
568
- const cached = linkMetadataCache.get(cacheKey);
569
- if (cached) {
570
- return cached;
571
- }
572
- try {
573
- setIsFetchingMetadata(true);
574
-
575
- // Use the backend API to fetch metadata
576
- const metadata = await oxyServices.fetchLinkMetadata(url);
577
- const result = {
578
- ...metadata,
579
- id: Date.now().toString()
580
- };
581
-
582
- // Cache the result
583
- linkMetadataCache.set(cacheKey, result);
584
- return result;
585
- } catch (error) {
586
- // Fallback to basic metadata
587
- const fallback = {
588
- url: url.startsWith('http') ? url : 'https://' + url,
589
- title: url.replace(/^https?:\/\//, '').replace(/\/$/, ''),
590
- description: 'Link',
591
- image: undefined,
592
- id: Date.now().toString()
593
- };
594
- // Cache fallback too (shorter TTL)
595
- linkMetadataCache.set(cacheKey, fallback, 5 * 60 * 1000); // 5 minutes for fallbacks
596
- return fallback;
597
- } finally {
598
- setIsFetchingMetadata(false);
599
- }
600
- };
601
-
602
- // Helper functions for inline editing (legacy support - still used by renderEditingField)
603
- const searchLocations = async query => {
604
- if (!query.trim() || query.length < 3) {
605
- setLocationSearchResults([]);
606
- return;
607
- }
608
-
609
- // Check cache first
610
- const cacheKey = query.toLowerCase().trim();
611
- const cached = locationSearchCache.get(cacheKey);
612
- if (cached) {
613
- setLocationSearchResults(cached);
614
- return;
615
- }
616
- try {
617
- setIsSearchingLocations(true);
618
- const response = await fetch(`https://nominatim.openstreetmap.org/search?format=json&q=${encodeURIComponent(query)}&limit=5&addressdetails=1`);
619
- const data = await response.json();
620
-
621
- // Cache the results
622
- locationSearchCache.set(cacheKey, data);
623
- setLocationSearchResults(data);
624
- } catch (error) {
625
- setLocationSearchResults([]);
626
- } finally {
627
- setIsSearchingLocations(false);
628
- }
629
- };
630
- const addLocation = locationData => {
631
- const newLocation = {
632
- id: Date.now().toString(),
633
- name: locationData.display_name,
634
- label: locationData.type === 'city' ? 'City' : locationData.type === 'country' ? 'Country' : locationData.type === 'state' ? 'State' : 'Location',
635
- coordinates: {
636
- lat: Number.parseFloat(locationData.lat),
637
- lon: Number.parseFloat(locationData.lon)
638
- }
639
- };
640
- setTempLocations(prev => [...prev, newLocation]);
641
- setNewLocationQuery('');
642
- setLocationSearchResults([]);
643
- setIsAddingLocation(false);
644
- };
645
- const removeLocation = id => {
646
- setTempLocations(prev => prev.filter(loc => loc.id !== id));
647
- };
648
- const moveLocation = (fromIndex, toIndex) => {
649
- setTempLocations(prev => {
650
- const newLocations = [...prev];
651
- const [movedLocation] = newLocations.splice(fromIndex, 1);
652
- newLocations.splice(toIndex, 0, movedLocation);
653
- return newLocations;
654
- });
655
- };
656
- const addLink = async () => {
657
- if (!newLinkUrl.trim()) return;
658
- const url = newLinkUrl.trim();
659
- const metadata = await _fetchLinkMetadata(url);
660
- setTempLinksWithMetadata(prev => [...prev, metadata]);
661
- setNewLinkUrl('');
662
- setIsAddingLink(false);
663
- };
664
- const removeLink = id => {
665
- setTempLinksWithMetadata(prev => prev.filter(link => link.id !== id));
666
- };
667
- const moveLink = (fromIndex, toIndex) => {
668
- setTempLinksWithMetadata(prev => {
669
- const newLinks = [...prev];
670
- const [movedLink] = newLinks.splice(fromIndex, 1);
671
- newLinks.splice(toIndex, 0, movedLink);
672
- return newLinks;
673
- });
674
- };
278
+ }, [initialField, openAvatarPicker, navigateToEditField]);
675
279
 
676
280
  // Memoize display name for avatar
677
281
  const displayNameForAvatar = useMemo(() => getDisplayName(finalUser), [finalUser]);
678
-
679
- // Legacy renderEditingField function (fallback)
680
- const renderEditingField = type => {
681
- if (!type) return null;
682
- if (type === 'displayName') {
683
- return /*#__PURE__*/_jsx(View, {
684
- style: [styles.editingFieldContainer, {
685
- backgroundColor: colors.background
686
- }],
687
- children: /*#__PURE__*/_jsx(View, {
688
- style: styles.editingFieldContent,
689
- children: /*#__PURE__*/_jsxs(View, {
690
- style: styles.newValueSection,
691
- children: [/*#__PURE__*/_jsx(View, {
692
- style: styles.editingFieldHeader,
693
- children: /*#__PURE__*/_jsx(Text, {
694
- style: [styles.editingFieldLabel, {
695
- color: colors.text
696
- }],
697
- children: "Edit Full Name"
698
- })
699
- }), /*#__PURE__*/_jsxs(View, {
700
- style: {
701
- flexDirection: 'row',
702
- gap: 12
703
- },
704
- children: [/*#__PURE__*/_jsxs(View, {
705
- style: {
706
- flex: 1
707
- },
708
- children: [/*#__PURE__*/_jsx(Text, {
709
- style: styles.editingFieldLabel,
710
- children: "First Name"
711
- }), /*#__PURE__*/_jsx(TextInput, {
712
- style: styles.editingFieldInput,
713
- value: tempDisplayName,
714
- onChangeText: setTempDisplayName,
715
- placeholder: "Enter your first name",
716
- placeholderTextColor: colors.secondaryText,
717
- autoFocus: true,
718
- selectionColor: themeStyles.primaryColor
719
- })]
720
- }), /*#__PURE__*/_jsxs(View, {
721
- style: {
722
- flex: 1
723
- },
724
- children: [/*#__PURE__*/_jsx(Text, {
725
- style: styles.editingFieldLabel,
726
- children: "Last Name"
727
- }), /*#__PURE__*/_jsx(TextInput, {
728
- style: styles.editingFieldInput,
729
- value: tempLastName,
730
- onChangeText: setTempLastName,
731
- placeholder: "Enter your last name",
732
- placeholderTextColor: colors.secondaryText,
733
- selectionColor: themeStyles.primaryColor
734
- })]
735
- })]
736
- })]
737
- })
738
- })
739
- });
740
- }
741
- if (type === 'location') {
742
- return /*#__PURE__*/_jsx(View, {
743
- style: [styles.editingFieldContainer, {
744
- backgroundColor: colors.background
745
- }],
746
- children: /*#__PURE__*/_jsx(View, {
747
- style: styles.editingFieldContent,
748
- children: /*#__PURE__*/_jsxs(View, {
749
- style: styles.newValueSection,
750
- children: [/*#__PURE__*/_jsx(View, {
751
- style: styles.editingFieldHeader,
752
- children: /*#__PURE__*/_jsx(Text, {
753
- style: [styles.editingFieldLabel, {
754
- color: colors.text
755
- }],
756
- children: "Manage Your Locations"
757
- })
758
- }), isAddingLocation ? /*#__PURE__*/_jsxs(View, {
759
- style: styles.addLocationSection,
760
- children: [/*#__PURE__*/_jsxs(Text, {
761
- style: styles.addLocationLabel,
762
- children: ["Add New Location", isSearchingLocations && /*#__PURE__*/_jsx(Text, {
763
- style: [styles.searchingText, {
764
- color: colors.iconSecurity
765
- }],
766
- children: " \u2022 Searching..."
767
- })]
768
- }), /*#__PURE__*/_jsxs(View, {
769
- style: styles.addLocationInputContainer,
770
- children: [/*#__PURE__*/_jsx(TextInput, {
771
- style: styles.addLocationInput,
772
- value: newLocationQuery,
773
- onChangeText: text => {
774
- setNewLocationQuery(text);
775
- searchLocations(text);
776
- },
777
- placeholder: "Search for a location...",
778
- placeholderTextColor: colors.secondaryText,
779
- autoFocus: true,
780
- selectionColor: themeStyles.primaryColor
781
- }), /*#__PURE__*/_jsx(View, {
782
- style: styles.addLocationButtons,
783
- children: /*#__PURE__*/_jsx(TouchableOpacity, {
784
- style: [styles.addLocationButton, styles.cancelButton],
785
- onPress: () => {
786
- setIsAddingLocation(false);
787
- setNewLocationQuery('');
788
- setLocationSearchResults([]);
789
- },
790
- children: /*#__PURE__*/_jsx(Text, {
791
- style: styles.cancelButtonText,
792
- children: "Cancel"
793
- })
794
- })
795
- })]
796
- }), locationSearchResults.length > 0 && /*#__PURE__*/_jsx(View, {
797
- style: styles.searchResults,
798
- children: locationSearchResults.map(result => /*#__PURE__*/_jsxs(TouchableOpacity, {
799
- style: styles.searchResultItem,
800
- onPress: () => addLocation(result),
801
- children: [/*#__PURE__*/_jsx(Text, {
802
- style: styles.searchResultName,
803
- numberOfLines: 2,
804
- children: result.display_name
805
- }), /*#__PURE__*/_jsx(Text, {
806
- style: styles.searchResultType,
807
- children: result.type
808
- })]
809
- }, result.place_id))
810
- })]
811
- }) : /*#__PURE__*/_jsxs(TouchableOpacity, {
812
- style: styles.addLocationTrigger,
813
- onPress: () => setIsAddingLocation(true),
814
- children: [/*#__PURE__*/_jsx(OxyIcon, {
815
- name: "add",
816
- size: 20,
817
- color: themeStyles.primaryColor
818
- }), /*#__PURE__*/_jsx(Text, {
819
- style: [styles.addLocationTriggerText, {
820
- color: colors.iconSecurity
821
- }],
822
- children: "Add a new location"
823
- })]
824
- }), tempLocations.length > 0 && /*#__PURE__*/_jsxs(View, {
825
- style: styles.locationsList,
826
- children: [/*#__PURE__*/_jsxs(Text, {
827
- style: styles.locationsListTitle,
828
- children: ["Your Locations (", tempLocations.length, ")"]
829
- }), tempLocations.map((location, index) => /*#__PURE__*/_jsxs(View, {
830
- style: styles.locationItem,
831
- children: [/*#__PURE__*/_jsxs(View, {
832
- style: styles.locationItemContent,
833
- children: [/*#__PURE__*/_jsx(View, {
834
- style: styles.locationItemDragHandle,
835
- children: /*#__PURE__*/_jsxs(View, {
836
- style: styles.reorderButtons,
837
- children: [/*#__PURE__*/_jsx(TouchableOpacity, {
838
- style: [styles.reorderButton, index === 0 && styles.reorderButtonDisabled],
839
- onPress: () => index > 0 && moveLocation(index, index - 1),
840
- disabled: index === 0,
841
- children: /*#__PURE__*/_jsx(OxyIcon, {
842
- name: "chevron-up",
843
- size: 12,
844
- color: index === 0 ? "#ccc" : "#666"
845
- })
846
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
847
- style: [styles.reorderButton, index === tempLocations.length - 1 && styles.reorderButtonDisabled],
848
- onPress: () => index < tempLocations.length - 1 && moveLocation(index, index + 1),
849
- disabled: index === tempLocations.length - 1,
850
- children: /*#__PURE__*/_jsx(OxyIcon, {
851
- name: "chevron-down",
852
- size: 12,
853
- color: index === tempLocations.length - 1 ? "#ccc" : "#666"
854
- })
855
- })]
856
- })
857
- }), /*#__PURE__*/_jsxs(View, {
858
- style: styles.locationItemInfo,
859
- children: [/*#__PURE__*/_jsxs(View, {
860
- style: styles.locationItemHeader,
861
- children: [/*#__PURE__*/_jsx(Text, {
862
- style: styles.locationItemName,
863
- numberOfLines: 1,
864
- children: location.name
865
- }), location.label && /*#__PURE__*/_jsx(View, {
866
- style: [styles.locationLabel, {
867
- backgroundColor: colors.iconSecurity
868
- }],
869
- children: /*#__PURE__*/_jsx(Text, {
870
- style: styles.locationLabelText,
871
- children: location.label
872
- })
873
- })]
874
- }), location.coordinates && /*#__PURE__*/_jsxs(Text, {
875
- style: styles.locationCoordinates,
876
- children: [location.coordinates.lat.toFixed(4), ", ", location.coordinates.lon.toFixed(4)]
877
- })]
878
- }), /*#__PURE__*/_jsx(View, {
879
- style: styles.locationItemActions,
880
- children: /*#__PURE__*/_jsx(TouchableOpacity, {
881
- style: styles.locationItemButton,
882
- onPress: () => removeLocation(location.id),
883
- children: /*#__PURE__*/_jsx(OxyIcon, {
884
- name: "trash",
885
- size: 14,
886
- color: "#FF3B30"
887
- })
888
- })
889
- })]
890
- }), index < tempLocations.length - 1 && /*#__PURE__*/_jsx(View, {
891
- style: styles.locationItemDivider
892
- })]
893
- }, location.id)), /*#__PURE__*/_jsx(View, {
894
- style: styles.reorderHint,
895
- children: /*#__PURE__*/_jsx(Text, {
896
- style: styles.reorderHintText,
897
- children: "Use \u2191\u2193 buttons to reorder your locations"
898
- })
899
- })]
900
- })]
901
- })
902
- })
903
- });
904
- }
905
- if (type === 'links') {
906
- return /*#__PURE__*/_jsx(View, {
907
- style: [styles.editingFieldContainer, {
908
- backgroundColor: colors.background
909
- }],
910
- children: /*#__PURE__*/_jsx(View, {
911
- style: styles.editingFieldContent,
912
- children: /*#__PURE__*/_jsxs(View, {
913
- style: styles.newValueSection,
914
- children: [/*#__PURE__*/_jsx(View, {
915
- style: styles.editingFieldHeader,
916
- children: /*#__PURE__*/_jsx(Text, {
917
- style: [styles.editingFieldLabel, {
918
- color: colors.text
919
- }],
920
- children: "Manage Your Links"
921
- })
922
- }), /*#__PURE__*/_jsx(GroupedSection, {
923
- items: [
924
- // Add new link item
925
- ...(isAddingLink ? [{
926
- id: 'add-link-input',
927
- icon: 'plus',
928
- iconColor: colors.sidebarIconSharing,
929
- title: 'Add New Link',
930
- subtitle: isFetchingMetadata ? 'Fetching metadata...' : 'Enter URL to add a new link',
931
- customContent: /*#__PURE__*/_jsxs(View, {
932
- style: styles.addLinkInputContainer,
933
- children: [/*#__PURE__*/_jsx(TextInput, {
934
- style: styles.addLinkInput,
935
- value: newLinkUrl,
936
- onChangeText: setNewLinkUrl,
937
- placeholder: "Enter URL (e.g., https://example.com)",
938
- placeholderTextColor: colors.secondaryText,
939
- keyboardType: "url",
940
- autoFocus: true,
941
- selectionColor: themeStyles.primaryColor
942
- }), /*#__PURE__*/_jsxs(View, {
943
- style: styles.addLinkButtons,
944
- children: [/*#__PURE__*/_jsx(TouchableOpacity, {
945
- style: [styles.addLinkButton, styles.cancelButton],
946
- onPress: () => {
947
- setIsAddingLink(false);
948
- setNewLinkUrl('');
949
- },
950
- children: /*#__PURE__*/_jsx(Text, {
951
- style: styles.cancelButtonText,
952
- children: "Cancel"
953
- })
954
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
955
- style: [styles.addLinkButton, styles.addButton, {
956
- backgroundColor: colors.iconSecurity,
957
- opacity: isFetchingMetadata ? 0.5 : 1
958
- }],
959
- onPress: addLink,
960
- disabled: isFetchingMetadata,
961
- children: isFetchingMetadata ? /*#__PURE__*/_jsx(ActivityIndicator, {
962
- size: "small",
963
- color: "#fff"
964
- }) : /*#__PURE__*/_jsx(Text, {
965
- style: styles.addButtonText,
966
- children: "Add"
967
- })
968
- })]
969
- })]
970
- })
971
- }] : [{
972
- id: 'add-link-trigger',
973
- icon: 'plus',
974
- iconColor: colors.sidebarIconSharing,
975
- title: 'Add a new link',
976
- subtitle: 'Tap to add a new link to your profile',
977
- onPress: () => setIsAddingLink(true)
978
- }]),
979
- // Existing links
980
- ...tempLinksWithMetadata.map((link, index) => ({
981
- id: link.id,
982
- customIcon: link.image ? /*#__PURE__*/_jsx(Image, {
983
- source: {
984
- uri: link.image
985
- },
986
- style: {
987
- width: 36,
988
- height: 36,
989
- borderRadius: 18
990
- }
991
- }) : undefined,
992
- icon: !link.image ? 'link-variant' : undefined,
993
- iconColor: colors.sidebarIconSharing,
994
- title: link.title || link.url,
995
- subtitle: link.description && link.description !== link.title ? link.description : link.url,
996
- customContent: /*#__PURE__*/_jsxs(View, {
997
- style: styles.linkItemActions,
998
- children: [/*#__PURE__*/_jsxs(View, {
999
- style: styles.reorderButtons,
1000
- children: [/*#__PURE__*/_jsx(TouchableOpacity, {
1001
- style: [styles.reorderButton, index === 0 && styles.reorderButtonDisabled],
1002
- onPress: () => index > 0 && moveLink(index, index - 1),
1003
- disabled: index === 0,
1004
- children: /*#__PURE__*/_jsx(OxyIcon, {
1005
- name: "chevron-up",
1006
- size: 12,
1007
- color: index === 0 ? "#ccc" : "#666"
1008
- })
1009
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
1010
- style: [styles.reorderButton, index === tempLinksWithMetadata.length - 1 && styles.reorderButtonDisabled],
1011
- onPress: () => index < tempLinksWithMetadata.length - 1 && moveLink(index, index + 1),
1012
- disabled: index === tempLinksWithMetadata.length - 1,
1013
- children: /*#__PURE__*/_jsx(OxyIcon, {
1014
- name: "chevron-down",
1015
- size: 12,
1016
- color: index === tempLinksWithMetadata.length - 1 ? "#ccc" : "#666"
1017
- })
1018
- })]
1019
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
1020
- style: styles.linkItemButton,
1021
- onPress: () => removeLink(link.id),
1022
- children: /*#__PURE__*/_jsx(OxyIcon, {
1023
- name: "trash",
1024
- size: 14,
1025
- color: "#FF3B30"
1026
- })
1027
- })]
1028
- })
1029
- }))]
1030
- }), tempLinksWithMetadata.length > 0 && /*#__PURE__*/_jsx(View, {
1031
- style: styles.reorderHint,
1032
- children: /*#__PURE__*/_jsx(Text, {
1033
- style: styles.reorderHintText,
1034
- children: "Use \u2191\u2193 buttons to reorder your links"
1035
- })
1036
- })]
1037
- })
1038
- })
1039
- });
1040
- }
1041
- const fieldConfig = {
1042
- displayName: {
1043
- label: 'Display Name',
1044
- value: displayName,
1045
- placeholder: 'Enter your display name',
1046
- icon: 'account',
1047
- color: colors.iconPersonalInfo,
1048
- multiline: false,
1049
- keyboardType: 'default'
1050
- },
1051
- username: {
1052
- label: 'Username',
1053
- value: username,
1054
- placeholder: 'Choose a username',
1055
- icon: 'at',
1056
- color: colors.iconData,
1057
- multiline: false,
1058
- keyboardType: 'default'
1059
- },
1060
- email: {
1061
- label: 'Email',
1062
- value: email,
1063
- placeholder: 'Enter your email address',
1064
- icon: 'mail',
1065
- color: colors.iconStorage,
1066
- multiline: false,
1067
- keyboardType: 'email-address'
1068
- },
1069
- bio: {
1070
- label: 'Bio',
1071
- value: bio,
1072
- placeholder: 'Tell people about yourself...',
1073
- icon: 'file-document',
1074
- color: colors.iconPersonalInfo,
1075
- multiline: true,
1076
- keyboardType: 'default'
1077
- },
1078
- location: {
1079
- label: 'Location',
1080
- value: location,
1081
- placeholder: 'Enter your location',
1082
- icon: 'location',
1083
- color: colors.iconSharing,
1084
- multiline: false,
1085
- keyboardType: 'default'
1086
- },
1087
- links: {
1088
- label: 'Links',
1089
- value: links.join(', '),
1090
- placeholder: 'Enter your links (comma separated)',
1091
- icon: 'link',
1092
- color: colors.iconPersonalInfo,
1093
- multiline: false,
1094
- keyboardType: 'url'
1095
- }
1096
- };
1097
- const config = fieldConfig[type];
1098
- if (!config) return null;
1099
- const tempValue = (() => {
1100
- switch (type) {
1101
- case 'displayName':
1102
- return tempDisplayName;
1103
- case 'username':
1104
- return tempUsername;
1105
- case 'email':
1106
- return tempEmail;
1107
- case 'bio':
1108
- return tempBio;
1109
- case 'location':
1110
- return tempLocation;
1111
- case 'links':
1112
- return tempLinks.join(', ');
1113
- default:
1114
- return '';
1115
- }
1116
- })();
1117
- const setTempValue = text => {
1118
- switch (type) {
1119
- case 'displayName':
1120
- setTempDisplayName(text);
1121
- break;
1122
- case 'username':
1123
- setTempUsername(text);
1124
- break;
1125
- case 'email':
1126
- setTempEmail(text);
1127
- break;
1128
- case 'bio':
1129
- setTempBio(text);
1130
- break;
1131
- case 'location':
1132
- setTempLocation(text);
1133
- break;
1134
- case 'links':
1135
- setTempLinks(text.split(',').map(s => s.trim()).filter(Boolean));
1136
- break;
1137
- }
1138
- };
1139
- return /*#__PURE__*/_jsx(View, {
1140
- style: [styles.editingFieldContainer, {
1141
- backgroundColor: colors.background
1142
- }],
1143
- children: /*#__PURE__*/_jsx(View, {
1144
- style: styles.editingFieldContent,
1145
- children: /*#__PURE__*/_jsxs(View, {
1146
- style: styles.newValueSection,
1147
- children: [/*#__PURE__*/_jsx(View, {
1148
- style: styles.editingFieldHeader,
1149
- children: /*#__PURE__*/_jsx(Text, {
1150
- style: [styles.editingFieldLabel, {
1151
- color: colors.text
1152
- }],
1153
- children: config.label
1154
- })
1155
- }), /*#__PURE__*/_jsx(TextInput, {
1156
- style: [config.multiline ? styles.editingFieldTextArea : styles.editingFieldInput, {
1157
- backgroundColor: themeStyles.isDarkTheme ? '#1C1C1E' : '#F2F2F7',
1158
- color: themeStyles.isDarkTheme ? '#FFFFFF' : '#000000',
1159
- borderColor: themeStyles.isDarkTheme ? '#38383A' : '#E5E5EA'
1160
- }],
1161
- value: tempValue,
1162
- onChangeText: setTempValue,
1163
- placeholder: config.placeholder,
1164
- placeholderTextColor: themeStyles.isDarkTheme ? '#636366' : '#8E8E93',
1165
- multiline: config.multiline,
1166
- numberOfLines: config.multiline ? 6 : 1,
1167
- keyboardType: config.keyboardType,
1168
- autoFocus: true,
1169
- selectionColor: themeStyles.primaryColor
1170
- })]
1171
- })
1172
- })
1173
- });
1174
- };
1175
282
  if (userLoading || !isAuthenticated) {
1176
283
  return /*#__PURE__*/_jsx(View, {
1177
284
  style: [styles.container, {
@@ -1184,368 +291,265 @@ const AccountSettingsScreen = ({
1184
291
  })
1185
292
  });
1186
293
  }
1187
- return /*#__PURE__*/_jsxs(View, {
294
+ return /*#__PURE__*/_jsx(View, {
1188
295
  style: [styles.container, {
1189
296
  backgroundColor: themeStyles.backgroundColor
1190
297
  }],
1191
- children: [editingField ? /*#__PURE__*/_jsxs(View, {
1192
- style: [styles.editingHeader, {
1193
- backgroundColor: colors.background,
1194
- borderBottomColor: colors.border
1195
- }],
298
+ children: /*#__PURE__*/_jsxs(ScrollView, {
299
+ ref: scrollViewRef,
300
+ style: styles.content,
301
+ contentContainerStyle: styles.scrollContent,
302
+ showsVerticalScrollIndicator: false,
1196
303
  children: [/*#__PURE__*/_jsxs(View, {
1197
- style: styles.editingHeaderContent,
1198
- children: [/*#__PURE__*/_jsx(TouchableOpacity, {
1199
- style: [styles.editingBackButton, {
1200
- backgroundColor: colors.card
304
+ style: [styles.headerContainer, styles.headerSection],
305
+ children: [/*#__PURE__*/_jsx(Text, {
306
+ style: [styles.modernTitle, {
307
+ color: themeStyles.textColor,
308
+ marginBottom: 0,
309
+ marginTop: 0
1201
310
  }],
1202
- onPress: cancelEditing,
1203
- children: /*#__PURE__*/_jsx(Ionicons, {
1204
- name: "chevron-back",
1205
- size: 20,
1206
- color: colors.tint
1207
- })
1208
- }), /*#__PURE__*/_jsx(View, {
1209
- style: styles.editingTitleContainer
1210
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
1211
- style: [styles.editingSaveButton, {
1212
- opacity: isSaving ? 0.5 : 1,
1213
- backgroundColor: colors.card
311
+ children: t('accountOverview.items.editProfile.title') || t('editProfile.title') || 'Edit Profile'
312
+ }), /*#__PURE__*/_jsx(Text, {
313
+ style: [styles.modernSubtitle, {
314
+ color: colors.secondaryText,
315
+ marginBottom: 0,
316
+ marginTop: 0
1214
317
  }],
1215
- onPress: () => saveField(editingField),
1216
- disabled: isSaving,
1217
- children: isSaving ? /*#__PURE__*/_jsx(ActivityIndicator, {
1218
- size: "small",
1219
- color: colors.tint
1220
- }) : /*#__PURE__*/_jsx(Text, {
1221
- style: [styles.editingSaveButtonText, {
1222
- color: colors.tint
1223
- }],
1224
- children: "Save"
1225
- })
318
+ children: t('accountOverview.items.editProfile.subtitle') || t('editProfile.subtitle') || 'Manage your profile and preferences'
1226
319
  })]
1227
320
  }), /*#__PURE__*/_jsxs(View, {
1228
- style: styles.editingHeaderBottom,
1229
- children: [/*#__PURE__*/_jsx(View, {
1230
- style: [styles.editingIconContainer, {
1231
- backgroundColor: editingField === 'displayName' ? `${colors.sidebarIconPersonalInfo}20` : editingField === 'username' ? `${colors.sidebarIconData}20` : editingField === 'email' ? `${colors.sidebarIconSecurity}20` : editingField === 'bio' ? `${colors.sidebarIconPersonalInfo}20` : editingField === 'location' ? `${colors.sidebarIconSharing}20` : editingField === 'links' ? `${colors.sidebarIconPersonalInfo}20` : `${colors.tint}20`
321
+ ref: ref => {
322
+ avatarSectionRef.current = ref;
323
+ profilePictureSectionRef.current = ref;
324
+ },
325
+ style: styles.section,
326
+ onLayout: event => {
327
+ const {
328
+ y
329
+ } = event.nativeEvent.layout;
330
+ setProfilePictureSectionY(y);
331
+ },
332
+ children: [/*#__PURE__*/_jsx(Text, {
333
+ style: [styles.sectionTitle, {
334
+ color: colors.secondaryText
1232
335
  }],
1233
- children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
1234
- name: editingField === 'displayName' ? 'account-outline' : editingField === 'username' ? 'at' : editingField === 'email' ? 'email-outline' : editingField === 'bio' ? 'text-box-outline' : editingField === 'location' ? 'map-marker-outline' : editingField === 'links' ? 'link-variant' : 'account-outline',
1235
- size: 28,
1236
- color: editingField === 'displayName' ? colors.sidebarIconPersonalInfo : editingField === 'username' ? colors.sidebarIconData : editingField === 'email' ? colors.sidebarIconSecurity : editingField === 'bio' ? colors.sidebarIconPersonalInfo : editingField === 'location' ? colors.sidebarIconSharing : editingField === 'links' ? colors.sidebarIconPersonalInfo : colors.tint
1237
- })
1238
- }), /*#__PURE__*/_jsx(Text, {
1239
- style: [styles.editingBottomTitle, {
1240
- color: colors.text
1241
- }],
1242
- children: editingField === 'displayName' ? t('editProfile.items.displayName.title') || 'Display Name' : editingField === 'username' ? t('editProfile.items.username.title') || 'Username' : editingField === 'email' ? t('editProfile.items.email.title') || 'Email' : editingField === 'bio' ? t('editProfile.items.bio.title') || 'Bio' : editingField === 'location' ? t('editProfile.items.locations.title') || 'Location' : editingField === 'links' ? t('editProfile.items.links.title') || 'Links' : 'Field'
1243
- })]
1244
- })]
1245
- }) : null, /*#__PURE__*/_jsx(ScrollView, {
1246
- ref: scrollViewRef,
1247
- style: editingField ? styles.contentEditing : styles.content,
1248
- contentContainerStyle: styles.scrollContent,
1249
- showsVerticalScrollIndicator: false,
1250
- children: editingField ?
1251
- /*#__PURE__*/
1252
- // Show only the editing interface when editing
1253
- _jsx(View, {
1254
- style: styles.editingOnlyContainer,
1255
- children: renderEditingField(editingField)
1256
- }) :
1257
- /*#__PURE__*/
1258
- // Show all settings when not editing
1259
- _jsxs(_Fragment, {
1260
- children: [/*#__PURE__*/_jsxs(View, {
1261
- style: [styles.headerContainer, styles.headerSection],
1262
- children: [/*#__PURE__*/_jsx(Text, {
1263
- style: [styles.modernTitle, {
1264
- color: themeStyles.textColor,
1265
- marginBottom: 0,
1266
- marginTop: 0
1267
- }],
1268
- children: t('accountOverview.items.editProfile.title') || t('editProfile.title') || 'Edit Profile'
1269
- }), /*#__PURE__*/_jsx(Text, {
1270
- style: [styles.modernSubtitle, {
1271
- color: colors.secondaryText,
1272
- marginBottom: 0,
1273
- marginTop: 0
1274
- }],
1275
- children: t('accountOverview.items.editProfile.subtitle') || t('editProfile.subtitle') || 'Manage your profile and preferences'
1276
- })]
1277
- }), /*#__PURE__*/_jsxs(View, {
1278
- ref: ref => {
1279
- avatarSectionRef.current = ref;
1280
- profilePictureSectionRef.current = ref;
1281
- },
1282
- style: styles.section,
1283
- onLayout: event => {
1284
- const {
1285
- y
1286
- } = event.nativeEvent.layout;
1287
- setAvatarSectionY(y);
1288
- setProfilePictureSectionY(y);
1289
- },
1290
- children: [/*#__PURE__*/_jsx(Text, {
1291
- style: [styles.sectionTitle, {
1292
- color: colors.secondaryText
1293
- }],
1294
- children: t('editProfile.sections.profilePicture') || 'PROFILE PICTURE'
1295
- }), /*#__PURE__*/_jsx(View, {
1296
- style: styles.groupedSectionWrapper,
1297
- children: /*#__PURE__*/_jsx(GroupedSection, {
1298
- items: [{
1299
- id: 'profile-photo',
1300
- customIcon: optimisticAvatarId || avatarFileId ? isUpdatingAvatar ? /*#__PURE__*/_jsxs(Animated.View, {
1301
- style: {
1302
- position: 'relative',
1303
- width: 36,
1304
- height: 36
1305
- },
1306
- children: [/*#__PURE__*/_jsx(Animated.Image, {
1307
- source: {
1308
- uri: oxyServices.getFileDownloadUrl(optimisticAvatarId || avatarFileId, 'thumb')
1309
- },
1310
- style: {
1311
- width: 36,
1312
- height: 36,
1313
- borderRadius: 18,
1314
- opacity: 0.6
1315
- }
1316
- }), /*#__PURE__*/_jsx(View, {
1317
- style: {
1318
- position: 'absolute',
1319
- top: 0,
1320
- left: 0,
1321
- right: 0,
1322
- bottom: 0,
1323
- justifyContent: 'center',
1324
- alignItems: 'center',
1325
- backgroundColor: colorScheme === 'dark' ? 'rgba(0, 0, 0, 0.4)' : 'rgba(255, 255, 255, 0.7)',
1326
- borderRadius: 18
1327
- },
1328
- children: /*#__PURE__*/_jsx(ActivityIndicator, {
1329
- size: "small",
1330
- color: colors.tint
1331
- })
1332
- })]
1333
- }) : /*#__PURE__*/_jsx(Image, {
336
+ children: t('editProfile.sections.profilePicture') || 'PROFILE PICTURE'
337
+ }), /*#__PURE__*/_jsx(View, {
338
+ style: styles.groupedSectionWrapper,
339
+ children: /*#__PURE__*/_jsx(GroupedSection, {
340
+ items: [{
341
+ id: 'profile-photo',
342
+ customIcon: optimisticAvatarId || avatarFileId ? isUpdatingAvatar ? /*#__PURE__*/_jsxs(Animated.View, {
343
+ style: {
344
+ position: 'relative',
345
+ width: 36,
346
+ height: 36
347
+ },
348
+ children: [/*#__PURE__*/_jsx(Animated.Image, {
1334
349
  source: {
1335
350
  uri: oxyServices.getFileDownloadUrl(optimisticAvatarId || avatarFileId, 'thumb')
1336
351
  },
1337
352
  style: {
1338
353
  width: 36,
1339
354
  height: 36,
1340
- borderRadius: 18
355
+ borderRadius: 18,
356
+ opacity: 0.6
1341
357
  }
1342
- }) : undefined,
1343
- icon: !(optimisticAvatarId || avatarFileId) ? 'account-outline' : undefined,
1344
- iconColor: colors.sidebarIconPersonalInfo,
1345
- title: 'Profile Photo',
1346
- subtitle: isUpdatingAvatar ? 'Updating profile picture...' : avatarFileId ? 'Tap to change your profile picture' : 'Tap to add a profile picture',
1347
- onPress: isUpdatingAvatar ? undefined : openAvatarPicker,
1348
- disabled: isUpdatingAvatar
1349
- }, ...(avatarFileId && !isUpdatingAvatar ? [{
1350
- id: 'remove-profile-photo',
1351
- icon: 'delete-outline',
1352
- iconColor: colors.sidebarIconSharing,
1353
- title: 'Remove Photo',
1354
- subtitle: 'Delete current profile picture',
1355
- onPress: handleAvatarRemove
1356
- }] : [])]
1357
- })
1358
- })]
1359
- }), /*#__PURE__*/_jsxs(View, {
1360
- ref: basicInfoSectionRef,
1361
- style: styles.section,
1362
- onLayout: event => {
1363
- const {
1364
- y
1365
- } = event.nativeEvent.layout;
1366
- setBasicInfoSectionY(y);
1367
- },
1368
- children: [/*#__PURE__*/_jsx(Text, {
1369
- style: [styles.sectionTitle, {
1370
- color: colors.secondaryText
1371
- }],
1372
- children: t('editProfile.sections.basicInfo') || 'BASIC INFORMATION'
1373
- }), /*#__PURE__*/_jsx(View, {
1374
- style: styles.groupedSectionWrapper,
1375
- children: /*#__PURE__*/_jsx(GroupedSection, {
1376
- items: [{
1377
- id: 'display-name',
1378
- icon: 'account-outline',
1379
- iconColor: colors.sidebarIconPersonalInfo,
1380
- title: t('editProfile.items.displayName.title') || 'Display Name',
1381
- subtitle: [displayName, lastName].filter(Boolean).join(' ') || t('editProfile.items.displayName.add') || 'Add your display name',
1382
- onPress: handleOpenDisplayNameModal
1383
- }, {
1384
- id: 'username',
1385
- icon: 'at',
1386
- iconColor: colors.sidebarIconData,
1387
- title: t('editProfile.items.username.title') || 'Username',
1388
- subtitle: username || t('editProfile.items.username.choose') || 'Choose a username',
1389
- onPress: handleOpenUsernameModal
1390
- }, {
1391
- id: 'email',
1392
- icon: 'email-outline',
1393
- iconColor: colors.sidebarIconSecurity,
1394
- title: t('editProfile.items.email.title') || 'Email',
1395
- subtitle: email || t('editProfile.items.email.add') || 'Add your email address',
1396
- onPress: handleOpenEmailModal
1397
- }]
1398
- })
1399
- })]
1400
- }), /*#__PURE__*/_jsxs(View, {
1401
- ref: aboutSectionRef,
1402
- style: styles.section,
1403
- onLayout: event => {
1404
- const {
1405
- y
1406
- } = event.nativeEvent.layout;
1407
- setAboutSectionY(y);
1408
- },
1409
- children: [/*#__PURE__*/_jsx(Text, {
1410
- style: [styles.sectionTitle, {
1411
- color: colors.secondaryText
1412
- }],
1413
- children: t('editProfile.sections.about') || 'ABOUT YOU'
1414
- }), /*#__PURE__*/_jsx(View, {
1415
- style: styles.groupedSectionWrapper,
1416
- children: /*#__PURE__*/_jsx(GroupedSection, {
1417
- items: [{
1418
- id: 'bio',
1419
- icon: 'text-box-outline',
1420
- iconColor: colors.sidebarIconPersonalInfo,
1421
- title: t('editProfile.items.bio.title') || 'Bio',
1422
- subtitle: bio || t('editProfile.items.bio.placeholder') || 'Tell people about yourself',
1423
- onPress: handleOpenBioModal
1424
- }, {
1425
- id: 'locations',
1426
- icon: 'map-marker-outline',
1427
- iconColor: colors.sidebarIconSharing,
1428
- title: t('editProfile.items.locations.title') || 'Locations',
1429
- subtitle: locations.length > 0 ? locations.length === 1 ? t('editProfile.items.locations.count', {
1430
- count: locations.length
1431
- }) || `${locations.length} location added` : t('editProfile.items.locations.count_plural', {
1432
- count: locations.length
1433
- }) || `${locations.length} locations added` : t('editProfile.items.locations.add') || 'Add your locations',
1434
- onPress: handleOpenLocationModal
1435
- }, {
1436
- id: 'links',
1437
- icon: 'link-variant',
1438
- iconColor: colors.sidebarIconSharing,
1439
- title: t('editProfile.items.links.title') || 'Links',
1440
- subtitle: linksMetadata.length > 0 ? linksMetadata.length === 1 ? t('editProfile.items.links.count', {
1441
- count: linksMetadata.length
1442
- }) || `${linksMetadata.length} link added` : t('editProfile.items.links.count_plural', {
1443
- count: linksMetadata.length
1444
- }) || `${linksMetadata.length} links added` : t('editProfile.items.links.add') || 'Add your links',
1445
- onPress: handleOpenLinksModal
1446
- }]
1447
- })
1448
- })]
1449
- }), /*#__PURE__*/_jsxs(View, {
1450
- ref: quickActionsSectionRef,
1451
- style: styles.section,
1452
- onLayout: event => {
1453
- const {
1454
- y
1455
- } = event.nativeEvent.layout;
1456
- setQuickActionsSectionY(y);
1457
- },
1458
- children: [/*#__PURE__*/_jsx(Text, {
1459
- style: [styles.sectionTitle, {
1460
- color: colors.secondaryText
1461
- }],
1462
- children: t('editProfile.sections.quickActions') || 'QUICK ACTIONS'
1463
- }), /*#__PURE__*/_jsx(View, {
1464
- style: styles.groupedSectionWrapper,
1465
- children: /*#__PURE__*/_jsx(GroupedSection, {
1466
- items: [{
1467
- id: 'preview-profile',
1468
- icon: 'eye',
1469
- iconColor: colors.sidebarIconHome,
1470
- title: t('editProfile.items.previewProfile.title') || 'Preview Profile',
1471
- subtitle: t('editProfile.items.previewProfile.subtitle') || 'See how your profile looks to others',
1472
- onPress: () => navigate?.('Profile', {
1473
- userId: finalUser?.id
1474
- })
1475
- }, {
1476
- id: 'privacy-settings',
1477
- icon: 'shield-check',
1478
- iconColor: colors.sidebarIconSecurity,
1479
- title: t('editProfile.items.privacySettings.title') || 'Privacy Settings',
1480
- subtitle: t('editProfile.items.privacySettings.subtitle') || 'Control who can see your profile',
1481
- onPress: () => navigate?.('PrivacySettings')
1482
- }, {
1483
- id: 'verify-account',
1484
- icon: 'check-circle',
1485
- iconColor: colors.sidebarIconPersonalInfo,
1486
- title: t('editProfile.items.verifyAccount.title') || 'Verify Account',
1487
- subtitle: t('editProfile.items.verifyAccount.subtitle') || 'Get a verified badge',
1488
- onPress: () => navigate?.('AccountVerification')
1489
- }]
1490
- })
1491
- })]
1492
- }), /*#__PURE__*/_jsxs(View, {
1493
- ref: securitySectionRef,
1494
- style: styles.section,
1495
- onLayout: event => {
1496
- const {
1497
- y
1498
- } = event.nativeEvent.layout;
1499
- setSecuritySectionY(y);
1500
- },
1501
- children: [/*#__PURE__*/_jsx(Text, {
1502
- style: [styles.sectionTitle, {
1503
- color: colors.secondaryText
1504
- }],
1505
- children: t('editProfile.sections.security') || 'SECURITY'
1506
- }), /*#__PURE__*/_jsx(View, {
1507
- style: styles.groupedSectionWrapper
1508
- })]
358
+ }), /*#__PURE__*/_jsx(View, {
359
+ style: {
360
+ position: 'absolute',
361
+ top: 0,
362
+ left: 0,
363
+ right: 0,
364
+ bottom: 0,
365
+ justifyContent: 'center',
366
+ alignItems: 'center',
367
+ backgroundColor: colorScheme === 'dark' ? 'rgba(0, 0, 0, 0.4)' : 'rgba(255, 255, 255, 0.7)',
368
+ borderRadius: 18
369
+ },
370
+ children: /*#__PURE__*/_jsx(ActivityIndicator, {
371
+ size: "small",
372
+ color: colors.tint
373
+ })
374
+ })]
375
+ }) : /*#__PURE__*/_jsx(Image, {
376
+ source: {
377
+ uri: oxyServices.getFileDownloadUrl(optimisticAvatarId || avatarFileId, 'thumb')
378
+ },
379
+ style: {
380
+ width: 36,
381
+ height: 36,
382
+ borderRadius: 18
383
+ }
384
+ }) : undefined,
385
+ icon: !(optimisticAvatarId || avatarFileId) ? 'account-outline' : undefined,
386
+ iconColor: colors.sidebarIconPersonalInfo,
387
+ title: 'Profile Photo',
388
+ subtitle: isUpdatingAvatar ? 'Updating profile picture...' : avatarFileId ? 'Tap to change your profile picture' : 'Tap to add a profile picture',
389
+ onPress: isUpdatingAvatar ? undefined : openAvatarPicker,
390
+ disabled: isUpdatingAvatar
391
+ }, ...(avatarFileId && !isUpdatingAvatar ? [{
392
+ id: 'remove-profile-photo',
393
+ icon: 'delete-outline',
394
+ iconColor: colors.sidebarIconSharing,
395
+ title: 'Remove Photo',
396
+ subtitle: 'Delete current profile picture',
397
+ onPress: handleAvatarRemove
398
+ }] : [])]
399
+ })
1509
400
  })]
1510
- })
1511
- }), /*#__PURE__*/_jsx(EditDisplayNameModal, {
1512
- visible: showEditDisplayNameModal,
1513
- onClose: () => setShowEditDisplayNameModal(false),
1514
- initialDisplayName: displayName,
1515
- initialLastName: lastName,
1516
- theme: normalizedTheme,
1517
- onSave: handleModalSave
1518
- }), /*#__PURE__*/_jsx(EditUsernameModal, {
1519
- visible: showEditUsernameModal,
1520
- onClose: () => setShowEditUsernameModal(false),
1521
- initialValue: username,
1522
- theme: normalizedTheme,
1523
- onSave: handleModalSave
1524
- }), /*#__PURE__*/_jsx(EditEmailModal, {
1525
- visible: showEditEmailModal,
1526
- onClose: () => setShowEditEmailModal(false),
1527
- initialValue: email,
1528
- theme: normalizedTheme,
1529
- onSave: handleModalSave
1530
- }), /*#__PURE__*/_jsx(EditBioModal, {
1531
- visible: showEditBioModal,
1532
- onClose: () => setShowEditBioModal(false),
1533
- initialValue: bio,
1534
- theme: normalizedTheme,
1535
- onSave: handleModalSave
1536
- }), /*#__PURE__*/_jsx(EditLocationModal, {
1537
- visible: showEditLocationModal,
1538
- onClose: () => setShowEditLocationModal(false),
1539
- initialLocations: locations,
1540
- theme: normalizedTheme,
1541
- onSave: handleModalSave
1542
- }), /*#__PURE__*/_jsx(EditLinksModal, {
1543
- visible: showEditLinksModal,
1544
- onClose: () => setShowEditLinksModal(false),
1545
- initialLinks: linksMetadata,
1546
- theme: normalizedTheme,
1547
- onSave: handleModalSave
1548
- })]
401
+ }), /*#__PURE__*/_jsxs(View, {
402
+ ref: basicInfoSectionRef,
403
+ style: styles.section,
404
+ onLayout: event => {
405
+ const {
406
+ y
407
+ } = event.nativeEvent.layout;
408
+ setBasicInfoSectionY(y);
409
+ },
410
+ children: [/*#__PURE__*/_jsx(Text, {
411
+ style: [styles.sectionTitle, {
412
+ color: colors.secondaryText
413
+ }],
414
+ children: t('editProfile.sections.basicInfo') || 'BASIC INFORMATION'
415
+ }), /*#__PURE__*/_jsx(View, {
416
+ style: styles.groupedSectionWrapper,
417
+ children: /*#__PURE__*/_jsx(GroupedSection, {
418
+ items: [{
419
+ id: 'display-name',
420
+ icon: 'account-outline',
421
+ iconColor: colors.sidebarIconPersonalInfo,
422
+ title: t('editProfile.items.displayName.title') || 'Display Name',
423
+ subtitle: [displayName, lastName].filter(Boolean).join(' ') || t('editProfile.items.displayName.add') || 'Add your display name',
424
+ onPress: handleOpenDisplayNameModal
425
+ }, {
426
+ id: 'username',
427
+ icon: 'at',
428
+ iconColor: colors.sidebarIconData,
429
+ title: t('editProfile.items.username.title') || 'Username',
430
+ subtitle: username || t('editProfile.items.username.choose') || 'Choose a username',
431
+ onPress: handleOpenUsernameModal
432
+ }, {
433
+ id: 'email',
434
+ icon: 'email-outline',
435
+ iconColor: colors.sidebarIconSecurity,
436
+ title: t('editProfile.items.email.title') || 'Email',
437
+ subtitle: email || t('editProfile.items.email.add') || 'Add your email address',
438
+ onPress: handleOpenEmailModal
439
+ }]
440
+ })
441
+ })]
442
+ }), /*#__PURE__*/_jsxs(View, {
443
+ ref: aboutSectionRef,
444
+ style: styles.section,
445
+ onLayout: event => {
446
+ const {
447
+ y
448
+ } = event.nativeEvent.layout;
449
+ setAboutSectionY(y);
450
+ },
451
+ children: [/*#__PURE__*/_jsx(Text, {
452
+ style: [styles.sectionTitle, {
453
+ color: colors.secondaryText
454
+ }],
455
+ children: t('editProfile.sections.about') || 'ABOUT YOU'
456
+ }), /*#__PURE__*/_jsx(View, {
457
+ style: styles.groupedSectionWrapper,
458
+ children: /*#__PURE__*/_jsx(GroupedSection, {
459
+ items: [{
460
+ id: 'bio',
461
+ icon: 'text-box-outline',
462
+ iconColor: colors.sidebarIconPersonalInfo,
463
+ title: t('editProfile.items.bio.title') || 'Bio',
464
+ subtitle: bio || t('editProfile.items.bio.placeholder') || 'Tell people about yourself',
465
+ onPress: handleOpenBioModal
466
+ }, {
467
+ id: 'locations',
468
+ icon: 'map-marker-outline',
469
+ iconColor: colors.sidebarIconSharing,
470
+ title: t('editProfile.items.locations.title') || 'Locations',
471
+ subtitle: locations.length > 0 ? locations.length === 1 ? t('editProfile.items.locations.count', {
472
+ count: locations.length
473
+ }) || `${locations.length} location added` : t('editProfile.items.locations.count_plural', {
474
+ count: locations.length
475
+ }) || `${locations.length} locations added` : t('editProfile.items.locations.add') || 'Add your locations',
476
+ onPress: handleOpenLocationModal
477
+ }, {
478
+ id: 'links',
479
+ icon: 'link-variant',
480
+ iconColor: colors.sidebarIconSharing,
481
+ title: t('editProfile.items.links.title') || 'Links',
482
+ subtitle: linksMetadata.length > 0 ? linksMetadata.length === 1 ? t('editProfile.items.links.count', {
483
+ count: linksMetadata.length
484
+ }) || `${linksMetadata.length} link added` : t('editProfile.items.links.count_plural', {
485
+ count: linksMetadata.length
486
+ }) || `${linksMetadata.length} links added` : t('editProfile.items.links.add') || 'Add your links',
487
+ onPress: handleOpenLinksModal
488
+ }]
489
+ })
490
+ })]
491
+ }), /*#__PURE__*/_jsxs(View, {
492
+ ref: quickActionsSectionRef,
493
+ style: styles.section,
494
+ onLayout: event => {
495
+ const {
496
+ y
497
+ } = event.nativeEvent.layout;
498
+ setQuickActionsSectionY(y);
499
+ },
500
+ children: [/*#__PURE__*/_jsx(Text, {
501
+ style: [styles.sectionTitle, {
502
+ color: colors.secondaryText
503
+ }],
504
+ children: t('editProfile.sections.quickActions') || 'QUICK ACTIONS'
505
+ }), /*#__PURE__*/_jsx(View, {
506
+ style: styles.groupedSectionWrapper,
507
+ children: /*#__PURE__*/_jsx(GroupedSection, {
508
+ items: [{
509
+ id: 'preview-profile',
510
+ icon: 'eye',
511
+ iconColor: colors.sidebarIconHome,
512
+ title: t('editProfile.items.previewProfile.title') || 'Preview Profile',
513
+ subtitle: t('editProfile.items.previewProfile.subtitle') || 'See how your profile looks to others',
514
+ onPress: () => navigate?.('Profile', {
515
+ userId: finalUser?.id
516
+ })
517
+ }, {
518
+ id: 'privacy-settings',
519
+ icon: 'shield-check',
520
+ iconColor: colors.sidebarIconSecurity,
521
+ title: t('editProfile.items.privacySettings.title') || 'Privacy Settings',
522
+ subtitle: t('editProfile.items.privacySettings.subtitle') || 'Control who can see your profile',
523
+ onPress: () => navigate?.('PrivacySettings')
524
+ }, {
525
+ id: 'verify-account',
526
+ icon: 'check-circle',
527
+ iconColor: colors.sidebarIconPersonalInfo,
528
+ title: t('editProfile.items.verifyAccount.title') || 'Verify Account',
529
+ subtitle: t('editProfile.items.verifyAccount.subtitle') || 'Get a verified badge',
530
+ onPress: () => navigate?.('AccountVerification')
531
+ }]
532
+ })
533
+ })]
534
+ }), /*#__PURE__*/_jsxs(View, {
535
+ ref: securitySectionRef,
536
+ style: styles.section,
537
+ onLayout: event => {
538
+ const {
539
+ y
540
+ } = event.nativeEvent.layout;
541
+ setSecuritySectionY(y);
542
+ },
543
+ children: [/*#__PURE__*/_jsx(Text, {
544
+ style: [styles.sectionTitle, {
545
+ color: colors.secondaryText
546
+ }],
547
+ children: t('editProfile.sections.security') || 'SECURITY'
548
+ }), /*#__PURE__*/_jsx(View, {
549
+ style: styles.groupedSectionWrapper
550
+ })]
551
+ })]
552
+ })
1549
553
  });
1550
554
  };
1551
555
  const styles = StyleSheet.create({
@@ -1556,13 +560,6 @@ const styles = StyleSheet.create({
1556
560
  content: {
1557
561
  flexShrink: 1
1558
562
  },
1559
- scrollView: {
1560
- flexShrink: 1
1561
- },
1562
- contentEditing: {
1563
- flex: 1,
1564
- padding: 0
1565
- },
1566
563
  scrollContent: createScreenContentStyle(HEADER_PADDING_TOP_SETTINGS),
1567
564
  headerContainer: {
1568
565
  width: '100%',
@@ -1576,7 +573,7 @@ const styles = StyleSheet.create({
1576
573
  gap: COMPONENT_GAP
1577
574
  },
1578
575
  modernTitle: {
1579
- fontFamily: fontFamilies.phuduBold,
576
+ fontFamily: fontFamilies.interBold,
1580
577
  fontWeight: Platform.OS === 'web' ? 'bold' : undefined,
1581
578
  fontSize: 42,
1582
579
  lineHeight: 50.4,
@@ -1598,558 +595,14 @@ const styles = StyleSheet.create({
1598
595
  sectionTitle: {
1599
596
  fontSize: 13,
1600
597
  fontWeight: '600',
1601
- color: '#8E8E93',
1602
598
  marginBottom: 8,
1603
599
  marginTop: 4,
1604
600
  textTransform: 'uppercase',
1605
601
  letterSpacing: 0.5,
1606
- fontFamily: fontFamilies.phuduSemiBold
602
+ fontFamily: fontFamilies.interSemiBold
1607
603
  },
1608
604
  groupedSectionWrapper: {
1609
605
  backgroundColor: 'transparent'
1610
- },
1611
- userIcon: {
1612
- marginRight: 12
1613
- },
1614
- // Editing-only mode styles
1615
- editingOnlyContainer: {
1616
- flex: 1
1617
- },
1618
- editingFieldContainer: {
1619
- backgroundColor: '#fff',
1620
- padding: 16,
1621
- flex: 1
1622
- },
1623
- editingFieldHeader: {
1624
- marginBottom: 8,
1625
- flexDirection: 'row',
1626
- alignItems: 'center'
1627
- },
1628
- editingFieldTitleContainer: {
1629
- flexDirection: 'row',
1630
- alignItems: 'center'
1631
- },
1632
- editingFieldIcon: {
1633
- marginRight: 12
1634
- },
1635
- editingFieldTitle: {
1636
- fontSize: 20,
1637
- fontWeight: '600',
1638
- color: '#000'
1639
- },
1640
- editingFieldContent: {
1641
- flex: 1
1642
- },
1643
- newValueSection: {
1644
- flex: 1
1645
- },
1646
- editingFieldLabel: {
1647
- fontSize: 13,
1648
- fontWeight: '600',
1649
- marginBottom: 8,
1650
- fontFamily: fontFamilies.phuduSemiBold,
1651
- textTransform: 'uppercase',
1652
- letterSpacing: 0.5
1653
- },
1654
- editingFieldInput: {
1655
- borderWidth: StyleSheet.hairlineWidth,
1656
- borderRadius: 14,
1657
- padding: 16,
1658
- fontSize: 17,
1659
- minHeight: 52,
1660
- fontWeight: '400',
1661
- letterSpacing: -0.2
1662
- },
1663
- editingFieldDescription: {
1664
- fontSize: 14,
1665
- color: '#666',
1666
- marginBottom: 16
1667
- },
1668
- primaryButton: {
1669
- flexDirection: 'row',
1670
- alignItems: 'center',
1671
- justifyContent: 'center',
1672
- gap: 8,
1673
- // backgroundColor should be applied inline using colors.iconSecurity
1674
- paddingVertical: 12,
1675
- paddingHorizontal: 16,
1676
- borderRadius: 10
1677
- },
1678
- primaryButtonText: {
1679
- color: '#fff',
1680
- fontSize: 16,
1681
- fontWeight: '600'
1682
- },
1683
- editingFieldTextArea: {
1684
- borderWidth: StyleSheet.hairlineWidth,
1685
- borderRadius: 14,
1686
- padding: 16,
1687
- fontSize: 17,
1688
- minHeight: 120,
1689
- textAlignVertical: 'top',
1690
- fontWeight: '400',
1691
- letterSpacing: -0.2
1692
- },
1693
- // Custom editing header styles
1694
- editingHeader: {
1695
- paddingTop: Platform.OS === 'ios' ? 50 : 16,
1696
- paddingBottom: 0,
1697
- borderBottomWidth: StyleSheet.hairlineWidth
1698
- },
1699
- editingHeaderContent: {
1700
- flexDirection: 'row',
1701
- alignItems: 'center',
1702
- paddingHorizontal: 16,
1703
- minHeight: 44
1704
- },
1705
- editingBackButton: {
1706
- width: 36,
1707
- height: 36,
1708
- borderRadius: 20,
1709
- alignItems: 'center',
1710
- justifyContent: 'center',
1711
- marginRight: 12
1712
- },
1713
- editingTitleContainer: {
1714
- flex: 1,
1715
- flexDirection: 'column',
1716
- alignItems: 'flex-start',
1717
- justifyContent: 'flex-end',
1718
- paddingBottom: 8
1719
- },
1720
- editingTitleIcon: {
1721
- marginBottom: 4,
1722
- alignSelf: 'flex-start'
1723
- },
1724
- editingTitle: {
1725
- fontSize: 18,
1726
- fontWeight: '700',
1727
- fontFamily: fontFamilies.phuduBold,
1728
- letterSpacing: -0.3,
1729
- lineHeight: 22,
1730
- textAlign: 'left',
1731
- alignSelf: 'flex-start'
1732
- },
1733
- editingSaveButton: {
1734
- paddingHorizontal: 16,
1735
- paddingVertical: 8,
1736
- borderRadius: 20,
1737
- minWidth: 60,
1738
- alignItems: 'center',
1739
- justifyContent: 'center'
1740
- },
1741
- editingSaveButtonText: {
1742
- fontSize: 16,
1743
- fontWeight: '600',
1744
- fontFamily: fontFamilies.phuduSemiBold
1745
- },
1746
- editingHeaderBottom: {
1747
- flexDirection: 'column',
1748
- alignItems: 'flex-start',
1749
- paddingHorizontal: 20,
1750
- paddingBottom: 20,
1751
- paddingTop: 24
1752
- },
1753
- editingIconContainer: {
1754
- width: 64,
1755
- height: 64,
1756
- borderRadius: 20,
1757
- alignItems: 'center',
1758
- justifyContent: 'center',
1759
- marginBottom: 16
1760
- },
1761
- editingBottomTitle: {
1762
- fontSize: 28,
1763
- fontWeight: '700',
1764
- fontFamily: fontFamilies.phuduBold,
1765
- letterSpacing: -0.5,
1766
- lineHeight: 34,
1767
- textAlign: 'left',
1768
- alignSelf: 'flex-start'
1769
- },
1770
- // Links management styles
1771
- addLinkSection: {
1772
- marginBottom: 16,
1773
- padding: 12,
1774
- backgroundColor: '#F8F9FA',
1775
- borderRadius: 8,
1776
- borderWidth: 1,
1777
- borderColor: '#E9ECEF'
1778
- },
1779
- addLinkLabel: {
1780
- fontSize: 14,
1781
- fontWeight: '600',
1782
- color: '#333',
1783
- marginBottom: 8
1784
- },
1785
- addLinkInputContainer: {
1786
- gap: 8
1787
- },
1788
- addLinkInput: {
1789
- backgroundColor: '#fff',
1790
- borderWidth: 1,
1791
- borderColor: '#E9ECEF',
1792
- borderRadius: 6,
1793
- padding: 10,
1794
- fontSize: 14,
1795
- minHeight: 36
1796
- },
1797
- addLinkButtons: {
1798
- flexDirection: 'row',
1799
- gap: 6
1800
- },
1801
- addLinkButton: {
1802
- flex: 1,
1803
- paddingVertical: 8,
1804
- paddingHorizontal: 12,
1805
- borderRadius: 6,
1806
- alignItems: 'center',
1807
- justifyContent: 'center'
1808
- },
1809
- cancelButton: {
1810
- backgroundColor: '#F8F9FA',
1811
- borderWidth: 1,
1812
- borderColor: '#E9ECEF'
1813
- },
1814
- cancelButtonText: {
1815
- fontSize: 14,
1816
- fontWeight: '600',
1817
- color: '#6C757D'
1818
- },
1819
- addButton: {
1820
- // backgroundColor should be applied inline using colors.iconSecurity
1821
- },
1822
- addButtonText: {
1823
- fontSize: 14,
1824
- fontWeight: '600',
1825
- color: '#fff'
1826
- },
1827
- addLinkTrigger: {
1828
- flexDirection: 'row',
1829
- alignItems: 'center',
1830
- padding: 12,
1831
- backgroundColor: '#F8F9FA',
1832
- borderRadius: 8,
1833
- borderWidth: 1,
1834
- borderColor: '#E9ECEF',
1835
- borderStyle: 'dashed',
1836
- marginBottom: 16
1837
- },
1838
- addLinkTriggerText: {
1839
- fontSize: 14,
1840
- fontWeight: '600',
1841
- // color should be applied inline using colors.iconSecurity
1842
- marginLeft: 6
1843
- },
1844
- linksList: {
1845
- gap: 8
1846
- },
1847
- linksListTitle: {
1848
- fontSize: 16,
1849
- fontWeight: '700',
1850
- color: '#333',
1851
- marginBottom: 6
1852
- },
1853
- linkItem: {
1854
- backgroundColor: '#fff',
1855
- borderRadius: 8,
1856
- borderWidth: 1,
1857
- borderColor: '#E9ECEF',
1858
- overflow: 'hidden'
1859
- },
1860
- linkItemContent: {
1861
- flexDirection: 'row',
1862
- padding: 12,
1863
- alignItems: 'center'
1864
- },
1865
- linkItemDragHandle: {
1866
- width: 24,
1867
- height: 24,
1868
- alignItems: 'center',
1869
- justifyContent: 'center',
1870
- marginRight: 8
1871
- },
1872
- linkItemInfo: {
1873
- flex: 1,
1874
- marginRight: 8
1875
- },
1876
- linkItemTitle: {
1877
- fontSize: 14,
1878
- fontWeight: '600',
1879
- color: '#333',
1880
- marginBottom: 2
1881
- },
1882
- linkItemDescription: {
1883
- fontSize: 12,
1884
- color: '#666',
1885
- marginBottom: 2
1886
- },
1887
- linkItemUrl: {
1888
- fontSize: 12,
1889
- color: '#6C757D'
1890
- },
1891
- linkItemActions: {
1892
- flexDirection: 'row',
1893
- gap: 6
1894
- },
1895
- linkItemButton: {
1896
- width: 28,
1897
- height: 28,
1898
- borderRadius: 14,
1899
- backgroundColor: '#F8F9FA',
1900
- alignItems: 'center',
1901
- justifyContent: 'center'
1902
- },
1903
- linkItemDivider: {
1904
- height: 1,
1905
- backgroundColor: '#E9ECEF',
1906
- marginHorizontal: 12
1907
- },
1908
- reorderHint: {
1909
- padding: 8,
1910
- alignItems: 'center'
1911
- },
1912
- reorderHintText: {
1913
- fontSize: 12,
1914
- color: '#999',
1915
- fontStyle: 'italic'
1916
- },
1917
- reorderButtons: {
1918
- flexDirection: 'column',
1919
- gap: 2
1920
- },
1921
- reorderButton: {
1922
- width: 20,
1923
- height: 16,
1924
- borderRadius: 3,
1925
- backgroundColor: '#F8F9FA',
1926
- alignItems: 'center',
1927
- justifyContent: 'center',
1928
- borderWidth: 1,
1929
- borderColor: '#E9ECEF'
1930
- },
1931
- reorderButtonDisabled: {
1932
- opacity: 0.3
1933
- },
1934
- linkItemImage: {
1935
- width: 32,
1936
- height: 32,
1937
- borderRadius: 16,
1938
- // backgroundColor should be applied inline using colors.iconSecurity
1939
- alignItems: 'center',
1940
- justifyContent: 'center',
1941
- marginRight: 8
1942
- },
1943
- linkItemImageText: {
1944
- fontSize: 12,
1945
- fontWeight: '600',
1946
- color: '#fff'
1947
- },
1948
- fetchingText: {
1949
- fontSize: 12,
1950
- // color should be applied inline using colors.iconSecurity
1951
- fontStyle: 'italic'
1952
- },
1953
- linksFieldContent: {
1954
- flex: 1,
1955
- marginLeft: 12
1956
- },
1957
- linksPreview: {
1958
- marginTop: 4,
1959
- flexDirection: 'column'
1960
- },
1961
- linksPreviewContainer: {
1962
- marginTop: 4,
1963
- flexDirection: 'column',
1964
- width: '100%'
1965
- },
1966
- linkPreviewItem: {
1967
- flexDirection: 'row',
1968
- alignItems: 'center',
1969
- marginBottom: 4
1970
- },
1971
- linkPreviewImage: {
1972
- width: 20,
1973
- height: 20,
1974
- borderRadius: 10,
1975
- // backgroundColor should be applied inline using colors.iconSecurity
1976
- alignItems: 'center',
1977
- justifyContent: 'center',
1978
- marginRight: 6
1979
- },
1980
- linkPreviewImageText: {
1981
- fontSize: 10,
1982
- fontWeight: '600',
1983
- color: '#fff'
1984
- },
1985
- linkPreviewTitle: {
1986
- fontSize: 13,
1987
- color: '#666',
1988
- flex: 1
1989
- },
1990
- linkPreviewContent: {
1991
- flex: 1
1992
- },
1993
- linkPreviewSubtitle: {
1994
- fontSize: 11,
1995
- color: '#999',
1996
- marginTop: 1
1997
- },
1998
- linkPreviewMore: {
1999
- fontSize: 12,
2000
- color: '#999',
2001
- fontStyle: 'italic'
2002
- },
2003
- // Location management styles
2004
- addLocationSection: {
2005
- marginBottom: 16
2006
- },
2007
- addLocationLabel: {
2008
- fontSize: 14,
2009
- fontWeight: '600',
2010
- color: '#333',
2011
- marginBottom: 8,
2012
- fontFamily: fontFamilies.phuduSemiBold
2013
- },
2014
- searchingText: {
2015
- fontSize: 12,
2016
- // color should be applied inline using colors.iconSecurity
2017
- fontStyle: 'italic'
2018
- },
2019
- addLocationInputContainer: {
2020
- marginBottom: 8
2021
- },
2022
- addLocationInput: {
2023
- backgroundColor: '#fff',
2024
- borderWidth: 2,
2025
- borderColor: '#e0e0e0',
2026
- borderRadius: 12,
2027
- padding: 16,
2028
- fontSize: 17,
2029
- minHeight: 52,
2030
- fontWeight: '400',
2031
- marginBottom: 8
2032
- },
2033
- addLocationButtons: {
2034
- flexDirection: 'row',
2035
- gap: 8
2036
- },
2037
- addLocationButton: {
2038
- flex: 1,
2039
- paddingVertical: 12,
2040
- paddingHorizontal: 16,
2041
- borderRadius: 8,
2042
- alignItems: 'center',
2043
- justifyContent: 'center'
2044
- },
2045
- addLocationTrigger: {
2046
- flexDirection: 'row',
2047
- alignItems: 'center',
2048
- paddingVertical: 12,
2049
- paddingHorizontal: 16,
2050
- backgroundColor: '#F8F9FA',
2051
- borderRadius: 8,
2052
- marginBottom: 16
2053
- },
2054
- addLocationTriggerText: {
2055
- marginLeft: 8,
2056
- fontSize: 16,
2057
- // color should be applied inline using colors.iconSecurity
2058
- fontWeight: '500'
2059
- },
2060
- searchResults: {
2061
- backgroundColor: '#fff',
2062
- borderWidth: 1,
2063
- borderColor: '#e0e0e0',
2064
- borderRadius: 8,
2065
- maxHeight: 200
2066
- },
2067
- searchResultItem: {
2068
- padding: 12,
2069
- borderBottomWidth: 1,
2070
- borderBottomColor: '#f0f0f0'
2071
- },
2072
- searchResultName: {
2073
- fontSize: 14,
2074
- fontWeight: '500',
2075
- color: '#333',
2076
- marginBottom: 2
2077
- },
2078
- searchResultType: {
2079
- fontSize: 12,
2080
- color: '#666',
2081
- textTransform: 'capitalize'
2082
- },
2083
- locationsList: {
2084
- marginTop: 8
2085
- },
2086
- locationsListTitle: {
2087
- fontSize: 14,
2088
- fontWeight: '600',
2089
- color: '#333',
2090
- marginBottom: 12,
2091
- fontFamily: fontFamilies.phuduSemiBold
2092
- },
2093
- locationItem: {
2094
- marginBottom: 8
2095
- },
2096
- locationItemContent: {
2097
- flexDirection: 'row',
2098
- alignItems: 'center',
2099
- padding: 12,
2100
- backgroundColor: '#F8F9FA',
2101
- borderRadius: 8
2102
- },
2103
- locationItemDragHandle: {
2104
- marginRight: 12
2105
- },
2106
- locationItemInfo: {
2107
- flex: 1
2108
- },
2109
- locationItemHeader: {
2110
- flexDirection: 'row',
2111
- alignItems: 'center',
2112
- marginBottom: 4
2113
- },
2114
- locationItemName: {
2115
- fontSize: 14,
2116
- fontWeight: '500',
2117
- color: '#333',
2118
- flex: 1
2119
- },
2120
- locationLabel: {
2121
- // backgroundColor should be applied inline using colors.iconSecurity
2122
- paddingHorizontal: 6,
2123
- paddingVertical: 2,
2124
- borderRadius: 4,
2125
- marginLeft: 8
2126
- },
2127
- locationLabelText: {
2128
- fontSize: 10,
2129
- fontWeight: '600',
2130
- color: '#fff',
2131
- textTransform: 'uppercase'
2132
- },
2133
- locationCoordinates: {
2134
- fontSize: 12,
2135
- color: '#666',
2136
- fontFamily: 'monospace'
2137
- },
2138
- locationItemActions: {
2139
- marginLeft: 8
2140
- },
2141
- locationItemButton: {
2142
- width: 28,
2143
- height: 28,
2144
- borderRadius: 14,
2145
- backgroundColor: '#F8F9FA',
2146
- alignItems: 'center',
2147
- justifyContent: 'center'
2148
- },
2149
- locationItemDivider: {
2150
- height: 1,
2151
- backgroundColor: '#E9ECEF',
2152
- marginHorizontal: 12
2153
606
  }
2154
607
  });
2155
608
  export default /*#__PURE__*/React.memo(AccountSettingsScreen);