Routes

Customise the server & dashboard navigation links on all layouts.

Adding Server Routes

routes.ts
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:

  1. nestId: (Single Nest) - Example; nestId: [1],

  2. eggId: (Single Egg) - Example; eggId: [1],

  3. nestIds: (Multiple Nest) - Example; nestIds: [1,2,3],

  4. eggIds: (Multiple Egg) - Example; eggIds: [1,2,3],

routes.ts
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;

routes.php
<?php

return [
    'account' => [],
    'server' => [
        // ...
        'plugin-manager' => 'Plugin Manager', // Add String here
    ],
];

In /resources/scripts/routers/routes.ts

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?