@vuu-ui/vuu-shell 0.8.26-debug → 0.8.27-debug
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/cjs/index.js +7 -2
- package/cjs/index.js.map +3 -3
- package/esm/index.js +10 -4
- package/esm/index.js.map +3 -3
- package/package.json +9 -9
package/esm/index.js
CHANGED
|
@@ -2714,8 +2714,9 @@ import {
|
|
|
2714
2714
|
import cx10 from "clsx";
|
|
2715
2715
|
import {
|
|
2716
2716
|
useCallback as useCallback14,
|
|
2717
|
-
|
|
2718
|
-
useRef as useRef7
|
|
2717
|
+
useMemo as useMemo8,
|
|
2718
|
+
useRef as useRef7,
|
|
2719
|
+
useState as useState11
|
|
2719
2720
|
} from "react";
|
|
2720
2721
|
|
|
2721
2722
|
// src/shell-layouts/context-panel/ContextPanel.tsx
|
|
@@ -2956,6 +2957,7 @@ var Shell = ({
|
|
|
2956
2957
|
const layoutId = useRef7("latest");
|
|
2957
2958
|
const { applicationJson, saveApplicationLayout, loadLayoutById } = useLayoutManager();
|
|
2958
2959
|
const { buildMenuOptions, handleMenuAction } = useLayoutContextMenuItems(setDialogState);
|
|
2960
|
+
const [connectionStatus, setConnectionStatus] = useState11("connected");
|
|
2959
2961
|
const handleLayoutChange = useCallback14(
|
|
2960
2962
|
(layout) => {
|
|
2961
2963
|
try {
|
|
@@ -2978,13 +2980,14 @@ var Shell = ({
|
|
|
2978
2980
|
},
|
|
2979
2981
|
[loadLayoutById]
|
|
2980
2982
|
);
|
|
2981
|
-
|
|
2983
|
+
useMemo8(async () => {
|
|
2982
2984
|
if (serverUrl && user.token) {
|
|
2983
|
-
connectToServer({
|
|
2985
|
+
const connectionStatus2 = await connectToServer({
|
|
2984
2986
|
authToken: user.token,
|
|
2985
2987
|
url: serverUrl,
|
|
2986
2988
|
username: user.username
|
|
2987
2989
|
});
|
|
2990
|
+
setConnectionStatus(connectionStatus2);
|
|
2988
2991
|
}
|
|
2989
2992
|
}, [serverUrl, user.token, user.username]);
|
|
2990
2993
|
const [themeClass, densityClass, dataMode] = useThemeAttributes3();
|
|
@@ -3004,6 +3007,9 @@ var Shell = ({
|
|
|
3004
3007
|
}
|
|
3005
3008
|
)
|
|
3006
3009
|
});
|
|
3010
|
+
if (connectionStatus === "rejected") {
|
|
3011
|
+
console.log("game over, no connection to server");
|
|
3012
|
+
}
|
|
3007
3013
|
return isLoading ? null : /* @__PURE__ */ jsx25(ThemeProvider, { children: /* @__PURE__ */ jsxs18(
|
|
3008
3014
|
ContextMenuProvider,
|
|
3009
3015
|
{
|