@asaleh37/ui-base 25.12.172 → 25.12.181
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.d.ts +2 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/templates/attachment/AttachmentImageViewer.tsx +2 -2
- package/src/layout/TopBar.tsx +33 -28
- package/src/redux/features/common/AppInfoSlice.ts +4 -0
package/package.json
CHANGED
|
@@ -30,10 +30,10 @@ const AttachmentImageViewer: React.FC<AttachmentImageViewerProps> = (props) => {
|
|
|
30
30
|
setImgSrc(imagePath);
|
|
31
31
|
};
|
|
32
32
|
useEffect(() => {
|
|
33
|
-
if (props?.refKey) {
|
|
33
|
+
if (props?.refKey || props?.attachmentId) {
|
|
34
34
|
handleImageSrc();
|
|
35
35
|
}
|
|
36
|
-
}, [props.refKey]);
|
|
36
|
+
}, [props.refKey, props?.attachmentId]);
|
|
37
37
|
{
|
|
38
38
|
/* </Avatar>
|
|
39
39
|
src={imgSrc}
|
package/src/layout/TopBar.tsx
CHANGED
|
@@ -202,35 +202,40 @@ const TopBar: React.FC = () => {
|
|
|
202
202
|
: currentOrganization?.organizationArName
|
|
203
203
|
}`}
|
|
204
204
|
</Typography>
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
<IconButton
|
|
213
|
-
sx={{ mx: 1 }}
|
|
214
|
-
color="inherit"
|
|
215
|
-
onClick={() => {
|
|
216
|
-
dispatch(
|
|
217
|
-
AppLayoutActions.setThemeMode(
|
|
218
|
-
AppLayout.themeMode === "light" ? "dark" : "light"
|
|
219
|
-
)
|
|
220
|
-
);
|
|
221
|
-
localStorage.setItem(
|
|
222
|
-
"themeMode",
|
|
223
|
-
AppLayout.themeMode === "light" ? "dark" : "light"
|
|
224
|
-
);
|
|
225
|
-
}}
|
|
205
|
+
{AppInfo.allowThemeChange ? (
|
|
206
|
+
<Tooltip
|
|
207
|
+
title={
|
|
208
|
+
AppLayout.themeMode === "light"
|
|
209
|
+
? "Switch Theme to Dark"
|
|
210
|
+
: "Switch Theme to Light"
|
|
211
|
+
}
|
|
226
212
|
>
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
213
|
+
<IconButton
|
|
214
|
+
sx={{ mx: 1 }}
|
|
215
|
+
color="inherit"
|
|
216
|
+
onClick={() => {
|
|
217
|
+
dispatch(
|
|
218
|
+
AppLayoutActions.setThemeMode(
|
|
219
|
+
AppLayout.themeMode === "light" ? "dark" : "light"
|
|
220
|
+
)
|
|
221
|
+
);
|
|
222
|
+
localStorage.setItem(
|
|
223
|
+
"themeMode",
|
|
224
|
+
AppLayout.themeMode === "light" ? "dark" : "light"
|
|
225
|
+
);
|
|
226
|
+
}}
|
|
227
|
+
>
|
|
228
|
+
{AppLayout.themeMode === "light" ? (
|
|
229
|
+
<FontAwesomeIcon icon="moon" />
|
|
230
|
+
) : (
|
|
231
|
+
<FontAwesomeIcon icon={{ prefix: "far", iconName: "sun" }} />
|
|
232
|
+
)}
|
|
233
|
+
</IconButton>
|
|
234
|
+
</Tooltip>
|
|
235
|
+
) : (
|
|
236
|
+
<></>
|
|
237
|
+
)}
|
|
238
|
+
|
|
234
239
|
{AppInfo.isLocalizationEnabled ? (
|
|
235
240
|
<Tooltip
|
|
236
241
|
title={
|
|
@@ -21,6 +21,8 @@ export type AppInfo = {
|
|
|
21
21
|
ar: { [key: string]: string };
|
|
22
22
|
en: { [key: string]: string };
|
|
23
23
|
};
|
|
24
|
+
appThemeMode: "dark" | "light";
|
|
25
|
+
allowThemeChange?: boolean;
|
|
24
26
|
loginScreenStyle?: {
|
|
25
27
|
themeMode: "dark" | "light";
|
|
26
28
|
backgroundImageNameInPublicFolder?: string;
|
|
@@ -68,6 +70,8 @@ const initialState: AppInfoProp = {
|
|
|
68
70
|
businessNavigationItems: [],
|
|
69
71
|
businessReduxReducers: {},
|
|
70
72
|
businessCommonStoresMetaData: {},
|
|
73
|
+
appThemeMode: "light",
|
|
74
|
+
allowThemeChange: true,
|
|
71
75
|
appTheme: {
|
|
72
76
|
light: { primaryColor: "#37505C", secondaryColor: "#ff6d00" },
|
|
73
77
|
dark: { primaryColor: "#ea690e", secondaryColor: "#74776B" },
|