@dxos/shell 0.5.1-next.f040be1 → 0.5.2-main.16cd857
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/dist/bundle/shell.mjs +8386 -8342
- package/dist/bundle/shell.mjs.map +1 -1
- package/dist/bundle/shell.umd.js +68 -68
- package/dist/bundle/shell.umd.js.map +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react.mjs +35 -20
- package/dist/lib/browser/react.mjs.map +3 -3
- package/dist/lib/browser/testing/index.mjs +3 -2
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/types/src/components/DeviceList/DeviceListItem.js +1 -1
- package/dist/types/src/components/DeviceList/DeviceListItem.js.map +1 -1
- package/dist/types/src/composites/Shell/Shell.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.js +11 -3
- package/dist/types/src/panels/JoinPanel/JoinPanel.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts +13 -78
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js +28 -45
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanelProps.d.ts +4 -0
- package/dist/types/src/panels/JoinPanel/JoinPanelProps.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/joinMachine.d.ts +1 -0
- package/dist/types/src/panels/JoinPanel/joinMachine.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/joinMachine.js +4 -3
- package/dist/types/src/panels/JoinPanel/joinMachine.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.js +6 -3
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.js.map +1 -1
- package/dist/types/src/panels/Panels.stories.d.ts +3 -0
- package/dist/types/src/panels/Panels.stories.d.ts.map +1 -1
- package/dist/types/src/panels/Panels.stories.js +2 -1
- package/dist/types/src/panels/Panels.stories.js.map +1 -1
- package/dist/types/src/steps/ConfirmReset.js +1 -1
- package/dist/types/src/steps/ConfirmReset.js.map +1 -1
- package/dist/types/src/steps/InvitationManager.js +1 -1
- package/dist/types/src/steps/InvitationManager.js.map +1 -1
- package/dist/types/src/testing/shell-manager.d.ts.map +1 -1
- package/dist/types/src/testing/shell-manager.js +3 -2
- package/dist/types/src/testing/shell-manager.js.map +1 -1
- package/dist/types/src/translations/locales/en-US.d.ts +2 -0
- package/dist/types/src/translations/locales/en-US.d.ts.map +1 -1
- package/dist/types/src/translations/locales/en-US.js +9 -7
- package/dist/types/src/translations/locales/en-US.js.map +1 -1
- package/package.json +21 -21
- package/src/components/DeviceList/DeviceListItem.tsx +1 -1
- package/src/composites/Shell/Shell.tsx +1 -1
- package/src/panels/JoinPanel/JoinPanel.stories.tsx +16 -44
- package/src/panels/JoinPanel/JoinPanel.tsx +12 -0
- package/src/panels/JoinPanel/JoinPanelProps.ts +4 -0
- package/src/panels/JoinPanel/joinMachine.ts +1 -1
- package/src/panels/JoinPanel/steps/InvitationAuthenticator.tsx +11 -3
- package/src/panels/Panels.stories.tsx +2 -1
- package/src/steps/ConfirmReset.tsx +1 -1
- package/src/steps/InvitationManager.tsx +1 -1
- package/src/testing/shell-manager.ts +4 -2
- package/src/translations/locales/en-US.ts +9 -7
|
@@ -7,7 +7,7 @@ import React, { type ChangeEvent, useState } from 'react';
|
|
|
7
7
|
import { Input, useTranslation } from '@dxos/react-ui';
|
|
8
8
|
import { hexToEmoji } from '@dxos/util';
|
|
9
9
|
|
|
10
|
-
import { Actions, Action, Emoji, StepHeading } from '../../../components';
|
|
10
|
+
import { Actions, Action, Emoji, StepHeading, Label } from '../../../components';
|
|
11
11
|
import { type JoinStepProps } from '../JoinPanelProps';
|
|
12
12
|
|
|
13
13
|
const pinLength = 6;
|
|
@@ -44,8 +44,7 @@ export const InvitationAuthenticator = ({
|
|
|
44
44
|
|
|
45
45
|
return (
|
|
46
46
|
<>
|
|
47
|
-
<div role='none' className='grow flex flex-col justify-center'>
|
|
48
|
-
{invitationId && <Emoji text={hexToEmoji(invitationId)} />}
|
|
47
|
+
<div role='none' className='grow flex flex-col justify-center gap-4'>
|
|
49
48
|
<Input.Root
|
|
50
49
|
{...(failed && {
|
|
51
50
|
validationValence: 'error',
|
|
@@ -74,6 +73,15 @@ export const InvitationAuthenticator = ({
|
|
|
74
73
|
</Input.DescriptionAndValidation>
|
|
75
74
|
)}
|
|
76
75
|
</Input.Root>
|
|
76
|
+
|
|
77
|
+
{invitationId && (
|
|
78
|
+
<>
|
|
79
|
+
<Label>{t('auth other device emoji message')}</Label>
|
|
80
|
+
<div className='flex justify-center'>
|
|
81
|
+
<Emoji text={hexToEmoji(invitationId)} />
|
|
82
|
+
</div>
|
|
83
|
+
</>
|
|
84
|
+
)}
|
|
77
85
|
</div>
|
|
78
86
|
<Actions>
|
|
79
87
|
<Action
|
|
@@ -10,6 +10,7 @@ import { withTheme } from '@dxos/storybook-utils';
|
|
|
10
10
|
|
|
11
11
|
import * as IdentityPanels from './IdentityPanel/IdentityPanel.stories';
|
|
12
12
|
import * as SpacePanels from './SpacePanel/SpacePanel.stories';
|
|
13
|
+
import { osTranslations } from '../translations';
|
|
13
14
|
|
|
14
15
|
const getComponentNames = (module: any): string[] =>
|
|
15
16
|
module?.__namedExportsOrder ??
|
|
@@ -55,5 +56,5 @@ export default {
|
|
|
55
56
|
title: 'react-shell/All',
|
|
56
57
|
decorators: [withTheme],
|
|
57
58
|
component: StoryRow,
|
|
58
|
-
parameters: { chromatic: { disableSnapshot: false } },
|
|
59
|
+
parameters: { chromatic: { disableSnapshot: false }, translations: [osTranslations] },
|
|
59
60
|
};
|
|
@@ -86,7 +86,7 @@ export const ConfirmResetImpl = ({
|
|
|
86
86
|
}
|
|
87
87
|
disabled={disabled}
|
|
88
88
|
data-testid={`${testIdAffix}.reset-identity-input`}
|
|
89
|
-
placeholder={confirmationValue}
|
|
89
|
+
placeholder={t('confirmation placeholder', { confirmationValue })}
|
|
90
90
|
onChange={({ target: { value } }) => setInputValue(value)}
|
|
91
91
|
/>
|
|
92
92
|
</div>
|
|
@@ -98,7 +98,7 @@ export const InvitationManager = ({
|
|
|
98
98
|
<InvitationManagerView id='showing auth code'>
|
|
99
99
|
<Label>{t('auth code message')}</Label>
|
|
100
100
|
<AuthCode code={authCode} large classNames='text-black dark:text-white' />
|
|
101
|
-
<Label>
|
|
101
|
+
<Label>{t('auth other device emoji message')}</Label>
|
|
102
102
|
{emoji && <Emoji text={emoji} />}
|
|
103
103
|
</InvitationManagerView>
|
|
104
104
|
<InvitationManagerView id='showing final'>
|
|
@@ -10,6 +10,8 @@ import { ScopedShellManager } from './scoped-shell-manager';
|
|
|
10
10
|
|
|
11
11
|
// TODO(wittjosiah): Normalize data-testids between snake and camel case.
|
|
12
12
|
|
|
13
|
+
const CONFIRM_INPUT = 'RESET';
|
|
14
|
+
|
|
13
15
|
export class ShellManager extends ScopedShellManager {
|
|
14
16
|
private _invitationCode = new Trigger<string>();
|
|
15
17
|
private _authCode = new Trigger<string>();
|
|
@@ -67,14 +69,14 @@ export class ShellManager extends ScopedShellManager {
|
|
|
67
69
|
this.page.on('dialog', handleDialog);
|
|
68
70
|
await this.shell.getByTestId('device-list-item-current.options').click();
|
|
69
71
|
await this.shell.getByTestId('device-list-item-current.reset').click();
|
|
70
|
-
await this.shell.getByTestId('reset-storage.reset-identity-input').fill(
|
|
72
|
+
await this.shell.getByTestId('reset-storage.reset-identity-input').fill(CONFIRM_INPUT);
|
|
71
73
|
await this.shell.getByTestId('reset-storage.reset-identity-confirm').click();
|
|
72
74
|
}
|
|
73
75
|
|
|
74
76
|
async joinNewIdentity(invitationCode: string) {
|
|
75
77
|
await this.shell.getByTestId('device-list-item-current.options').click();
|
|
76
78
|
await this.shell.getByTestId('device-list-item-current.join-existing').click();
|
|
77
|
-
await this.shell.getByTestId('join-new-identity.reset-identity-input').fill(
|
|
79
|
+
await this.shell.getByTestId('join-new-identity.reset-identity-input').fill(CONFIRM_INPUT);
|
|
78
80
|
await this.shell.getByTestId('join-new-identity.reset-identity-confirm').click();
|
|
79
81
|
await this.inputInvitation('device', invitationCode, this.shell);
|
|
80
82
|
}
|
|
@@ -83,25 +83,27 @@ export const os = {
|
|
|
83
83
|
'space member list heading': 'Members',
|
|
84
84
|
'space panel heading': 'Space membership',
|
|
85
85
|
'auth code message': 'Enter the following auth code on the joining device.',
|
|
86
|
+
'auth other device emoji message': 'Be sure the other device shows the following symbol:',
|
|
86
87
|
'display name input label': 'Display name',
|
|
87
88
|
'display name input placeholder': 'Enter a display name',
|
|
88
89
|
'invite one label': 'Single-use invitation',
|
|
89
90
|
'invite one description': 'Only one user may join.',
|
|
90
91
|
'invite one qr label': 'Single-use invitation',
|
|
91
92
|
'invite one list item label': 'Active single-use invitation',
|
|
92
|
-
'invite many label': '
|
|
93
|
+
'invite many label': 'Multi-use invitation',
|
|
93
94
|
'invite many description': 'Anyone with the link can join.',
|
|
94
|
-
'invite many qr label': '
|
|
95
|
-
'invite many list item label': 'Active
|
|
95
|
+
'invite many qr label': 'Multi-use invitation',
|
|
96
|
+
'invite many list item label': 'Active multi-use invitation',
|
|
96
97
|
'invite options label': 'Change the active invite option.',
|
|
97
98
|
'reset in progress label': 'Resetting...',
|
|
98
99
|
'confirm label': 'Confirm',
|
|
99
100
|
'reset storage input label':
|
|
100
|
-
'This will
|
|
101
|
+
'WARNING: This will delete all data on this device. Type {{confirmationValue}} to continue.',
|
|
101
102
|
'join new identity input label':
|
|
102
|
-
'
|
|
103
|
+
'WARNING: To join an existing device all data on this device will be deleted. Type {{confirmationValue}} to continue.',
|
|
103
104
|
'failed to reset identity message': 'Failed to reset identity.',
|
|
104
|
-
'confirmation value': '
|
|
105
|
+
'confirmation value': 'RESET',
|
|
106
|
+
'confirmation placeholder': 'Enter {{confirmationValue}} to continue.',
|
|
105
107
|
'sign out chooser title': 'Danger zone',
|
|
106
108
|
'sign out chooser message': 'Proceeding with the action below will erase all data on this device.',
|
|
107
109
|
'join new identity label': 'Join a new identity',
|
|
@@ -111,7 +113,7 @@ export const os = {
|
|
|
111
113
|
'clear label': 'Use default',
|
|
112
114
|
'select emoji label': 'Choose an emoji to use in your avatar',
|
|
113
115
|
'select hue label': 'Choose a hue to use in your avatar',
|
|
114
|
-
'resetting message': 'One moment while
|
|
116
|
+
'resetting message': 'One moment while the device is reset…',
|
|
115
117
|
'red label': 'Red',
|
|
116
118
|
'orange label': 'Orange',
|
|
117
119
|
'amber label': 'Amber',
|