Skip to content

Commit 04f06ff

Browse files
author
Sharma
committed
Updated background and other styles
1 parent a8f63c9 commit 04f06ff

File tree

5 files changed

+45
-41
lines changed

5 files changed

+45
-41
lines changed

packages/react-sdk-components/src/components/template/AppShell/AppShell.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ interface AppShellProps extends PConnProps {
2828
pageMessages: string[];
2929
}
3030

31-
const useStyles = makeStyles(theme => ({
31+
const useStyles = makeStyles((theme) => ({
3232
root: {
33-
backgroundColor: theme.backgroundColor
33+
// backgroundColor: theme.backgroundColor
3434
},
3535
content: {
3636
flexGrow: 1,
@@ -153,8 +153,8 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
153153
else {
154154
PCore.getAssetLoader()
155155
.getSvcImage(portalLogo)
156-
.then(blob => window.URL.createObjectURL(blob))
157-
.then(data => {
156+
.then((blob) => window.URL.createObjectURL(blob))
157+
.then((data) => {
158158
setIconURL(data);
159159
setFullIconURL(data);
160160
})
@@ -169,8 +169,8 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
169169
if (imageKey && portalTemplate === 'wss') {
170170
PCore.getAssetLoader()
171171
.getSvcImage(imageKey)
172-
.then(blob => window.URL.createObjectURL(blob))
173-
.then(imagePath => setImageBlobUrl(imagePath));
172+
.then((blob) => window.URL.createObjectURL(blob))
173+
.then((imagePath) => setImageBlobUrl(imagePath));
174174
}
175175
}, []);
176176

@@ -192,7 +192,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
192192

193193
const links = !pages
194194
? []
195-
: pages.map(page => {
195+
: pages.map((page) => {
196196
const name = localizedVal(page.pyLabel, '', localeReference);
197197
return {
198198
text: name,

packages/react-sdk-components/src/components/template/WssNavBar/WssNavBar.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ interface WssNavBarProps extends PConnProps {
2525
appName: any;
2626
}
2727

28-
const useStyles = makeStyles(theme => ({
28+
const useStyles = makeStyles((theme) => ({
2929
root: {
3030
display: 'flex'
3131
},
@@ -40,7 +40,7 @@ const useStyles = makeStyles(theme => ({
4040
filter: 'var(--svg-color)'
4141
},
4242
appName: {
43-
color: 'var(--app-text-color)',
43+
// color: 'var(--app-text-color)',
4444
marginLeft: theme.spacing(2),
4545
marginRight: theme.spacing(4),
4646
fontSize: '1.5rem'
@@ -75,7 +75,7 @@ export default function WssNavBar(props: WssNavBarProps) {
7575

7676
const navLinksContent = (
7777
<Box id='nav-links' sx={{ flexGrow: 1, display: { xs: 'none', md: 'flex' } }} style={{ justifyContent: alignment }}>
78-
{navLinks.map(link => (
78+
{navLinks.map((link) => (
7979
<Button className='link-style' key={link.text} onClick={link.onClick}>
8080
{link.text}
8181
</Button>
@@ -118,7 +118,7 @@ export default function WssNavBar(props: WssNavBarProps) {
118118
open={Boolean(anchorElNav)}
119119
onClose={handleCloseNavMenu}
120120
>
121-
{navLinks.map(link => (
121+
{navLinks.map((link) => (
122122
<MenuItem key={link.text} onClick={link.onClick}>
123123
<Typography>{link.text}</Typography>
124124
</MenuItem>

packages/react-sdk-components/src/components/widget/FileUtility/FileUtility/FileUtility.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
width: 100%;
33
padding: 0.625rem 0rem;
44
text-align: left;
5-
background-color: var(--utility-background-color);
5+
/* background-color: var(--utility-background-color); */
66
border-radius: 0.6125rem;
77
margin: 0.3125rem 0rem;
88
position: relative;

packages/react-sdk-components/src/components/widget/FileUtility/FileUtility/FileUtility.tsx

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import download from 'downloadjs';
77
// import SummaryList from '../../SummaryList';
88
// import ActionButtonsForFileUtil from '../ActionButtonsForFileUtil';
99
import './FileUtility.css';
10-
import { IconButton, Menu, MenuItem, Button, CircularProgress } from '@mui/material';
10+
import { IconButton, Menu, MenuItem, Button, CircularProgress, Card } from '@mui/material';
1111
import MoreVertIcon from '@mui/icons-material/MoreVert';
1212

1313
import { validateMaxSize } from '../../../helpers/attachmentHelpers';
@@ -84,7 +84,7 @@ export default function FileUtility(props: FileUtilityProps) {
8484
const [vaItems, setFullAttachments] = useState([]);
8585

8686
function addAttachments(attsFromResp: any[] = []) {
87-
attsFromResp = attsFromResp.map(respAtt => {
87+
attsFromResp = attsFromResp.map((respAtt) => {
8888
const updatedAtt = {
8989
...respAtt,
9090
meta: `${respAtt.category} . ${Utils.generateDateTime(respAtt.createTime, 'DateTime-Since')}, ${respAtt.createdBy}`
@@ -219,7 +219,7 @@ export default function FileUtility(props: FileUtilityProps) {
219219
attPromise.then((resp: any) => {
220220
const arFullListAttachments = addAttachments(resp);
221221
const attachmentsCount = arFullListAttachments.length;
222-
const arItems: any = arFullListAttachments.slice(0, 3).map(att => {
222+
const arItems: any = arFullListAttachments.slice(0, 3).map((att) => {
223223
return getListUtilityItemProps({
224224
att,
225225
downloadFile: !att.progress ? () => downloadAttachedFile(att) : null,
@@ -228,7 +228,7 @@ export default function FileUtility(props: FileUtilityProps) {
228228
removeFile: null
229229
});
230230
});
231-
const viewAllarItems: any = arFullListAttachments.map(att => {
231+
const viewAllarItems: any = arFullListAttachments.map((att) => {
232232
return getListUtilityItemProps({
233233
att,
234234
downloadFile: !att.progress ? () => downloadAttachedFile(att) : null,
@@ -238,7 +238,7 @@ export default function FileUtility(props: FileUtilityProps) {
238238
});
239239
});
240240
setProgress(false);
241-
setList(current => {
241+
setList((current) => {
242242
return { ...current, count: attachmentsCount, data: arItems };
243243
});
244244
setFullAttachments(viewAllarItems);
@@ -299,12 +299,12 @@ export default function FileUtility(props: FileUtilityProps) {
299299
removeFile: null
300300
});
301301
});
302-
setFileData(current => {
302+
setFileData((current) => {
303303
return { ...current, fileList: arFileList$, attachedFiles: myFiles };
304304
});
305305
}
306306

307-
const handleClick = event => {
307+
const handleClick = (event) => {
308308
setAnchorEl(event.currentTarget);
309309
};
310310

@@ -313,7 +313,7 @@ export default function FileUtility(props: FileUtilityProps) {
313313
};
314314

315315
function onAddFilesClick() {
316-
setFileData(current => {
316+
setFileData((current) => {
317317
return { ...current, showfileModal: true };
318318
});
319319
setAnchorEl(null);
@@ -323,16 +323,16 @@ export default function FileUtility(props: FileUtilityProps) {
323323
let attachedFiles: any = fileData.attachedFiles;
324324
let fileList: any = fileData.fileList;
325325
if (item !== null) {
326-
attachedFiles = attachedFiles.filter(ele => ele.ID !== item.id);
327-
fileList = fileList.filter(ele => ele.id !== item.id);
328-
setFileData(current => {
326+
attachedFiles = attachedFiles.filter((ele) => ele.ID !== item.id);
327+
fileList = fileList.filter((ele) => ele.id !== item.id);
328+
setFileData((current) => {
329329
return { ...current, fileList, attachedFiles };
330330
});
331331
}
332332
}
333333

334334
function closeFilePopup() {
335-
setFileData(current => {
335+
setFileData((current) => {
336336
return { ...current, showfileModal: false };
337337
});
338338
}
@@ -348,19 +348,19 @@ export default function FileUtility(props: FileUtilityProps) {
348348
}
349349

350350
Promise.allSettled(
351-
fileData.attachedFiles.map(file => attachmentUtils.uploadAttachment(file, onUploadProgress, errorHandler, thePConn.getContextName()))
351+
fileData.attachedFiles.map((file) => attachmentUtils.uploadAttachment(file, onUploadProgress, errorHandler, thePConn.getContextName()))
352352
)
353353
.then((fileResponses: any) => {
354354
const uploadedFiles: any = [];
355-
fileResponses.forEach(fileResponse => {
355+
fileResponses.forEach((fileResponse) => {
356356
if (fileResponse.status === 'fulfilled') {
357357
uploadedFiles.push(fileResponse.value);
358358
}
359359
});
360360
if (uploadedFiles.length > 0) {
361361
(attachmentUtils.linkAttachmentsToCase(caseID, uploadedFiles, 'File', thePConn.getContextName()) as Promise<any>)
362362
.then(() => {
363-
setFileData(current => {
363+
setFileData((current) => {
364364
return { ...current, fileList: [], attachedFiles: [] };
365365
});
366366
getAttachments();
@@ -372,21 +372,21 @@ export default function FileUtility(props: FileUtilityProps) {
372372
}
373373

374374
function onAddLinksClick() {
375-
setLinkData(current => {
375+
setLinkData((current) => {
376376
return { ...current, showLinkModal: true };
377377
});
378378
setAnchorEl(null);
379379
}
380380

381381
function closeAddLinksPopup() {
382-
setLinkData(current => {
382+
setLinkData((current) => {
383383
return { ...current, showLinkModal: false };
384384
});
385385
}
386386

387-
const fieldlinkOnChange = event => {
387+
const fieldlinkOnChange = (event) => {
388388
const title = event.target.value;
389-
setLink(current => {
389+
setLink((current) => {
390390
const updatedData = { ...current, title };
391391
updatedData.disable = !(updatedData.title && updatedData.url);
392392
return updatedData;
@@ -395,7 +395,7 @@ export default function FileUtility(props: FileUtilityProps) {
395395

396396
function fieldurlOnChange(event) {
397397
const url = event.target.value;
398-
setLink(current => {
398+
setLink((current) => {
399399
const updatedData = { ...current, url };
400400
updatedData.disable = !(updatedData.title && updatedData.url);
401401
return updatedData;
@@ -439,7 +439,7 @@ export default function FileUtility(props: FileUtilityProps) {
439439
attachedLink.url = url;
440440

441441
attachedListTemp.push(attachedLink);
442-
setLinkData(current => {
442+
setLinkData((current) => {
443443
return {
444444
...current,
445445
linksList: localList,
@@ -454,9 +454,9 @@ export default function FileUtility(props: FileUtilityProps) {
454454
let attachedLinks: any = linkData.attachedLinks;
455455
let linksList: any = linkData.linksList;
456456
if (item !== null) {
457-
attachedLinks = attachedLinks.filter(ele => ele.id !== item.id);
458-
linksList = linksList.filter(ele => ele.id !== item.id);
459-
setLinkData(current => {
457+
attachedLinks = attachedLinks.filter((ele) => ele.id !== item.id);
458+
linksList = linksList.filter((ele) => ele.id !== item.id);
459+
setLinkData((current) => {
460460
return { ...current, linksList, attachedLinks };
461461
});
462462
}
@@ -478,7 +478,7 @@ export default function FileUtility(props: FileUtilityProps) {
478478
setProgress(true);
479479
(attachmentUtils.linkAttachmentsToCase(caseID, linksToAttach, 'URL', thePConn.getContextName()) as Promise<any>)
480480
.then(() => {
481-
setLinkData(current => {
481+
setLinkData((current) => {
482482
return { ...current, linksList: [], attachedLinks: [] };
483483
});
484484
getAttachments();
@@ -488,7 +488,7 @@ export default function FileUtility(props: FileUtilityProps) {
488488
}
489489

490490
return (
491-
<div className='psdk-utility' id='file-utility'>
491+
<Card className='psdk-utility' id='file-utility'>
492492
{inProgress && (
493493
<div className='progress-div'>
494494
<CircularProgress />
@@ -644,6 +644,6 @@ export default function FileUtility(props: FileUtilityProps) {
644644
</div>
645645
</div>
646646
)}
647-
</div>
647+
</Card>
648648
);
649649
}

packages/react-sdk-components/src/theme.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ const darkTheme = createTheme({
173173
components: {
174174
MuiCssBaseline: {
175175
styleOverrides: {
176+
body: {
177+
background: 'radial-gradient(178.62% 112% at 50% -12%, #0B0F2A 69.96%, #111951 89.19%)',
178+
backgroundAttachment: 'fixed'
179+
},
176180
...darkThemeColours
177181
}
178182
},
@@ -222,8 +226,8 @@ const darkTheme = createTheme({
222226
contrastText: '#fff'
223227
},
224228
background: {
225-
default: '#1a103c', // primary-bg
226-
paper: '#2a1f54' // card-bg
229+
// default: 'radial-gradient(178.62% 112% at 50% -12%, #0B0F2A 69.96%, #111951 89.19%)',
230+
paper: 'rgba(255, 255, 255, 0.1)' // card-bg
227231
},
228232
text: {
229233
primary: '#e0e0e0', // text-light

0 commit comments

Comments
 (0)