Routes
Customise the server & dashboard navigation links on all layouts.
Adding Server Routes
import { SaveIcon } from '@heroicons/react/solid' // Import Icon from heroicons
import PluginManagerContainer from '@/components/server/plugins/PluginManagerContainer';
export default {
account: [],
server: {
control: [],
management: [
{
path: '/minecraft/plugins',
permission: 'file.*',
name: 'Plugin Manager',
component: PluginManagerContainer,
icon: SaveIcon, // Define Icon
},
],
administration: [],
},
}
Icon Property: You may use any icon package of your choice. Reviactyl currently uses @heroicons/react/solid
for UI.
Show Route per Egg / Nest.
Properties:
nestId: (Single Nest) - Example;
nestId: [1],
eggId: (Single Egg) - Example;
eggId: [1],
nestIds: (Multiple Nest) - Example;
nestIds: [1,2,3],
eggIds: (Multiple Egg) - Example;
eggIds: [1,2,3],
export default {
account: [],
server: {
control: [],
management: [
{
path: '/minecraft/plugins',
permission: 'file.*',
name: 'Plugin Manager',
component: PluginManagerContainer,
icon: SaveIcon, // Define Icon
},
],
administration: [],
},
}
Translating Route Name
In /resources/lang/<lang>/routes.php
add a string in respective category;
<?php
return [
'account' => [],
'server' => [
// ...
'plugin-manager' => 'Plugin Manager', // Add String here
],
];
In /resources/scripts/routers/routes.ts
export default {
account: [],
server: {
control: [],
management: [
{
path: '/minecraft/plugins',
permission: 'file.*',
name: 'server.plugin-manager', // Replace name with the key
component: PluginManagerContainer,
icon: SaveIcon,
},
],
administration: [],
},
}
Last updated
Was this helpful?