Skip to content

Commit

Permalink
Merge pull request #3170 from glific/enhancement/discord_ui
Browse files Browse the repository at this point in the history
Added discord link to the ui-#3007
  • Loading branch information
kurund authored Dec 15, 2024
2 parents d0ae9c1 + 67bf8da commit bfbb7cc
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 12 deletions.
14 changes: 14 additions & 0 deletions src/assets/images/icons/Discord/DiscordIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const SvgComponent = ({ color }: any) => (
<svg xmlns="http://www.w3.org/2000/svg" width={22} height={22}>
<title>{'Discord Icon'}</title>
<g fill="none" fillRule="evenodd">
<path
fill={color}
fillRule="nonzero"
d="M18.59 5.88997C17.36 5.31997 16.05 4.89997 14.67 4.65997C14.5 4.95997 14.3 5.36997 14.17 5.69997C12.71 5.47997 11.26 5.47997 9.83001 5.69997C9.69001 5.36997 9.49001 4.95997 9.32001 4.65997C7.94001 4.89997 6.63001 5.31997 5.40001 5.88997C2.92001 9.62997 2.25001 13.28 2.58001 16.87C4.23001 18.1 5.82001 18.84 7.39001 19.33C7.78001 18.8 8.12001 18.23 8.42001 17.64C7.85001 17.43 7.31001 17.16 6.80001 16.85C6.94001 16.75 7.07001 16.64 7.20001 16.54C10.33 18 13.72 18 16.81 16.54C16.94 16.65 17.07 16.75 17.21 16.85C16.7 17.16 16.15 17.42 15.59 17.64C15.89 18.23 16.23 18.8 16.62 19.33C18.19 18.84 19.79 18.1 21.43 16.87C21.82 12.7 20.76 9.08997 18.61 5.88997H18.59ZM8.84001 14.67C7.90001 14.67 7.13001 13.8 7.13001 12.73C7.13001 11.66 7.88001 10.79 8.84001 10.79C9.80001 10.79 10.56 11.66 10.55 12.73C10.55 13.79 9.80001 14.67 8.84001 14.67ZM15.15 14.67C14.21 14.67 13.44 13.8 13.44 12.73C13.44 11.66 14.19 10.79 15.15 10.79C16.11 10.79 16.87 11.66 16.86 12.73C16.86 13.79 16.11 14.67 15.15 14.67Z"
/>
</g>
</svg>
);
export default SvgComponent;

3 changes: 2 additions & 1 deletion src/components/UI/ListIcon/ListIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import Assistant from 'assets/images/icons/SideDrawer/Assistant';
import styles from './ListIcon.module.css';
import FiberNewIcon from '@mui/icons-material/FiberNew';
import { Badge } from '@mui/material';

import DiscordIcon from 'assets/images/icons/Discord/DiscordIcon'
export interface ListIconProps {
icon: string | undefined;
count?: number;
Expand Down Expand Up @@ -75,6 +75,7 @@ export const ListIcon = ({ icon = '', selected = false, count }: ListIconProps)
waGroup: WaGroupIcon,
knowledgeBase: KnowledgeBaseIcon,
assistant: Assistant,
discord:DiscordIcon
};

const iconImage = stringsToIcons[icon] && (
Expand Down
7 changes: 5 additions & 2 deletions src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ export const ONBOARD_URL_UPDATE = `${GLIFIC_API_URL}/v1/onboard/update-registrat
export const ONBOARD_URL_REACT_OUT = `${GLIFIC_API_URL}/v1/onboard/reachout`;
export const ONBOARD_URL = `${GLIFIC_API_URL}/v1/onboard/setup`;
export const RECAPTCHA_CLIENT_KEY = envVariables.VITE_RECAPTCHA_CLIENT_KEY;
export const UPLOAD_CONTACTS_SAMPLE = 'https://storage.googleapis.com/cc-tides/sample_contacts_import.csv';
export const UPLOAD_CONTACTS_ADMIN_SAMPLE = 'https://storage.googleapis.com/cc-tides/sample_import_admin.csv';
export const DISCORD_URL='https://discord.gg/kyqsZAJEPK';
export const UPLOAD_CONTACTS_SAMPLE =
'https://storage.googleapis.com/cc-tides/sample_contacts_import.csv';
export const UPLOAD_CONTACTS_ADMIN_SAMPLE =
'https://storage.googleapis.com/cc-tides/sample_import_admin.csv';
export const REGISTRATION_HELP_LINK =
'https://glific.slab.com/public/posts/02-managing-staff-members-creating-account-on-glific-gg6fkw8h';
export const CONTACT_MANAGE_HELP_LINK =
Expand Down
26 changes: 17 additions & 9 deletions src/config/menu.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { organizationHasDynamicRole } from 'common/utils';
import { ANALYTICS_URL, GLIFIC_DOCS_URL } from 'config';
import { ANALYTICS_URL, GLIFIC_DOCS_URL, DISCORD_URL } from 'config';
import { getOrganizationServices } from 'services/AuthService';

const allRoles = ['Staff', 'Manager', 'Admin', 'Dynamic', 'Glific_admin'];
Expand Down Expand Up @@ -279,14 +279,22 @@ const menus = (): Menu[] => [
roles: staffLevel,
},

// {
// title: "What's new",
// path: '/changelog',
// url: NEW_UI_BLOG,
// icon: 'new',
// type: 'sideDrawer',
// roles: staffLevel,
// },
// {
// title: "What's new",
// path: '/changelog',
// url: NEW_UI_BLOG,
// icon: 'new',
// type: 'sideDrawer',
// roles: staffLevel,
// },
{
title: "Discord",
path: '/discord',
url: DISCORD_URL,
icon: 'discord',
type: 'sideDrawer',
roles: staffLevel,
},
];

export const getMenus = (menuType = 'sideDrawer', role = 'Staff') =>
Expand Down

0 comments on commit bfbb7cc

Please sign in to comment.