ywana-core8 0.1.23 → 0.1.25
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/index.cjs +11 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +11 -7
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +11 -7
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/http/client.js +8 -4
- package/src/widgets/login/LoginBox.js +2 -2
- package/src/widgets/login/ResetPasswordBoxTest.js +1 -1
package/package.json
CHANGED
package/src/http/client.js
CHANGED
@@ -16,18 +16,22 @@ async function fetchAsync(method, URL, body = null, token, headers) {
|
|
16
16
|
if (headers) request.headers = request.headers
|
17
17
|
|
18
18
|
try {
|
19
|
+
|
19
20
|
var response = await fetch(URL, request);
|
20
21
|
if (response.ok) {
|
21
22
|
const json = await response.json();
|
22
23
|
return json
|
23
24
|
}
|
24
25
|
throw response
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
|
27
|
+
} catch (response) {
|
28
|
+
if (response instanceof response) { throw { response } }
|
29
|
+
const json = await response.json()
|
28
30
|
throw {
|
29
31
|
success: false,
|
30
|
-
message: json.message || json.err
|
32
|
+
message: json.message || json.err,
|
33
|
+
status: response.status,
|
34
|
+
statusText: response.statusText,
|
31
35
|
}
|
32
36
|
}
|
33
37
|
}
|
@@ -55,8 +55,8 @@ export const LoginBox = ({
|
|
55
55
|
<div className="title"><Text>{title}</Text></div>
|
56
56
|
</header>
|
57
57
|
<main>
|
58
|
-
<TextField label={tx(userLabel)} value={user} onChange={changeUser} onEnter={ok} outlined />
|
59
|
-
<TextField id="loginbox-password" label={tx(passwordLabel)} value={password} onChange={changePassword} onEnter={ok} type="password" outlined />
|
58
|
+
<TextField label={tx(userLabel)} value={user} onChange={changeUser} onEnter={ok} outlined autoComplete="on" />
|
59
|
+
<TextField id="loginbox-password" label={tx(passwordLabel)} value={password} onChange={changePassword} onEnter={ok} type="password" outlined autoComplete="on" />
|
60
60
|
</main>
|
61
61
|
<footer>
|
62
62
|
{ loading ? <div className="load-box"><Icon icon="refresh" /></div> : <Button label={tx(loginLabel)} action={ok} disabled={!canOK()} raised className="login-button" /> }
|
@@ -21,7 +21,7 @@ export const ResetPasswordBoxTest = (prop) => {
|
|
21
21
|
return (
|
22
22
|
<ResetPasswordBox {...config} >
|
23
23
|
<div>
|
24
|
-
<
|
24
|
+
<h5>Your password must contain</h5>
|
25
25
|
<ul>
|
26
26
|
<li>At least 8 characters</li>
|
27
27
|
<li>At least one uppercase letter</li>
|