Skip to content

Commit 4ae5c7b

Browse files
authored
Merge branch 'master' into fix/mobile_filter_title_bar_fix
2 parents 46e3f1b + 5d93149 commit 4ae5c7b

File tree

12 files changed

+264
-14
lines changed

12 files changed

+264
-14
lines changed

src/constants/constants.ts

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export const KEPPEL_GREEN_FILL = '#00B39F';
66
export const CARIBBEAN_GREEN_FILL = '#00D3A9';
77
export const DEFAULT_STROKE = '#000';
88
export const DEFAULT_STROKE_WIDTH = '2';
9-
export const CLOUD_URL = 'https://cloud.layer5.io';
109

1110
export const KANVAS_MODE = {
1211
DESIGNER: 'design',
@@ -28,3 +27,43 @@ export const RESOURCE_TYPE = {
2827
} as const;
2928

3029
export type ResourceType = (typeof RESOURCE_TYPE)[keyof typeof RESOURCE_TYPE];
30+
export interface ICEServer {
31+
urls: string;
32+
username?: string;
33+
credential?: string;
34+
}
35+
36+
/**
37+
* ICE server configuration for WebRTC connections
38+
*/
39+
export const ICE_SERVERS: ICEServer[] = [
40+
{
41+
urls: 'stun:stun.l.google.com:19302'
42+
},
43+
{
44+
urls: 'stun:global.stun.twilio.com:3478'
45+
},
46+
{
47+
urls: 'stun:openrelay.metered.ca:80'
48+
},
49+
{
50+
urls: 'turn:openrelay.metered.ca:80',
51+
username: 'openrelayproject',
52+
credential: 'openrelayproject'
53+
},
54+
{
55+
urls: 'turn:openrelay.metered.ca:443',
56+
username: 'openrelayproject',
57+
credential: 'openrelayproject'
58+
},
59+
{
60+
urls: 'turn:openrelay.metered.ca:443?transport=tcp',
61+
username: 'openrelayproject',
62+
credential: 'openrelayproject'
63+
}
64+
];
65+
66+
export const MESHERY_CLOUD_PROD = 'https://cloud.layer5.io';
67+
export const MESHERY_CLOUD_STAGING = 'staging-cloud.layer5.io';
68+
export const MESHERY_CLOUD_WS_PROD = 'cloud-ws.layer5.io';
69+
export const MESHERY_CLOUD_WS_STAGING = 'staging-cloud-ws.layer5.io:6543';

src/custom/Carousel/style.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export const CarouselButton = styled('button')(({ theme }) => ({
66
transform: 'translateY(-50%)',
77
zIndex: '1',
88
background: theme.palette.background.paper,
9+
color: theme.palette.mode === 'dark' ? theme.palette.common.white : theme.palette.common.black,
910
border: 'none',
1011
cursor: 'pointer',
1112
padding: '0.5rem',

src/custom/CatalogDesignTable/AuthorCell.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { Avatar, Box, Grid, Typography } from '../../base';
3-
import { CLOUD_URL } from '../../constants/constants';
3+
import { MESHERY_CLOUD_PROD } from '../../constants/constants';
44
import { PersonIcon } from '../../icons';
55
import { CustomTooltip } from '../CustomTooltip';
66

@@ -44,7 +44,7 @@ const AuthorCell: React.FC<AuthorCellProps> = ({
4444
alt={displayName}
4545
src={avatarUrl}
4646
onClick={() => {
47-
window.open(`${CLOUD_URL}/user/${userId}`, '_blank');
47+
window.open(`${MESHERY_CLOUD_PROD}/user/${userId}`, '_blank');
4848
}}
4949
>
5050
{!avatarUrl && <PersonIcon />}

src/custom/CatalogDetail/ChallengesSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useEffect, useState } from 'react';
22
import { Link, ListItemIcon } from '../../base';
3-
import { CLOUD_URL } from '../../constants/constants';
3+
import { MESHERY_CLOUD_PROD } from '../../constants/constants';
44
import { ChallengesIcon } from '../../icons';
55
import { useTheme } from '../../theme';
66
import CollapsibleSection from './CollapsibleSection';
@@ -30,7 +30,7 @@ const ChallengesSection: React.FC<ChallengesSectionProps> = ({ filteredAcademyDa
3030

3131
const renderChallengeItem = (item: string, index: number) => (
3232
<Link
33-
href={`${CLOUD_URL}/academy/challenges/${slugify('' + item)}`}
33+
href={`${MESHERY_CLOUD_PROD}/academy/challenges/${slugify('' + item)}`}
3434
target="_blank"
3535
rel="noopener noreferrer"
3636
style={{ textDecoration: 'none', color: 'inherit' }}

src/custom/CatalogDetail/LearningSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useEffect, useState } from 'react';
22
import { Link, ListItemIcon } from '../../base';
3-
import { CLOUD_URL } from '../../constants/constants';
3+
import { MESHERY_CLOUD_PROD } from '../../constants/constants';
44
import { LearningIcon } from '../../icons';
55
import { useTheme } from '../../theme';
66
import CollapsibleSection from './CollapsibleSection';
@@ -30,7 +30,7 @@ const LearningSection: React.FC<LearningSectionProps> = ({ filteredAcademyData }
3030

3131
const renderLearningItem = (item: string, index: number) => (
3232
<Link
33-
href={`${CLOUD_URL}/academy/learning-paths/${slugify('' + item)}`}
33+
href={`${MESHERY_CLOUD_PROD}/academy/learning-paths/${slugify('' + item)}`}
3434
target="_blank"
3535
rel="noopener noreferrer"
3636
style={{ textDecoration: 'none', color: 'inherit' }}

src/custom/CatalogDetail/UserInfo.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Avatar } from '../../base';
2-
import { CLOUD_URL } from '../../constants/constants';
2+
import { MESHERY_CLOUD_PROD } from '../../constants/constants';
33
import { LockIcon, PublicIcon } from '../../icons';
44
import { getFormatDate } from '../../utils';
55
import { Pattern } from '../CustomCatalog/CustomCard';
@@ -44,7 +44,7 @@ const UserInfo: React.FC<UserInfoProps> = ({
4444
}}
4545
/>
4646
<RedirectLink
47-
href={`${CLOUD_URL}/user/${details?.user_id}`}
47+
href={`${MESHERY_CLOUD_PROD}/user/${details?.user_id}`}
4848
target="_blank"
4949
rel="noopener noreferrer"
5050
>

src/custom/NavigationNavbar/navigationNavbar.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import ExpandLessIcon from '@mui/icons-material/ExpandLess';
22
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
3-
import { ListItemTextProps, MenuListProps } from '@mui/material';
3+
import { ListItemTextProps, MenuListProps, useMediaQuery, useTheme } from '@mui/material';
44
import React, { MouseEvent, useState } from 'react';
55
import { Collapse, Divider, ListItemText, MenuItem } from '../../base';
66
import { IconWrapper, MenuItemList, MenuItemSubList, MenuListStyle, SubIconWrapper } from './style';
@@ -13,6 +13,7 @@ type NavigationItem = {
1313
onClick: () => void;
1414
subItems?: NavigationItem[];
1515
addDivider?: boolean;
16+
showOnWeb?: boolean;
1617
};
1718

1819
interface NavigationNavbarProps {
@@ -26,6 +27,8 @@ const NavigationNavbar: React.FC<NavigationNavbarProps> = ({
2627
MenuListProps = {},
2728
ListItemTextProps = {}
2829
}) => {
30+
const theme = useTheme();
31+
const isDesktop = useMediaQuery(theme.breakpoints.up('sm'));
2932
const [openSectionId, setOpenSectionId] = useState<string | null>(null);
3033
const toggleSectionOpen = (sectionId: string, event: MouseEvent<SVGSVGElement>) => {
3134
event.stopPropagation();
@@ -41,6 +44,12 @@ const NavigationNavbar: React.FC<NavigationNavbarProps> = ({
4144
const permission = item.permission ?? true;
4245
const addDivider = item.addDivider ?? false;
4346

47+
const showOnWeb = item.showOnWeb ?? true;
48+
49+
if (!showOnWeb && isDesktop) {
50+
return null;
51+
}
52+
4453
return (
4554
<React.Fragment key={item.id}>
4655
<MenuItem disabled={!permission} onClick={item.onClick}>

src/custom/PerformersSection/styles.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ export const Title = styled(Typography)(({ theme }) => ({
9090
}));
9191

9292
export const StyledCard = styled(Card)<StyledCardProps>(({ theme }) => ({
93-
width: 'inherit',
94-
minWidth: '150px',
93+
width: '200px',
9594
borderRadius: '16px',
9695
position: 'relative',
9796
overflow: 'hidden',

src/custom/UsersTable/UserTableAvatarInfo.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Avatar, Box, Grid, Typography } from '../../base';
2-
import { CLOUD_URL } from '../../constants/constants';
2+
import { MESHERY_CLOUD_PROD } from '../../constants/constants';
33
import { PersonIcon } from '../../icons';
44
import { useTheme } from '../../theme';
55

@@ -18,7 +18,7 @@ const UserTableAvatarInfo: React.FC<UserTableAvatarInfoProps> = ({
1818
}): JSX.Element => {
1919
const theme = useTheme();
2020
const handleProfileClick = (): void => {
21-
window.open(`${CLOUD_URL}/user/${userId}`);
21+
window.open(`${MESHERY_CLOUD_PROD}/user/${userId}`);
2222
};
2323

2424
return (

src/hooks/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './useRoomActivity';

0 commit comments

Comments
 (0)