@rpcbase/client 0.86.0 → 0.88.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.
@@ -61,7 +61,6 @@ const ForgotPassword = ({name, logo}) => {
61
61
  <div>
62
62
  <div className="d-flex align-items-center justify-content-center">
63
63
  {logo}
64
- <span className="ms-1 fs-4">{name}</span>
65
64
  </div>
66
65
 
67
66
  <hr />
@@ -22,9 +22,9 @@ const SetNewPassword = ({name, logo}) => {
22
22
  const user_id = useSearchParam("uid")
23
23
  const token = useSearchParam("token")
24
24
 
25
- useEffect(() => {
26
- console.log("TOKEN", user_id, token)
27
- }, [user_id, token])
25
+ // useEffect(() => {
26
+ // console.log("TOKEN", user_id, token)
27
+ // }, [user_id, token])
28
28
 
29
29
  const onSubmit = async(e) => {
30
30
  e.preventDefault()
@@ -67,7 +67,6 @@ const SetNewPassword = ({name, logo}) => {
67
67
  <div>
68
68
  <div className="d-flex align-items-center justify-content-center">
69
69
  {logo}
70
- <span className="ms-1 fs-4">{name}</span>
71
70
  </div>
72
71
 
73
72
  <hr />
@@ -89,7 +89,6 @@ const SignIn = ({
89
89
  <div>
90
90
  <div className="d-flex align-items-center justify-content-center">
91
91
  {logo}
92
- <span className="ms-1 fs-4">{name}</span>
93
92
  </div>
94
93
 
95
94
  <hr />
@@ -5,9 +5,10 @@ import {ActivityIndicator} from "react-native"
5
5
  import Alert from "react-bootstrap/Alert"
6
6
  import page from "page"
7
7
 
8
+ import {sign_out} from "../sign_out"
9
+
8
10
  import post from "../../helpers/post"
9
11
 
10
- import {set_is_signed_in, set_uid} from "../index"
11
12
  import AccountListItem from "../AccountsList/AccountListItem"
12
13
  import Footer from "../Footer"
13
14
 
@@ -42,11 +43,7 @@ const SignOut = ({
42
43
  const signOut = async() => {
43
44
  const res = await post("/api/v1/auth/sign_out")
44
45
  if (res.status === "ok") {
45
- set_uid(null)
46
- set_is_signed_in(false)
47
- localStorage.clear()
48
-
49
- // TODO: clear DB
46
+ sign_out()
50
47
  setIsSignedOut(true)
51
48
  onSuccess()
52
49
  } else {
@@ -56,19 +53,12 @@ const SignOut = ({
56
53
 
57
54
 
58
55
  const onSubmit = () => {
56
+ console.log("sign out from selected accounts", selectedAccounts)
59
57
  signOut()
60
- console.log("SEL", selectedAccounts)
61
58
  }
62
59
 
63
60
  return (
64
61
  <div id="sign-out-wrapper">
65
- <div className="d-flex align-items-center justify-content-center">
66
- {logo}
67
- <span className="ms-1 fs-4">{name}</span>
68
- </div>
69
-
70
- <hr />
71
-
72
62
 
73
63
  {isSignedOut && (
74
64
  <Alert variant="light" data-bs-theme="dark" style={{maxWidth: 260, position: "absolute"}} onClose={() => setIsSignedOut(false)} dismissible>
@@ -79,6 +69,12 @@ const SignOut = ({
79
69
  {accounts ? (
80
70
  <div className="form-signout text-center px-4 py-4 shadow-lg">
81
71
 
72
+ <div className="d-flex align-items-center justify-content-center">
73
+ {logo}
74
+ </div>
75
+
76
+ <hr />
77
+
82
78
  <h1 className="h4 mt-3 mb-3 fw-normal">Sign Out</h1>
83
79
 
84
80
  {Array.isArray(accounts) && accounts.length > 0 && (
@@ -63,7 +63,6 @@ const SignUp = ({
63
63
  <div>
64
64
  <div className="d-flex align-items-center justify-content-center">
65
65
  {logo}
66
- <span className="ms-1 fs-4">{name}</span>
67
66
  </div>
68
67
 
69
68
  <hr />
package/auth/index.js CHANGED
@@ -115,3 +115,5 @@ export const set_tenant_id = (val) => __tenant_id = val
115
115
  export const set_is_signed_in = (val) => __is_authenticated = val
116
116
 
117
117
  export const is_signed_in = () => __is_authenticated
118
+
119
+ export * from "./sign_out"
@@ -0,0 +1,12 @@
1
+ /* @flow */
2
+
3
+ import {set_is_signed_in, set_uid} from "./index"
4
+
5
+ export const sign_out = () => {
6
+ set_uid(null)
7
+ set_is_signed_in(false)
8
+ localStorage.clear()
9
+
10
+ // TODO: clear DB
11
+ console.log("TODO cln")
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/client",
3
- "version": "0.86.0",
3
+ "version": "0.88.0",
4
4
  "scripts": {
5
5
  "build-firebase": "webpack -c firebase/webpack.config.js",
6
6
  "build": "yarn build-firebase",