shogun-button-react 1.5.37 → 1.7.3
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/CHANGELOG.md +0 -0
- package/README.md +0 -0
- package/dist/components/ShogunButton.d.ts +1 -0
- package/dist/components/ShogunButton.js +4 -1
- package/dist/connector.d.ts +0 -0
- package/dist/connector.js +0 -0
- package/dist/dist/styles/index.css +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/dist/styles/index.css +0 -0
- package/dist/types/connector-options.d.ts +0 -0
- package/dist/types/connector-options.js +0 -0
- package/package.json +2 -2
- package/src/styles/index.css +0 -0
package/CHANGELOG.md
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
File without changes
|
|
@@ -6,6 +6,7 @@ const defaultShogunContext = {
|
|
|
6
6
|
sdk: null,
|
|
7
7
|
options: {},
|
|
8
8
|
isLoggedIn: false,
|
|
9
|
+
isConnected: false,
|
|
9
10
|
userPub: null,
|
|
10
11
|
username: null,
|
|
11
12
|
login: async () => ({}),
|
|
@@ -24,6 +25,7 @@ export const useShogun = () => useContext(ShogunContext);
|
|
|
24
25
|
// Provider component
|
|
25
26
|
export function ShogunButtonProvider({ children, sdk, options, onLoginSuccess, onSignupSuccess, onError, onLogout, // AGGIUNTA
|
|
26
27
|
}) {
|
|
28
|
+
var _a, _b;
|
|
27
29
|
// Use React's useState directly
|
|
28
30
|
const [isLoggedIn, setIsLoggedIn] = useState(false);
|
|
29
31
|
const [userPub, setUserPub] = useState(null);
|
|
@@ -426,6 +428,7 @@ export function ShogunButtonProvider({ children, sdk, options, onLoginSuccess, o
|
|
|
426
428
|
sdk,
|
|
427
429
|
options,
|
|
428
430
|
isLoggedIn,
|
|
431
|
+
isConnected: !!((_b = (_a = sdk === null || sdk === void 0 ? void 0 : sdk.gun.user()) === null || _a === void 0 ? void 0 : _a.is) === null || _b === void 0 ? void 0 : _b.pub), // Verifica corretta se l'utente Gun è autenticato
|
|
429
432
|
userPub,
|
|
430
433
|
username,
|
|
431
434
|
login,
|
|
@@ -596,7 +599,7 @@ export const ShogunButton = (() => {
|
|
|
596
599
|
const result = await signUp("password", formUsername, formPassword, formPasswordConfirm);
|
|
597
600
|
if (result && result.success) {
|
|
598
601
|
if (sdk === null || sdk === void 0 ? void 0 : sdk.db) {
|
|
599
|
-
await sdk.db.setPasswordHint(
|
|
602
|
+
await sdk.db.setPasswordHint(formHint);
|
|
600
603
|
}
|
|
601
604
|
setModalIsOpen(false);
|
|
602
605
|
}
|
package/dist/connector.d.ts
CHANGED
|
File without changes
|
package/dist/connector.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/styles/index.css
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shogun-button-react",
|
|
3
3
|
"description": "Shogun connector button",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.7.3",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
7
7
|
"src/styles/index.css"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"ethers": "^6.13.5",
|
|
35
35
|
"prettier": "^3.5.3",
|
|
36
36
|
"rxjs": "^7.8.1",
|
|
37
|
-
"shogun-core": "^1.7.
|
|
37
|
+
"shogun-core": "^1.7.3"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"react": "^18.0.0",
|
package/src/styles/index.css
CHANGED
|
File without changes
|