@ciromaciel/auth-react 1.5.0 → 1.6.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/README.md +24 -1
- package/dist/index.esm.js +1140 -660
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1137 -657
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -170,6 +170,29 @@ organization and on which plan, then one list of actions with "Sair" last.
|
|
|
170
170
|
cites. `termsUrl` points it elsewhere, `termsUrl={null}` drops the link, and `branded={false}`
|
|
171
171
|
removes the footer.
|
|
172
172
|
|
|
173
|
+
### The account screen
|
|
174
|
+
|
|
175
|
+
`<UserProfile />` is what "Conta" on the account card opens: the photo, the name and the email;
|
|
176
|
+
the ways in; and the devices with an open session.
|
|
177
|
+
|
|
178
|
+
```jsx
|
|
179
|
+
<UserProfile opened={opened} onClose={close} />
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
- Every text defaults to Portuguese. `labels` changes a word (`labels={{ edit: 'Editar' }}`);
|
|
183
|
+
a panel does not need it to translate the screen.
|
|
184
|
+
- Name and photo are edited in place: "Alterar" opens the field on the same row, Enter saves,
|
|
185
|
+
Esc cancels and leaves the screen open. The email does not change here, and says why: it is
|
|
186
|
+
where the sign-in code arrives.
|
|
187
|
+
- "Formas de entrar" lists the emailed code, which always works, and the providers the
|
|
188
|
+
application enabled, with "Conectar" and "Desconectar". With none enabled, the group is not
|
|
189
|
+
drawn. `showSignInMethods={false}` hides it.
|
|
190
|
+
- The sessions sit on one line ("2 sessões abertas", and which one is this device); a click
|
|
191
|
+
opens the list right below. The current device comes first and cannot be ended from here —
|
|
192
|
+
that is "Sair". "Encerrar as outras" asks before ending them.
|
|
193
|
+
- Failures are shown on the screen, next to what failed. `onError` still receives the error,
|
|
194
|
+
with `{ section, isShownOnScreen: true }`; do not show it a second time.
|
|
195
|
+
|
|
173
196
|
## API
|
|
174
197
|
|
|
175
198
|
### Components
|
|
@@ -177,7 +200,7 @@ organization and on which plan, then one list of actions with "Sair" last.
|
|
|
177
200
|
| Component | Description |
|
|
178
201
|
| ------------------------- | ------------------------------------------------------------ |
|
|
179
202
|
| `<SignIn />` | The whole way in: asks for the email, then takes the code |
|
|
180
|
-
| `<UserProfile />` |
|
|
203
|
+
| `<UserProfile />` | The account screen: profile, ways in, open sessions |
|
|
181
204
|
| `<UserInformation />` | The account card: who, where, which plan, then the actions |
|
|
182
205
|
| `<SocialButtons />` | Sign-in buttons for the providers the application enabled |
|
|
183
206
|
| `<AuthCard />` | The card shell the screens are built on |
|