@calimero-network/mero-react 10.1.2 → 10.2.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.
- package/dist/index.cjs +7 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -6
- package/dist/index.d.ts +14 -6
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -949,7 +949,7 @@ function isReturningFromWallet(location = typeof window === "undefined" ? void 0
|
|
|
949
949
|
}
|
|
950
950
|
function useAccountEnrolment({
|
|
951
951
|
walletUrl: walletOverride,
|
|
952
|
-
enabled =
|
|
952
|
+
enabled = !isDesktopWindow()
|
|
953
953
|
} = {}) {
|
|
954
954
|
const { connectWithAccount, cloudBaseUrl } = useMero();
|
|
955
955
|
const [note, setNote] = react.useState(null);
|
|
@@ -1327,9 +1327,11 @@ function LoginModal({
|
|
|
1327
1327
|
theme,
|
|
1328
1328
|
localNodePorts = meroJs.DEFAULT_LOCAL_NODE_PORTS,
|
|
1329
1329
|
cloud,
|
|
1330
|
+
cloudOnDesktop = false,
|
|
1330
1331
|
initialTab: initialTabProp
|
|
1331
1332
|
}) {
|
|
1332
|
-
const
|
|
1333
|
+
const cloudAllowed = cloudOnDesktop || !isDesktopWindow();
|
|
1334
|
+
const ownCloud = cloud === void 0 && cloudAllowed;
|
|
1333
1335
|
const own = useAccountEnrolment({ enabled: ownCloud });
|
|
1334
1336
|
const cloudTab = react.useMemo(
|
|
1335
1337
|
() => ownCloud ? {
|
|
@@ -1339,8 +1341,8 @@ function LoginModal({
|
|
|
1339
1341
|
note: own.note,
|
|
1340
1342
|
walletUrl: own.walletUrl,
|
|
1341
1343
|
customWallet: own.customWallet
|
|
1342
|
-
} : cloud || null,
|
|
1343
|
-
[cloud, ownCloud, own.goToWallet, own.note, own.walletUrl, own.customWallet]
|
|
1344
|
+
} : cloudAllowed && cloud || null,
|
|
1345
|
+
[cloud, cloudAllowed, ownCloud, own.goToWallet, own.note, own.walletUrl, own.customWallet]
|
|
1344
1346
|
);
|
|
1345
1347
|
const initialTab = initialTabProp ?? (ownCloud && own.returning ? "cloud" : "node");
|
|
1346
1348
|
const [tab, setTab] = react.useState(initialTab);
|
|
@@ -1874,6 +1876,7 @@ function ConnectButton({
|
|
|
1874
1876
|
walletUrl: enrolment.walletUrl,
|
|
1875
1877
|
customWallet: enrolment.customWallet
|
|
1876
1878
|
} : false,
|
|
1879
|
+
cloudOnDesktop: cloud,
|
|
1877
1880
|
initialTab: cloud && enrolment.returning ? "cloud" : "node"
|
|
1878
1881
|
}
|
|
1879
1882
|
)
|