Added icon prop
This commit is contained in:
parent
ae53bd8034
commit
cc4c5eac21
|
@ -1,3 +1,4 @@
|
||||||
|
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
||||||
import React, { lazy } from 'react';
|
import React, { lazy } from 'react';
|
||||||
import ServerConsole from '@/components/server/console/ServerConsoleContainer';
|
import ServerConsole from '@/components/server/console/ServerConsoleContainer';
|
||||||
import DatabasesContainer from '@/components/server/databases/DatabasesContainer';
|
import DatabasesContainer from '@/components/server/databases/DatabasesContainer';
|
||||||
|
@ -13,6 +14,19 @@ import AccountApiContainer from '@/components/dashboard/AccountApiContainer';
|
||||||
import AccountSSHContainer from '@/components/dashboard/ssh/AccountSSHContainer';
|
import AccountSSHContainer from '@/components/dashboard/ssh/AccountSSHContainer';
|
||||||
import ActivityLogContainer from '@/components/dashboard/activity/ActivityLogContainer';
|
import ActivityLogContainer from '@/components/dashboard/activity/ActivityLogContainer';
|
||||||
import ServerActivityLogContainer from '@/components/server/ServerActivityLogContainer';
|
import ServerActivityLogContainer from '@/components/server/ServerActivityLogContainer';
|
||||||
|
import {
|
||||||
|
faBackward,
|
||||||
|
faClock,
|
||||||
|
faDatabase,
|
||||||
|
faEdit,
|
||||||
|
faFolder,
|
||||||
|
faNetworkWired,
|
||||||
|
faPaperclip,
|
||||||
|
faPlayCircle,
|
||||||
|
faTerminal,
|
||||||
|
faUser,
|
||||||
|
faWheelchair,
|
||||||
|
} from '@fortawesome/free-solid-svg-icons';
|
||||||
|
|
||||||
// Each of the router files is already code split out appropriately — so
|
// Each of the router files is already code split out appropriately — so
|
||||||
// all of the items above will only be loaded in when that router is loaded.
|
// all of the items above will only be loaded in when that router is loaded.
|
||||||
|
@ -29,6 +43,7 @@ interface RouteDefinition {
|
||||||
name: string | undefined;
|
name: string | undefined;
|
||||||
component: React.ComponentType;
|
component: React.ComponentType;
|
||||||
exact?: boolean;
|
exact?: boolean;
|
||||||
|
iconProp?: IconProp;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ServerRouteDefinition extends RouteDefinition {
|
interface ServerRouteDefinition extends RouteDefinition {
|
||||||
|
@ -73,72 +88,84 @@ export default {
|
||||||
name: 'Console',
|
name: 'Console',
|
||||||
component: ServerConsole,
|
component: ServerConsole,
|
||||||
exact: true,
|
exact: true,
|
||||||
|
iconProp: faTerminal,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/files',
|
path: '/files',
|
||||||
permission: 'file.*',
|
permission: 'file.*',
|
||||||
name: 'Files',
|
name: 'Files',
|
||||||
component: FileManagerContainer,
|
component: FileManagerContainer,
|
||||||
|
iconProp: faFolder,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/files/:action(edit|new)',
|
path: '/files/:action(edit|new)',
|
||||||
permission: 'file.*',
|
permission: 'file.*',
|
||||||
name: undefined,
|
name: undefined,
|
||||||
component: FileEditContainer,
|
component: FileEditContainer,
|
||||||
|
iconProp: faEdit,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/databases',
|
path: '/databases',
|
||||||
permission: 'database.*',
|
permission: 'database.*',
|
||||||
name: 'Databases',
|
name: 'Databases',
|
||||||
component: DatabasesContainer,
|
component: DatabasesContainer,
|
||||||
|
iconProp: faDatabase,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/schedules',
|
path: '/schedules',
|
||||||
permission: 'schedule.*',
|
permission: 'schedule.*',
|
||||||
name: 'Schedules',
|
name: 'Schedules',
|
||||||
component: ScheduleContainer,
|
component: ScheduleContainer,
|
||||||
|
iconProp: faClock,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/schedules/:id',
|
path: '/schedules/:id',
|
||||||
permission: 'schedule.*',
|
permission: 'schedule.*',
|
||||||
name: undefined,
|
name: undefined,
|
||||||
component: ScheduleEditContainer,
|
component: ScheduleEditContainer,
|
||||||
|
iconProp: faClock,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/users',
|
path: '/users',
|
||||||
permission: 'user.*',
|
permission: 'user.*',
|
||||||
name: 'Users',
|
name: 'Users',
|
||||||
component: UsersContainer,
|
component: UsersContainer,
|
||||||
|
iconProp: faUser,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/backups',
|
path: '/backups',
|
||||||
permission: 'backup.*',
|
permission: 'backup.*',
|
||||||
name: 'Backups',
|
name: 'Backups',
|
||||||
component: BackupContainer,
|
component: BackupContainer,
|
||||||
|
iconProp: faBackward,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/network',
|
path: '/network',
|
||||||
permission: 'allocation.*',
|
permission: 'allocation.*',
|
||||||
name: 'Network',
|
name: 'Network',
|
||||||
component: NetworkContainer,
|
component: NetworkContainer,
|
||||||
|
iconProp: faNetworkWired,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/startup',
|
path: '/startup',
|
||||||
permission: 'startup.*',
|
permission: 'startup.*',
|
||||||
name: 'Startup',
|
name: 'Startup',
|
||||||
component: StartupContainer,
|
component: StartupContainer,
|
||||||
|
iconProp: faPlayCircle,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/settings',
|
path: '/settings',
|
||||||
permission: ['settings.*', 'file.sftp'],
|
permission: ['settings.*', 'file.sftp'],
|
||||||
name: 'Settings',
|
name: 'Settings',
|
||||||
component: SettingsContainer,
|
component: SettingsContainer,
|
||||||
|
iconProp: faWheelchair,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/activity',
|
path: '/activity',
|
||||||
permission: 'activity.*',
|
permission: 'activity.*',
|
||||||
name: 'Activity',
|
name: 'Activity',
|
||||||
component: ServerActivityLogContainer,
|
component: ServerActivityLogContainer,
|
||||||
|
iconProp: faPaperclip,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
} as Routes;
|
} as Routes;
|
||||||
|
|
Loading…
Reference in New Issue