Header kısmındaki ikonları Fc olarak değiştirdim
This commit is contained in:
parent
f17d95c1d2
commit
08b3cb43c8
8 changed files with 171 additions and 158 deletions
|
|
@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict';
|
||||||
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
||||||
}, {
|
}, {
|
||||||
"url": "index.html",
|
"url": "index.html",
|
||||||
"revision": "0.271iot081v"
|
"revision": "0.tihrrtufp5o"
|
||||||
}], {});
|
}], {});
|
||||||
workbox.cleanupOutdatedCaches();
|
workbox.cleanupOutdatedCaches();
|
||||||
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,9 @@ const HeaderActionsEnd = () => {
|
||||||
<>
|
<>
|
||||||
<Search />
|
<Search />
|
||||||
<AiAssistant />
|
<AiAssistant />
|
||||||
<LanguageSelector />
|
|
||||||
<Notification />
|
<Notification />
|
||||||
<SidePanel />
|
<SidePanel />
|
||||||
|
<LanguageSelector />
|
||||||
<UserDropdown hoverable={false} />
|
<UserDropdown hoverable={false} />
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import Tooltip from '@/components/ui/Tooltip'
|
||||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
import { useLocalization } from '@/utils/hooks/useLocalization'
|
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||||
import { usePermission } from '@/utils/hooks/usePermission'
|
import { usePermission } from '@/utils/hooks/usePermission'
|
||||||
import { FaHeadset } from 'react-icons/fa';
|
import { FcAssistant, FcHeadset } from 'react-icons/fc'
|
||||||
import { useNavigate } from 'react-router-dom'
|
import { useNavigate } from 'react-router-dom'
|
||||||
|
|
||||||
const AiAssistant = () => {
|
const AiAssistant = () => {
|
||||||
|
|
@ -15,18 +15,16 @@ const AiAssistant = () => {
|
||||||
if (!canViewAi) {
|
if (!canViewAi) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<Tooltip title={translate('::Abp.Identity.Ai')}>
|
||||||
<Tooltip title={translate('::Abp.Identity.Ai')}>
|
<div
|
||||||
<div
|
onClick={() => navigate(ROUTES_ENUM.protected.admin.ai)}
|
||||||
onClick={() => navigate(ROUTES_ENUM.protected.admin.ai)}
|
className="flex items-center justify-center w-9 h-9 m-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 cursor-pointer transition-colors duration-200"
|
||||||
className="flex items-center justify-center w-9 h-9 m-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 cursor-pointer transition-colors duration-200"
|
>
|
||||||
>
|
<FcHeadset size={24} />
|
||||||
<FaHeadset size={28} />
|
</div>
|
||||||
</div>
|
</Tooltip>
|
||||||
</Tooltip>
|
|
||||||
</>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@ import { FaCheck } from 'react-icons/fa'
|
||||||
import type { CommonProps } from '@/@types/common'
|
import type { CommonProps } from '@/@types/common'
|
||||||
import appConfig from '@/configs/app.config'
|
import appConfig from '@/configs/app.config'
|
||||||
import { dateLocales } from '@/constants/dateLocales.constant'
|
import { dateLocales } from '@/constants/dateLocales.constant'
|
||||||
|
import { Tooltip } from '../ui'
|
||||||
|
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||||
|
|
||||||
const _LanguageSelector = ({ className }: CommonProps) => {
|
const _LanguageSelector = ({ className }: CommonProps) => {
|
||||||
const [loading, setLoading] = useState(false)
|
const [loading, setLoading] = useState(false)
|
||||||
|
|
@ -23,6 +25,8 @@ const _LanguageSelector = ({ className }: CommonProps) => {
|
||||||
return languageList?.find((lang) => lang.cultureName === currentLang)?.cultureName
|
return languageList?.find((lang) => lang.cultureName === currentLang)?.cultureName
|
||||||
}, [currentLang, languageList])
|
}, [currentLang, languageList])
|
||||||
|
|
||||||
|
const { translate } = useLocalization()
|
||||||
|
|
||||||
const selectedLanguage = (
|
const selectedLanguage = (
|
||||||
<div className={classNames(className, 'flex items-center')}>
|
<div className={classNames(className, 'flex items-center')}>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
|
|
@ -58,26 +62,28 @@ const _LanguageSelector = ({ className }: CommonProps) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dropdown renderTitle={selectedLanguage} placement="bottom-end">
|
<Tooltip title={translate('::App.Languages.Language')}>
|
||||||
{languageList?.map((lang) => (
|
<Dropdown renderTitle={selectedLanguage} placement="bottom-end">
|
||||||
<Dropdown.Item
|
{languageList?.map((lang) => (
|
||||||
key={lang.cultureName}
|
<Dropdown.Item
|
||||||
className="justify-between"
|
key={lang.cultureName}
|
||||||
eventKey={lang.cultureName}
|
className="justify-between"
|
||||||
onClick={() => onLanguageSelect(lang.cultureName)}
|
eventKey={lang.cultureName}
|
||||||
>
|
onClick={() => onLanguageSelect(lang.cultureName)}
|
||||||
<span className="flex items-center">
|
>
|
||||||
<Avatar
|
<span className="flex items-center">
|
||||||
size={18}
|
<Avatar
|
||||||
shape="circle"
|
size={18}
|
||||||
src={`/img/countries/${lang.cultureName ?? 'default'}.png`}
|
shape="circle"
|
||||||
/>
|
src={`/img/countries/${lang.cultureName ?? 'default'}.png`}
|
||||||
<span className="ltr:ml-2 rtl:mr-2">{lang.displayName}</span>
|
/>
|
||||||
</span>
|
<span className="ltr:ml-2 rtl:mr-2">{lang.displayName}</span>
|
||||||
{currentLang === lang.cultureName && <FaCheck className="text-emerald-500 text-lg" />}
|
</span>
|
||||||
</Dropdown.Item>
|
{currentLang === lang.cultureName && <FaCheck className="text-emerald-500 text-lg" />}
|
||||||
))}
|
</Dropdown.Item>
|
||||||
</Dropdown>
|
))}
|
||||||
|
</Dropdown>
|
||||||
|
</Tooltip>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,10 @@ import classNames from 'classnames'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import relativeTime from 'dayjs/plugin/relativeTime'
|
import relativeTime from 'dayjs/plugin/relativeTime'
|
||||||
import { useCallback, useEffect, useRef, useState } from 'react'
|
import { useCallback, useEffect, useRef, useState } from 'react'
|
||||||
import { FaBell, FaEnvelopeOpen } from 'react-icons/fa';
|
import { FaEnvelopeOpen } from 'react-icons/fa'
|
||||||
import { Link } from 'react-router-dom'
|
import { Link } from 'react-router-dom'
|
||||||
import { Notification as Notify, toast } from '../ui'
|
import { Notification as Notify, toast } from '../ui'
|
||||||
|
import { FcAdvertising } from 'react-icons/fc'
|
||||||
|
|
||||||
dayjs.extend(relativeTime)
|
dayjs.extend(relativeTime)
|
||||||
|
|
||||||
|
|
@ -57,10 +58,10 @@ const NotificationToggle = ({
|
||||||
content={unreadCount}
|
content={unreadCount}
|
||||||
innerClass="py-0 px-1"
|
innerClass="py-0 px-1"
|
||||||
>
|
>
|
||||||
<FaBell />
|
<FcAdvertising />
|
||||||
</Badge>
|
</Badge>
|
||||||
) : (
|
) : (
|
||||||
<FaBell />
|
<FcAdvertising />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
@ -250,88 +251,90 @@ const _Notification = ({ className }: { className?: string }) => {
|
||||||
}, [desktopNotificationList])
|
}, [desktopNotificationList])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dropdown
|
<Tooltip title={translate('::App.Notifications')}>
|
||||||
renderTitle={
|
<Dropdown
|
||||||
<NotificationToggle unreadCount={unreadNotificationCount} className={className} />
|
renderTitle={
|
||||||
}
|
<NotificationToggle unreadCount={unreadNotificationCount} className={className} />
|
||||||
menuClass="p-0 min-w-[280px] md:min-w-[340px]"
|
}
|
||||||
placement={larger.md ? 'bottom-end' : 'bottom-center'}
|
menuClass="p-0 min-w-[280px] md:min-w-[340px]"
|
||||||
onOpen={onNotificationOpen}
|
placement={larger.md ? 'bottom-end' : 'bottom-center'}
|
||||||
>
|
onOpen={onNotificationOpen}
|
||||||
<Dropdown.Item variant="header">
|
>
|
||||||
<div className="border-b border-gray-200 dark:border-gray-600 px-4 py-2 flex items-center justify-between">
|
<Dropdown.Item variant="header">
|
||||||
<h6>{translate('::Abp.Identity.ActivityLogs.Notifications')}</h6>
|
<div className="border-b border-gray-200 dark:border-gray-600 px-4 py-2 flex items-center justify-between">
|
||||||
<Tooltip title={translate('::Abp.Identity.ActivityLogs.MarkAllRead')}>
|
<h6>{translate('::Abp.Identity.ActivityLogs.Notifications')}</h6>
|
||||||
<Button
|
<Tooltip title={translate('::Abp.Identity.ActivityLogs.MarkAllRead')}>
|
||||||
variant="plain"
|
<Button
|
||||||
shape="circle"
|
variant="plain"
|
||||||
size="sm"
|
shape="circle"
|
||||||
icon={<FaEnvelopeOpen className="text-xl" />}
|
size="sm"
|
||||||
onClick={onMarkAllAsRead}
|
icon={<FaEnvelopeOpen className="text-xl" />}
|
||||||
/>
|
onClick={onMarkAllAsRead}
|
||||||
</Tooltip>
|
/>
|
||||||
</div>
|
</Tooltip>
|
||||||
</Dropdown.Item>
|
</div>
|
||||||
<div className={classNames('overflow-y-auto', notificationHeight)}>
|
</Dropdown.Item>
|
||||||
<ScrollBar direction={direction}>
|
<div className={classNames('overflow-y-auto', notificationHeight)}>
|
||||||
{notificationList.length > 0 &&
|
<ScrollBar direction={direction}>
|
||||||
notificationList.map((item, index) => (
|
{notificationList.length > 0 &&
|
||||||
<div
|
notificationList.map((item, index) => (
|
||||||
key={item.id}
|
<div
|
||||||
className={`relative flex px-4 py-4 cursor-pointer hover:bg-gray-50 active:bg-gray-100 dark:hover:bg-black dark:hover:bg-opacity-20 ${
|
key={item.id}
|
||||||
!isLastChild(notificationList, index)
|
className={`relative flex px-4 py-4 cursor-pointer hover:bg-gray-50 active:bg-gray-100 dark:hover:bg-black dark:hover:bg-opacity-20 ${
|
||||||
? 'border-b border-gray-200 dark:border-gray-600'
|
!isLastChild(notificationList, index)
|
||||||
: ''
|
? 'border-b border-gray-200 dark:border-gray-600'
|
||||||
}`}
|
: ''
|
||||||
onClick={() => onMarkAsRead(item.id)}
|
}`}
|
||||||
>
|
onClick={() => onMarkAsRead(item.id)}
|
||||||
<div>{notificationTypeAvatar(item.creatorId, item.tenantId)}</div>
|
>
|
||||||
<div className="ltr:ml-3 rtl:mr-3">
|
<div>{notificationTypeAvatar(item.creatorId, item.tenantId)}</div>
|
||||||
<div>
|
<div className="ltr:ml-3 rtl:mr-3">
|
||||||
{item.notificationType && (
|
<div>
|
||||||
<span className="font-semibold heading-text">{item.notificationType} </span>
|
{item.notificationType && (
|
||||||
)}
|
<span className="font-semibold heading-text">{item.notificationType} </span>
|
||||||
<div>{item.message}</div>
|
)}
|
||||||
|
<div>{item.message}</div>
|
||||||
|
</div>
|
||||||
|
<span className="text-xs">{dayjs(item.date).fromNow()}</span>
|
||||||
</div>
|
</div>
|
||||||
<span className="text-xs">{dayjs(item.date).fromNow()}</span>
|
<Badge
|
||||||
|
className="absolute top-4 ltr:right-4 rtl:left-4 mt-1.5"
|
||||||
|
innerClass={`${item.readed ? 'bg-gray-300' : bgTheme} `}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Badge
|
))}
|
||||||
className="absolute top-4 ltr:right-4 rtl:left-4 mt-1.5"
|
{loading && (
|
||||||
innerClass={`${item.readed ? 'bg-gray-300' : bgTheme} `}
|
<div className={classNames('flex items-center justify-center', notificationHeight)}>
|
||||||
/>
|
<Spinner size={40} />
|
||||||
</div>
|
</div>
|
||||||
))}
|
)}
|
||||||
{loading && (
|
{noResult && (
|
||||||
<div className={classNames('flex items-center justify-center', notificationHeight)}>
|
<div className={classNames('flex items-center justify-center', notificationHeight)}>
|
||||||
<Spinner size={40} />
|
<div className="text-center">
|
||||||
</div>
|
<img
|
||||||
)}
|
className="mx-auto mb-2 max-w-[150px]"
|
||||||
{noResult && (
|
src="/img/others/no-notification.png"
|
||||||
<div className={classNames('flex items-center justify-center', notificationHeight)}>
|
alt="no-notification"
|
||||||
<div className="text-center">
|
/>
|
||||||
<img
|
<h6 className="font-semibold">No notifications!</h6>
|
||||||
className="mx-auto mb-2 max-w-[150px]"
|
<p className="mt-1">Please Try again later</p>
|
||||||
src="/img/others/no-notification.png"
|
</div>
|
||||||
alt="no-notification"
|
|
||||||
/>
|
|
||||||
<h6 className="font-semibold">No notifications!</h6>
|
|
||||||
<p className="mt-1">Please Try again later</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
)}
|
||||||
)}
|
</ScrollBar>
|
||||||
</ScrollBar>
|
|
||||||
</div>
|
|
||||||
<Dropdown.Item variant="header">
|
|
||||||
<div className="flex justify-center border-t border-gray-200 dark:border-gray-600 px-4 py-2">
|
|
||||||
<Link
|
|
||||||
to={ROUTES_ENUM.protected.admin.activityLog}
|
|
||||||
className="font-semibold cursor-pointer p-2 px-3 text-gray-600 hover:text-gray-900 dark:text-gray-200 dark:hover:text-white"
|
|
||||||
>
|
|
||||||
{translate('::Abp.Identity.ActivityLogs.ViewAllActivity')}
|
|
||||||
</Link>
|
|
||||||
</div>
|
</div>
|
||||||
</Dropdown.Item>
|
<Dropdown.Item variant="header">
|
||||||
</Dropdown>
|
<div className="flex justify-center border-t border-gray-200 dark:border-gray-600 px-4 py-2">
|
||||||
|
<Link
|
||||||
|
to={ROUTES_ENUM.protected.admin.activityLog}
|
||||||
|
className="font-semibold cursor-pointer p-2 px-3 text-gray-600 hover:text-gray-900 dark:text-gray-200 dark:hover:text-white"
|
||||||
|
>
|
||||||
|
{translate('::Abp.Identity.ActivityLogs.ViewAllActivity')}
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</Dropdown.Item>
|
||||||
|
</Dropdown>
|
||||||
|
</Tooltip>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,13 @@ import useThemeClass from '@/utils/hooks/useThemeClass'
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames'
|
||||||
import { useEffect, useRef, useState } from 'react'
|
import { useEffect, useRef, useState } from 'react'
|
||||||
import Highlighter from 'react-highlight-words'
|
import Highlighter from 'react-highlight-words'
|
||||||
import { FaChevronRight, FaSearch } from 'react-icons/fa';
|
import { FaChevronRight, FaSearch } from 'react-icons/fa'
|
||||||
import { Link } from 'react-router-dom'
|
import { Link } from 'react-router-dom'
|
||||||
import { PermissionCheck } from '../shared'
|
import { PermissionCheck } from '../shared'
|
||||||
import { Badge, Checkbox, Pagination } from '../ui'
|
import { Badge, Checkbox, Pagination, Tooltip } from '../ui'
|
||||||
import { useLocalization } from '@/utils/hooks/useLocalization'
|
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||||
import { getSearch, getSystems } from '@/services/global-search.service'
|
import { getSearch, getSystems } from '@/services/global-search.service'
|
||||||
|
import { FcSearch } from 'react-icons/fc'
|
||||||
|
|
||||||
type SearchData = {
|
type SearchData = {
|
||||||
title: string
|
title: string
|
||||||
|
|
@ -173,9 +174,12 @@ const _Search = ({ className }: { className?: string }) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PermissionCheck permissions={[GLOBAL_SEARCH]}>
|
<PermissionCheck permissions={[GLOBAL_SEARCH]}>
|
||||||
<div className={classNames(className, 'text-2xl')} onClick={handleSearchOpen}>
|
<Tooltip title={translate('::App.Search')}>
|
||||||
<FaSearch />
|
<div className={classNames(className, 'text-2xl')} onClick={handleSearchOpen}>
|
||||||
</div>
|
<FcSearch />
|
||||||
|
</div>
|
||||||
|
</Tooltip>
|
||||||
|
|
||||||
<Dialog
|
<Dialog
|
||||||
contentClassName="p-0"
|
contentClassName="p-0"
|
||||||
isOpen={searchDialogOpen}
|
isOpen={searchDialogOpen}
|
||||||
|
|
@ -193,7 +197,7 @@ const _Search = ({ className }: { className?: string }) => {
|
||||||
onKeyDown={(e) => e.key === 'Enter' && handleSearch()}
|
onKeyDown={(e) => e.key === 'Enter' && handleSearch()}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Button size="xs" onClick={handleSearch}>
|
<Button size="sm" onClick={handleSearch}>
|
||||||
<FaSearch />
|
<FaSearch />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,19 @@
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames'
|
||||||
import Drawer from '@/components/ui/Drawer'
|
import Drawer from '@/components/ui/Drawer'
|
||||||
import { FaCog } from 'react-icons/fa';
|
|
||||||
import SidePanelContent, { SidePanelContentProps } from './SidePanelContent'
|
import SidePanelContent, { SidePanelContentProps } from './SidePanelContent'
|
||||||
import withHeaderItem from '@/utils/hoc/withHeaderItem'
|
import withHeaderItem from '@/utils/hoc/withHeaderItem'
|
||||||
import { useStoreState, useStoreActions } from '@/store'
|
import { useStoreState, useStoreActions } from '@/store'
|
||||||
import type { CommonProps } from '@/@types/common'
|
import type { CommonProps } from '@/@types/common'
|
||||||
import { useLocalization } from '@/utils/hooks/useLocalization'
|
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||||
|
import { FcEngineering } from 'react-icons/fc'
|
||||||
|
import { Tooltip } from '@/components/ui'
|
||||||
|
|
||||||
type SidePanelProps = SidePanelContentProps & CommonProps
|
type SidePanelProps = SidePanelContentProps & CommonProps
|
||||||
|
|
||||||
const _SidePanel = (props: SidePanelProps) => {
|
const _SidePanel = (props: SidePanelProps) => {
|
||||||
const { setPanelExpand } = useStoreActions((actions) => actions.theme)
|
const { setPanelExpand } = useStoreActions((actions) => actions.theme)
|
||||||
|
|
||||||
const {translate } = useLocalization()
|
const { translate } = useLocalization()
|
||||||
|
|
||||||
const { className, ...rest } = props
|
const { className, ...rest } = props
|
||||||
|
|
||||||
|
|
@ -34,9 +35,11 @@ const _SidePanel = (props: SidePanelProps) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className={classNames('text-2xl', className)} onClick={openPanel} {...rest}>
|
<Tooltip title={translate('::SidePanel.Title')}>
|
||||||
<FaCog />
|
<div className={classNames('text-2xl', className)} onClick={openPanel} {...rest}>
|
||||||
</div>
|
<FcEngineering />
|
||||||
|
</div>
|
||||||
|
</Tooltip>
|
||||||
<Drawer
|
<Drawer
|
||||||
title={translate('::SidePanel.Title')}
|
title={translate('::SidePanel.Title')}
|
||||||
isOpen={panelExpand}
|
isOpen={panelExpand}
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,11 @@ import withHeaderItem from '@/utils/hoc/withHeaderItem'
|
||||||
import useAuth from '@/utils/hooks/useAuth'
|
import useAuth from '@/utils/hooks/useAuth'
|
||||||
import { useLocalization } from '@/utils/hooks/useLocalization'
|
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames'
|
||||||
import { FaChartLine } from 'react-icons/fa';
|
import { FaChartLine } from 'react-icons/fa'
|
||||||
import { FaSignOutAlt, FaUser } from 'react-icons/fa';
|
import { FaSignOutAlt, FaUser } from 'react-icons/fa'
|
||||||
import { Link } from 'react-router-dom'
|
import { Link } from 'react-router-dom'
|
||||||
import { Avatar } from '../ui'
|
import { Avatar } from '../ui'
|
||||||
|
import { FcNext, FcNfcSign, FcPodiumWithSpeaker, FcVoicePresentation } from 'react-icons/fc'
|
||||||
|
|
||||||
type DropdownList = {
|
type DropdownList = {
|
||||||
label: string
|
label: string
|
||||||
|
|
@ -27,12 +28,12 @@ const _UserDropdown = ({ className }: CommonProps) => {
|
||||||
{
|
{
|
||||||
label: translate('::Abp.Identity.Profile'),
|
label: translate('::Abp.Identity.Profile'),
|
||||||
path: ROUTES_ENUM.protected.admin.profile.general,
|
path: ROUTES_ENUM.protected.admin.profile.general,
|
||||||
icon: <FaUser />,
|
icon: <FcVoicePresentation />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: translate('::Abp.Identity.ActivityLogs'),
|
label: translate('::Abp.Identity.ActivityLogs'),
|
||||||
path: ROUTES_ENUM.protected.admin.activityLog,
|
path: ROUTES_ENUM.protected.admin.activityLog,
|
||||||
icon: <FaChartLine />,
|
icon: <FcNfcSign />,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -48,37 +49,35 @@ const _UserDropdown = ({ className }: CommonProps) => {
|
||||||
)
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<Dropdown menuStyle={{ minWidth: 240 }} renderTitle={UserAvatar} placement="bottom-end">
|
||||||
<Dropdown menuStyle={{ minWidth: 240 }} renderTitle={UserAvatar} placement="bottom-end">
|
<Dropdown.Item variant="header">
|
||||||
<Dropdown.Item variant="header">
|
<div className="py-2 px-3 flex items-center gap-2">
|
||||||
<div className="py-2 px-3 flex items-center gap-2">
|
<Avatar shape="circle" src={avatar} alt="avatar" />
|
||||||
<Avatar shape="circle" src={avatar} alt="avatar" />
|
<div>
|
||||||
<div>
|
<div className="font-bold text-gray-900 dark:text-gray-100">{name}</div>
|
||||||
<div className="font-bold text-gray-900 dark:text-gray-100">{name}</div>
|
<div className="text-xs">{email}</div>
|
||||||
<div className="text-xs">{email}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</Dropdown.Item>
|
||||||
|
<Dropdown.Item variant="divider" />
|
||||||
|
{dropdownItemList.map((item) => (
|
||||||
|
<Dropdown.Item key={item.label} eventKey={item.label} className="mb-1 px-0">
|
||||||
|
<Link className="flex h-full w-full px-2" to={item.path}>
|
||||||
|
<span className="flex gap-2 items-center w-full">
|
||||||
|
<span className="text-xl opacity-50">{item.icon}</span>
|
||||||
|
<span>{item.label}</span>
|
||||||
|
</span>
|
||||||
|
</Link>
|
||||||
</Dropdown.Item>
|
</Dropdown.Item>
|
||||||
<Dropdown.Item variant="divider" />
|
))}
|
||||||
{dropdownItemList.map((item) => (
|
{/* <Dropdown.Item variant="divider" /> */}
|
||||||
<Dropdown.Item key={item.label} eventKey={item.label} className="mb-1 px-0">
|
<Dropdown.Item eventKey="Sign Out" className="mb-1 px-2" onClick={signOut}>
|
||||||
<Link className="flex h-full w-full px-2" to={item.path}>
|
<span className="text-xl opacity-50">
|
||||||
<span className="flex gap-2 items-center w-full">
|
<FcNext />
|
||||||
<span className="text-xl opacity-50">{item.icon}</span>
|
</span>
|
||||||
<span>{item.label}</span>
|
<span>{translate('::Abp.Identity.SignOut')} </span>
|
||||||
</span>
|
</Dropdown.Item>
|
||||||
</Link>
|
</Dropdown>
|
||||||
</Dropdown.Item>
|
|
||||||
))}
|
|
||||||
{/* <Dropdown.Item variant="divider" /> */}
|
|
||||||
<Dropdown.Item eventKey="Sign Out" className="gap-2" onClick={signOut}>
|
|
||||||
<span className="text-xl opacity-50">
|
|
||||||
<FaSignOutAlt />
|
|
||||||
</span>
|
|
||||||
<span>{translate('::Abp.Identity.SignOut')} </span>
|
|
||||||
</Dropdown.Item>
|
|
||||||
</Dropdown>
|
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue