Add RouteButton
This commit is contained in:
parent
5a944f9916
commit
a0d186da3a
2 changed files with 40 additions and 2 deletions
|
@ -1,16 +1,21 @@
|
|||
import {createRouter, createWebHistory, type LocationQueryRaw, type RouteLocationRaw} from "vue-router";
|
||||
import {createRouter, createWebHistory, type LocationQueryRaw} from "vue-router";
|
||||
import AdminDashboardView from "@/views/AdminDashboardView.vue";
|
||||
import AdminNodesView from "@/views/AdminNodesView.vue";
|
||||
import HomeView from "@/views/HomeView.vue";
|
||||
import {isNodesFilter, isNodeSortField, isSortDirection, type SearchTerm} from "@/types";
|
||||
|
||||
export interface Route {
|
||||
name: RouteName;
|
||||
query?: LocationQueryRaw;
|
||||
}
|
||||
|
||||
export enum RouteName {
|
||||
HOME = "home",
|
||||
ADMIN = "admin",
|
||||
ADMIN_NODES = "admin-nodes",
|
||||
}
|
||||
|
||||
export function route(name: RouteName, query?: LocationQueryRaw): RouteLocationRaw {
|
||||
export function route(name: RouteName, query?: LocationQueryRaw): Route {
|
||||
return {
|
||||
name,
|
||||
query,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue