Refactor project structure and update assets
- Added new directories for Llms and Security components under src. - Moved existing files into their respective directories for better organization. - Updated file paths in imports to reflect the new structure. - Replaced favicon.svg with a new version and updated its import path in index.html. - Created a new LogoIcon component for the favicon with customizable colors. - Added main and submenu link data files for navigation. - Removed unused favicon.svg from public directory. - Updated theme colors for a refreshed UI look.
This commit is contained in:
@@ -1,74 +1,27 @@
|
||||
import {
|
||||
IconCalendarStats,
|
||||
IconDeviceDesktopAnalytics,
|
||||
IconFingerprint,
|
||||
IconGauge,
|
||||
IconHome2,
|
||||
IconSettings,
|
||||
IconUserOutline as IconUser,
|
||||
IconArrowBarLeft,
|
||||
IconArrowBarRight,
|
||||
} from '../../assets/icons';
|
||||
|
||||
import {
|
||||
AppShell,
|
||||
Burger,
|
||||
Group,
|
||||
Skeleton,
|
||||
Tooltip,
|
||||
UnstyledButton,
|
||||
ActionIcon,
|
||||
Title,
|
||||
} from '@mantine/core';
|
||||
AppShell,
|
||||
Burger,
|
||||
Group,
|
||||
Skeleton,
|
||||
Tooltip,
|
||||
UnstyledButton,
|
||||
ActionIcon,
|
||||
Title,
|
||||
} from '@mantine/core';
|
||||
|
||||
import { default as LogoIcon } from '../../assets/icons/favicon'; // ruta relativa ajusta según tu estructura
|
||||
|
||||
import { useMantineTheme } from '@mantine/core';
|
||||
|
||||
import { mainLinksdata } from '../../data/navigationsLinks_1'; // ajusta la ruta
|
||||
import { submenuLinks } from '../../data/submenuLinks_1'; // ajusta la ruta según tu estructura
|
||||
|
||||
|
||||
import { useDisclosure, useMediaQuery } from '@mantine/hooks';
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
import classes from './Appshell.module.css';
|
||||
|
||||
const mainLinksdata = [
|
||||
{ icon: IconHome2, label: 'Home' },
|
||||
{ icon: IconGauge, label: 'Dashboard' },
|
||||
{ icon: IconDeviceDesktopAnalytics, label: 'Analytics' },
|
||||
{ icon: IconCalendarStats, label: 'Releases' },
|
||||
{ icon: IconUser, label: 'Account' },
|
||||
{ icon: IconFingerprint, label: 'Security' },
|
||||
{ icon: IconSettings, label: 'Settings' },
|
||||
];
|
||||
|
||||
const submenuLinks = {
|
||||
Home: [
|
||||
{ label: 'Inicio', to: '/' },
|
||||
{ label: 'Consulta Api', to: '/Consulta_API' },
|
||||
{ label: 'Prueba_appshell', to: '/prueba_appshell' },
|
||||
],
|
||||
Dashboard: [
|
||||
{ label: 'Resumen', to: '/dashboard/resumen' },
|
||||
{ label: 'Estadísticas', to: '/dashboard/estadisticas' },
|
||||
{ label: 'Usuarios', to: '/dashboard/usuarios' },
|
||||
],
|
||||
Analytics: [
|
||||
{ label: 'Conversiones', to: '/analytics/conversiones' },
|
||||
{ label: 'Tráfico', to: '/analytics/trafico' },
|
||||
{ label: 'Tendencias', to: '/analytics/tendencias' },
|
||||
],
|
||||
Releases: [
|
||||
{ label: 'Notas de versión', to: '/releases/notas-de-version' },
|
||||
{ label: 'Historial', to: '/releases/historial' },
|
||||
],
|
||||
Account: [
|
||||
{ label: 'Perfil', to: '/account/perfil' },
|
||||
{ label: 'Suscripciones', to: '/account/suscripciones' },
|
||||
],
|
||||
Security: [
|
||||
{ label: 'Contraseña', to: '/security/contraseña' },
|
||||
{ label: '2FA', to: '/security/2fa' },
|
||||
],
|
||||
Settings: [
|
||||
{ label: 'Preferencias', to: '/settings/preferencias' },
|
||||
{ label: 'Notificaciones', to: '/settings/notificaciones' },
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
type AppShellWithMenuProps = {
|
||||
@@ -77,6 +30,9 @@ import {
|
||||
|
||||
export function AppShellWithMenu({ children }: AppShellWithMenuProps) {
|
||||
|
||||
const theme = useMantineTheme();
|
||||
|
||||
|
||||
const location = useLocation();
|
||||
const isMobile = useMediaQuery('(max-width: 768px)');
|
||||
const [mobileOpened, { toggle: toggleMobile, close: closeMobile }] = useDisclosure(false);
|
||||
@@ -154,7 +110,12 @@ import {
|
||||
<Group h="100%" px="sm">
|
||||
<Burger opened={mobileOpened} onClick={toggleMobile} hiddenFrom="sm" size="sm" />
|
||||
<Burger opened={desktopOpened} onClick={toggleDesktop} visibleFrom="sm" size="sm" />
|
||||
<img src="/src/public/favicon.svg" alt="Logo" style={{ width: 30, height: 30 }} />
|
||||
<LogoIcon
|
||||
style={{ width: 30, height: 30 }}
|
||||
circleFill={theme.colors.brand[9]}
|
||||
pathFill={theme.colors.secondary[2]}
|
||||
/>
|
||||
|
||||
</Group>
|
||||
</AppShell.Header>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user