@oxy.so/services 12.10.0 → 12.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/ui/components/OxyAuthChooser.js +8 -1
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/accountSettings/AccountCategoriesSection.js +142 -0
- package/lib/commonjs/ui/components/accountSettings/AccountCategoriesSection.js.map +1 -0
- package/lib/commonjs/ui/components/accountSettings/AccountSettings.js +361 -0
- package/lib/commonjs/ui/components/accountSettings/AccountSettings.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +15 -2
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAvatarPicker.js +54 -48
- package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +16 -237
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ChangeAvatarScreen.js +23 -4
- package/lib/commonjs/ui/screens/ChangeAvatarScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +11 -3
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/index.js +7 -0
- package/lib/commonjs/ui/screens/index.js.map +1 -1
- package/lib/module/ui/components/OxyAuthChooser.js +8 -1
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/accountSettings/AccountCategoriesSection.js +134 -0
- package/lib/module/ui/components/accountSettings/AccountCategoriesSection.js.map +1 -0
- package/lib/module/ui/components/accountSettings/AccountSettings.js +355 -0
- package/lib/module/ui/components/accountSettings/AccountSettings.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +15 -2
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/useAvatarPicker.js +53 -48
- package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +16 -235
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ChangeAvatarScreen.js +23 -4
- package/lib/module/ui/screens/ChangeAvatarScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +11 -3
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/index.js +4 -0
- package/lib/module/ui/screens/index.js.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/accountSettings/AccountCategoriesSection.d.ts +26 -0
- package/lib/typescript/commonjs/ui/components/accountSettings/AccountCategoriesSection.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/accountSettings/AccountSettings.d.ts +80 -0
- package/lib/typescript/commonjs/ui/components/accountSettings/AccountSettings.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts +22 -1
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts +4 -5
- package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ChangeAvatarScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/index.d.ts +1 -0
- package/lib/typescript/commonjs/ui/screens/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/accountSettings/AccountCategoriesSection.d.ts +26 -0
- package/lib/typescript/module/ui/components/accountSettings/AccountCategoriesSection.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/accountSettings/AccountSettings.d.ts +80 -0
- package/lib/typescript/module/ui/components/accountSettings/AccountSettings.d.ts.map +1 -0
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +22 -1
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts +4 -5
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ChangeAvatarScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/index.d.ts +1 -0
- package/lib/typescript/module/ui/screens/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/ui/components/OxyAuthChooser.tsx +9 -1
- package/src/ui/components/accountSettings/AccountCategoriesSection.tsx +180 -0
- package/src/ui/components/accountSettings/AccountSettings.tsx +421 -0
- package/src/ui/components/accountSettings/__tests__/AccountSettings.test.tsx +101 -0
- package/src/ui/context/OxyContext.tsx +11 -2
- package/src/ui/hooks/useAvatarPicker.ts +65 -69
- package/src/ui/screens/AccountSettingsScreen.tsx +13 -277
- package/src/ui/screens/ChangeAvatarScreen.tsx +25 -6
- package/src/ui/screens/ManageAccountScreen.tsx +26 -17
- package/src/ui/screens/index.ts +8 -0
|
@@ -61,6 +61,7 @@ const ManageAccountScreen: React.FC<ManageAccountScreenProps> = ({
|
|
|
61
61
|
openAvatarPicker,
|
|
62
62
|
accounts,
|
|
63
63
|
openAccountDialog,
|
|
64
|
+
accountDialogController,
|
|
64
65
|
hasIdentity,
|
|
65
66
|
} = useOxy();
|
|
66
67
|
|
|
@@ -105,7 +106,12 @@ const ManageAccountScreen: React.FC<ManageAccountScreenProps> = ({
|
|
|
105
106
|
}
|
|
106
107
|
setSigningOut(true);
|
|
107
108
|
try {
|
|
108
|
-
await logout();
|
|
109
|
+
const result = await logout();
|
|
110
|
+
if (result?.status === 'failed') {
|
|
111
|
+
loggerUtil.warn('Sign out failed', { component: 'ManageAccountScreen' }, result.error);
|
|
112
|
+
toast.error(t('common.errors.signOutFailed') || 'Failed to sign out');
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
109
115
|
toast.success(t('common.actions.signedOut') || 'Signed out');
|
|
110
116
|
onClose?.();
|
|
111
117
|
} catch (error) {
|
|
@@ -360,22 +366,25 @@ const ManageAccountScreen: React.FC<ManageAccountScreenProps> = ({
|
|
|
360
366
|
{/* Accounts (unified account graph) */}
|
|
361
367
|
{accounts.length > 0 || isAuthenticated ? (
|
|
362
368
|
<GroupedSection title={t('accountCenter.sections.accounts') || 'Accounts'}>
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
accounts.
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
369
|
+
{/* No controller means the dialog can never open (identity-bound session). */}
|
|
370
|
+
{accountDialogController ? (
|
|
371
|
+
<GroupedSectionItem
|
|
372
|
+
icon={<SettingsIcon name="account-switch" color={bloomTheme.colors.info} />}
|
|
373
|
+
title={t('accounts.manage.switch.title') || 'Switch account'}
|
|
374
|
+
description={
|
|
375
|
+
accounts.length > 0
|
|
376
|
+
? // One account is "1 account", not "1 accounts".
|
|
377
|
+
t(
|
|
378
|
+
accounts.length === 1
|
|
379
|
+
? 'accounts.manage.switch.countOne'
|
|
380
|
+
: 'accounts.manage.switch.count',
|
|
381
|
+
{ count: accounts.length },
|
|
382
|
+
)
|
|
383
|
+
: t('accounts.manage.switch.empty') || 'Accounts you own or share'
|
|
384
|
+
}
|
|
385
|
+
onPress={() => openAccountDialog('accounts')}
|
|
386
|
+
/>
|
|
387
|
+
) : null}
|
|
379
388
|
<GroupedSectionItem
|
|
380
389
|
icon={<SettingsIcon name="account-plus" color={bloomTheme.colors.primary} />}
|
|
381
390
|
title={t('accounts.create.title') || 'Create account'}
|
package/src/ui/screens/index.ts
CHANGED
|
@@ -18,3 +18,11 @@ export { default as AccountSettingsScreen } from './AccountSettingsScreen';
|
|
|
18
18
|
|
|
19
19
|
export { default as SupervisionScreen } from './SupervisionScreen';
|
|
20
20
|
export { default as OxyOneScreen } from './OxyOneScreen';
|
|
21
|
+
|
|
22
|
+
// The body of the `AccountSettings` surface, for an app embedding a managed
|
|
23
|
+
// account's settings in its own page with its own sections around them.
|
|
24
|
+
export {
|
|
25
|
+
AccountSettings,
|
|
26
|
+
type AccountSettingsProps,
|
|
27
|
+
type AccountSettingsArchiveOptions,
|
|
28
|
+
} from '../components/accountSettings/AccountSettings';
|