@rpcbase/client 0.84.0 → 0.86.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.
@@ -14,7 +14,10 @@ import {POSTHOG_KEY} from "env"
14
14
  const AnalyticsWrapper = ({children, ...props}) => {
15
15
 
16
16
  const {hostname} = window.location
17
- if (__DEV__ || hostname === "localhost" || hostname.endsWith(".local")) {
17
+
18
+ const hasPostHogKey = !!POSTHOG_KEY
19
+
20
+ if (__DEV__ || hostname === "localhost" || hostname.endsWith(".local") || !hasPostHogKey) {
18
21
  return (
19
22
  <>{children}</>
20
23
  )
@@ -17,6 +17,7 @@ import "./sign-out.scss"
17
17
  // TODO: clear cache + db
18
18
 
19
19
  const SignOut = ({
20
+ logo,
20
21
  name,
21
22
  onSuccess = () => null
22
23
  }) => {
@@ -61,6 +62,13 @@ const SignOut = ({
61
62
 
62
63
  return (
63
64
  <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
+
64
72
 
65
73
  {isSignedOut && (
66
74
  <Alert variant="light" data-bs-theme="dark" style={{maxWidth: 260, position: "absolute"}} onClose={() => setIsSignedOut(false)} dismissible>
@@ -68,7 +76,8 @@ const SignOut = ({
68
76
  </Alert>
69
77
  )}
70
78
 
71
- {accounts ? (<div className="form-signout text-center px-4 py-4 shadow-lg">
79
+ {accounts ? (
80
+ <div className="form-signout text-center px-4 py-4 shadow-lg">
72
81
 
73
82
  <h1 className="h4 mt-3 mb-3 fw-normal">Sign Out</h1>
74
83
 
@@ -0,0 +1,15 @@
1
+ /* @flow */
2
+
3
+ const onReady = (callback) => {
4
+ if (["interactive", "complete"].includes(document.readyState)) {
5
+ callback()
6
+ } else if (document.readyState === "loading") {
7
+ window.addEventListener("DOMContentLoaded", () => {
8
+ callback()
9
+ })
10
+ } else {
11
+ throw new Error("unknown ready state, cannot initialize")
12
+ }
13
+ }
14
+
15
+ export default onReady
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/client",
3
- "version": "0.84.0",
3
+ "version": "0.86.0",
4
4
  "scripts": {
5
5
  "build-firebase": "webpack -c firebase/webpack.config.js",
6
6
  "build": "yarn build-firebase",