@rpcbase/client 0.17.0 → 0.20.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.
@@ -79,7 +79,7 @@ const ForgotPassword = ({name, logo}) => {
79
79
  <p className="text-danger">{errors.form}</p>
80
80
  )}
81
81
 
82
- <div className="form-floating mb-4">
82
+ <div className="text-start form-floating mb-4">
83
83
  <input type="email"
84
84
  disabled={isSuccess}
85
85
  className="form-control"
@@ -90,7 +90,7 @@ const SetNewPassword = ({name, logo}) => {
90
90
 
91
91
  <form onSubmit={onSubmit}>
92
92
 
93
- <div className="form-floating">
93
+ <div className="form-floating text-start">
94
94
  <input type="password"
95
95
  className="form-control"
96
96
  id="input-password1"
@@ -101,7 +101,7 @@ const SetNewPassword = ({name, logo}) => {
101
101
  <label htmlFor="input-password1">Password</label>
102
102
  </div>
103
103
 
104
- <div className="form-floating">
104
+ <div className="form-floating text-start">
105
105
  <input type="password"
106
106
  className="form-control"
107
107
  id="input-password2"
@@ -10,7 +10,11 @@ import Footer from "../Footer"
10
10
 
11
11
  import "./sign-in.scss"
12
12
 
13
- const SignIn = ({name, logo}) => {
13
+ const SignIn = ({
14
+ name,
15
+ logo,
16
+ onSuccessRedirect = "/dashboard"
17
+ }) => {
14
18
  const [isLoading, setIsLoading] = useState(false)
15
19
  const [errors, setErrors] = useState()
16
20
 
@@ -41,7 +45,7 @@ const SignIn = ({name, logo}) => {
41
45
  window.location = redirect
42
46
  return
43
47
  }
44
- window.location = "/workspaces"
48
+ window.location = onSuccessRedirect
45
49
 
46
50
  } else {
47
51
  setErrors(res.errors)
@@ -79,7 +83,7 @@ const SignIn = ({name, logo}) => {
79
83
  <p className="text-danger">{errors.form}</p>
80
84
  )}
81
85
 
82
- <div className="form-floating">
86
+ <div className="form-floating text-start">
83
87
  <input type="email"
84
88
  className="form-control"
85
89
  id="input-email"
@@ -89,7 +93,7 @@ const SignIn = ({name, logo}) => {
89
93
  <label htmlFor="input-email">Email Address</label>
90
94
  </div>
91
95
 
92
- <div className="form-floating">
96
+ <div className="form-floating text-start">
93
97
  <input type="password"
94
98
  className="form-control"
95
99
  id="input-password"
@@ -6,7 +6,11 @@ import Footer from "../Footer"
6
6
 
7
7
  import "./sign-up.scss"
8
8
 
9
- const SignUp = ({logo, name}) => {
9
+ const SignUp = ({
10
+ logo,
11
+ name,
12
+ onSuccessRedirect = "/dashboard",
13
+ }) => {
10
14
  const [email, setEmail] = useState("")
11
15
  const [password, setPassword] = useState("")
12
16
  const [passwordConfirm, setPasswordConfirm] = useState("")
@@ -20,7 +24,7 @@ const SignUp = ({logo, name}) => {
20
24
  }
21
25
  const res = await post("/api/v1/auth/sign_up", {email, password})
22
26
  if (res.status === "ok") {
23
- window.location = "/workspaces"
27
+ window.location = onSuccessRedirect
24
28
  } else if (res.status === "error") {
25
29
  setError(res.message)
26
30
  }
@@ -61,7 +65,7 @@ const SignUp = ({logo, name}) => {
61
65
  </div>
62
66
  )}
63
67
 
64
- <div className="form-floating">
68
+ <div className="form-floating text-start">
65
69
  <input type="email"
66
70
  className="form-control"
67
71
  id="input-email"
@@ -70,7 +74,7 @@ const SignUp = ({logo, name}) => {
70
74
  onChange={onChangeEmail} />
71
75
  <label htmlFor="input-email">Email Address</label>
72
76
  </div>
73
- <div className="form-floating">
77
+ <div className="form-floating text-start">
74
78
  <input type="password"
75
79
  className="form-control"
76
80
  id="input-password"
@@ -79,7 +83,7 @@ const SignUp = ({logo, name}) => {
79
83
  onChange={onChangePassword} />
80
84
  <label htmlFor="input-password">Password</label>
81
85
  </div>
82
- <div className="form-floating">
86
+ <div className="form-floating text-start">
83
87
  <input type="password"
84
88
  className="form-control"
85
89
  id="input-password-confirm"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/client",
3
- "version": "0.17.0",
3
+ "version": "0.20.0",
4
4
  "scripts": {
5
5
  "test": "echo \"Error: no test specified\" && exit 0"
6
6
  },