@asaleh37/ui-base 25.8.10-4 → 25.8.10-6
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.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/components/common/NoLicenseComponent.tsx +42 -0
- package/src/layout/Layout.tsx +3 -2
- package/src/main.tsx +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asaleh37/ui-base",
|
|
3
|
-
"version": "25.8.10-
|
|
3
|
+
"version": "25.8.10-6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "Ahmed Saleh Mohamed",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"stylis-plugin-rtl": "^2.1.1",
|
|
114
114
|
"zod": "^3.24.2"
|
|
115
115
|
},
|
|
116
|
-
"dependencies": {
|
|
116
|
+
"dependencies": {
|
|
117
117
|
"@rollup/plugin-json": "^6.1.0",
|
|
118
118
|
"rollup-plugin-terser": "^7.0.2"
|
|
119
119
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Box, Typography } from "@mui/material";
|
|
2
|
+
import {
|
|
3
|
+
AppInfo,
|
|
4
|
+
LicenseCheckObject,
|
|
5
|
+
} from "../../redux/features/common/AppInfoSlice";
|
|
6
|
+
import { useSelector } from "react-redux";
|
|
7
|
+
|
|
8
|
+
const NoLicenseComponent: React.FC<LicenseCheckObject> = (props) => {
|
|
9
|
+
const appInfo: AppInfo = useSelector((state: any) => state.AppInfo.value);
|
|
10
|
+
return (
|
|
11
|
+
<Box
|
|
12
|
+
sx={{
|
|
13
|
+
flex: 1,
|
|
14
|
+
width: "100%",
|
|
15
|
+
height: "100%",
|
|
16
|
+
display: "flex",
|
|
17
|
+
flexDirection: "column",
|
|
18
|
+
alignItems: "center",
|
|
19
|
+
justifyContent: "center",
|
|
20
|
+
}}
|
|
21
|
+
>
|
|
22
|
+
<img src={appInfo.appLogo} />
|
|
23
|
+
<Typography variant="h5">
|
|
24
|
+
{appInfo.appName} - {appInfo.appVersion}
|
|
25
|
+
</Typography>
|
|
26
|
+
<Typography variant="h6" color="error">
|
|
27
|
+
Your license is missing or has expired.
|
|
28
|
+
</Typography>
|
|
29
|
+
<Typography variant="h6" color="error">
|
|
30
|
+
Please reach out to your vendor for assistance.
|
|
31
|
+
</Typography>
|
|
32
|
+
<Typography>
|
|
33
|
+
License Check @{props?.lastLicenseCheckTime || "--------"}
|
|
34
|
+
</Typography>
|
|
35
|
+
<Typography>
|
|
36
|
+
License Check Result : {props?.lastLicenseCheckMessage || "--------"}
|
|
37
|
+
</Typography>
|
|
38
|
+
</Box>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default NoLicenseComponent;
|
package/src/layout/Layout.tsx
CHANGED
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
AppInfo,
|
|
20
20
|
LicenseCheckObject,
|
|
21
21
|
} from "../redux/features/common/AppInfoSlice";
|
|
22
|
+
import NoLicenseComponent from "../components/common/NoLicenseComponent";
|
|
22
23
|
|
|
23
24
|
const Main = styled("main", {
|
|
24
25
|
shouldForwardProp: (prop) => prop !== "open",
|
|
@@ -92,7 +93,7 @@ export default function Layout() {
|
|
|
92
93
|
console.log("Interval cleared");
|
|
93
94
|
};
|
|
94
95
|
}
|
|
95
|
-
}, []);
|
|
96
|
+
}, [appInfo]);
|
|
96
97
|
|
|
97
98
|
return (
|
|
98
99
|
<BrowserRouter>
|
|
@@ -113,7 +114,7 @@ export default function Layout() {
|
|
|
113
114
|
<MainContent />
|
|
114
115
|
</Main>
|
|
115
116
|
) : (
|
|
116
|
-
|
|
117
|
+
<NoLicenseComponent {...licenseCheckObj} />
|
|
117
118
|
)
|
|
118
119
|
) : (
|
|
119
120
|
<Login />
|