dashboard
This commit is contained in:
@@ -6,4 +6,6 @@ VITE_BASE_URL = 'https://dmail-api.danakcorp.com'
|
|||||||
VITE_SERVICE_ID = 'e51afdc3-ea0b-49cf-8f49-2a6f131b024e'
|
VITE_SERVICE_ID = 'e51afdc3-ea0b-49cf-8f49-2a6f131b024e'
|
||||||
|
|
||||||
VITE_LOGIN_URL = 'https://console.danakcorp.com/auth/login'
|
VITE_LOGIN_URL = 'https://console.danakcorp.com/auth/login'
|
||||||
VITE_CONSOLE_URL = 'https://console.danakcorp.com'
|
VITE_CONSOLE_URL = 'https://console.danakcorp.com'
|
||||||
|
|
||||||
|
VITE_WORKSPACE_ID = 'workspace_id'
|
||||||
+2
-1
@@ -159,7 +159,8 @@
|
|||||||
"add_social": "اضافه کردن شبکه اجتماعی",
|
"add_social": "اضافه کردن شبکه اجتماعی",
|
||||||
"update_social": "بروزرسانی شبکه اجتماعی",
|
"update_social": "بروزرسانی شبکه اجتماعی",
|
||||||
"delete": "حذف",
|
"delete": "حذف",
|
||||||
"preview": "پیش نمایش"
|
"preview": "پیش نمایش",
|
||||||
|
"dashboard": "میزکار"
|
||||||
},
|
},
|
||||||
"save": "ذخیره",
|
"save": "ذخیره",
|
||||||
"export_html": "خروجی HTML",
|
"export_html": "خروجی HTML",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { FC } from 'react'
|
import { FC } from 'react'
|
||||||
import LogoImage from '../assets/images/logo.svg'
|
import LogoImage from '../assets/images/logo.svg'
|
||||||
import { Brush2, Global, Logout, PenClose, People, Setting3 } from 'iconsax-react'
|
import { Brush2, Element3, Global, Logout, PenClose, People, Setting3 } from 'iconsax-react'
|
||||||
import SideBarItem from './SideBarItem'
|
import SideBarItem from './SideBarItem'
|
||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import { useSharedStore } from './store/sharedStore'
|
import { useSharedStore } from './store/sharedStore'
|
||||||
@@ -23,7 +23,7 @@ const SideBar: FC = () => {
|
|||||||
const iconSizeSideBar = 20
|
const iconSizeSideBar = 20
|
||||||
|
|
||||||
const handleItemClick = (link: string, isLogout?: boolean) => (e: React.MouseEvent<HTMLAnchorElement>) => {
|
const handleItemClick = (link: string, isLogout?: boolean) => (e: React.MouseEvent<HTMLAnchorElement>) => {
|
||||||
if (!isDomainActive && link !== Paths.settingDomain && !isLogout) {
|
if ((!isDomainActive && link !== Paths.settingDomain && !isLogout) && (link !== Paths.home)) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
toast('ابتدا باید یک دامنه تایید شده داشته باشید', 'error')
|
toast('ابتدا باید یک دامنه تایید شده داشته باشید', 'error')
|
||||||
return
|
return
|
||||||
@@ -52,6 +52,13 @@ const SideBar: FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='text-xs text-[#8C90A3]'>
|
<div className='text-xs text-[#8C90A3]'>
|
||||||
|
<SideBarItem
|
||||||
|
icon={<Element3 variant={isActive(Paths.home) ? 'Bold' : 'Outline'} color={isActive(Paths.settingMailServer) ? 'black' : '#8C90A3'} size={iconSizeSideBar} />}
|
||||||
|
title={t('setting.dashboard')}
|
||||||
|
isActive={isActive(Paths.home)}
|
||||||
|
link={Paths.home}
|
||||||
|
onClick={handleItemClick(Paths.home)}
|
||||||
|
/>
|
||||||
<SideBarItem
|
<SideBarItem
|
||||||
icon={<Setting3 variant={isActive(Paths.settingMailServer) ? 'Bold' : 'Outline'} color={isActive(Paths.settingMailServer) ? 'black' : '#8C90A3'} size={iconSizeSideBar} />}
|
icon={<Setting3 variant={isActive(Paths.settingMailServer) ? 'Bold' : 'Outline'} color={isActive(Paths.settingMailServer) ? 'black' : '#8C90A3'} size={iconSizeSideBar} />}
|
||||||
title={t('setting.mail_server')}
|
title={t('setting.mail_server')}
|
||||||
|
|||||||
Reference in New Issue
Block a user