From db377380a03fdfde82caaac13c669dbc76262699 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Mon, 9 Nov 2026 00:05:39 +1100 Subject: [PATCH] perf(ui): load route pages on demand --- ui/src/router/index.ts | 60 +++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/ui/src/router/index.ts b/ui/src/router/index.ts index c654478b4..fcb6461b7 100644 --- a/ui/src/router/index.ts +++ b/ui/src/router/index.ts @@ -1,36 +1,36 @@ import { createRouter, createWebHistory, type RouteLocationGeneric } from "vue-router"; -import ChannelsPage from "@/channels/ChannelsPage.vue"; -import CuratorsPage from "@/curators/CuratorsPage.vue"; +const ChannelsPage = () => import("@/channels/ChannelsPage.vue"); +const CuratorsPage = () => import("@/curators/CuratorsPage.vue"); import DashboardPage from "@/dashboard/DashboardPage.vue"; -import EventsPage from "@/events/EventsPage.vue"; -import LogsPage from "@/logs/LogsPage.vue"; -import AuditPage from "@/audit/AuditPage.vue"; -import DenialsPage from "@/audit/DenialsPage.vue"; -import OrgShell from "@/org/OrgShell.vue"; -import OrgOverviewPage from "@/org/OrgOverviewPage.vue"; -import OrgMembersPage from "@/org/OrgMembersPage.vue"; -import OrgAgentsPage from "@/org/OrgAgentsPage.vue"; -import OrgWorkspacesPage from "@/org/OrgWorkspacesPage.vue"; -import OrgAccessPage from "@/org/OrgAccessPage.vue"; -import OrgModelsPage from "@/org/OrgModelsPage.vue"; -import SchedulingPolicyPage from "@/settings/SchedulingPolicyPage.vue"; -import ToolsPage from "@/settings/ToolsPage.vue"; -import InstructionsPage from "@/settings/InstructionsPage.vue"; -import ExtensionsPage from "@/settings/ExtensionsPage.vue"; -import PluginsPage from "@/settings/PluginsPage.vue"; -import SecretEnginesPage from "@/settings/SecretEnginesPage.vue"; -import ContainerRuntimePage from "@/settings/ContainerRuntimePage.vue"; -import ConnectionsPage from "@/settings/ConnectionsPage.vue"; -import SystemAppearancePage from "@/settings/SystemAppearancePage.vue"; -import SystemModelsPage from "@/settings/SystemModelsPage.vue"; -import SystemReposPage from "@/settings/SystemReposPage.vue"; -import SystemStatusPage from "@/settings/SystemStatusPage.vue"; -import SystemTasksPage from "@/settings/SystemTasksPage.vue"; -import SkillsPage from "@/skills/SkillsPage.vue"; -import TaskDetailPage from "@/tasks/TaskDetailPage.vue"; -import TasksPage from "@/tasks/TasksPage.vue"; -import WorkflowsPage from "@/workflows/WorkflowsPage.vue"; +const EventsPage = () => import("@/events/EventsPage.vue"); +const LogsPage = () => import("@/logs/LogsPage.vue"); +const AuditPage = () => import("@/audit/AuditPage.vue"); +const DenialsPage = () => import("@/audit/DenialsPage.vue"); +const OrgShell = () => import("@/org/OrgShell.vue"); +const OrgOverviewPage = () => import("@/org/OrgOverviewPage.vue"); +const OrgMembersPage = () => import("@/org/OrgMembersPage.vue"); +const OrgAgentsPage = () => import("@/org/OrgAgentsPage.vue"); +const OrgWorkspacesPage = () => import("@/org/OrgWorkspacesPage.vue"); +const OrgAccessPage = () => import("@/org/OrgAccessPage.vue"); +const OrgModelsPage = () => import("@/org/OrgModelsPage.vue"); +const SchedulingPolicyPage = () => import("@/settings/SchedulingPolicyPage.vue"); +const ToolsPage = () => import("@/settings/ToolsPage.vue"); +const InstructionsPage = () => import("@/settings/InstructionsPage.vue"); +const ExtensionsPage = () => import("@/settings/ExtensionsPage.vue"); +const PluginsPage = () => import("@/settings/PluginsPage.vue"); +const SecretEnginesPage = () => import("@/settings/SecretEnginesPage.vue"); +const ContainerRuntimePage = () => import("@/settings/ContainerRuntimePage.vue"); +const ConnectionsPage = () => import("@/settings/ConnectionsPage.vue"); +const SystemAppearancePage = () => import("@/settings/SystemAppearancePage.vue"); +const SystemModelsPage = () => import("@/settings/SystemModelsPage.vue"); +const SystemReposPage = () => import("@/settings/SystemReposPage.vue"); +const SystemStatusPage = () => import("@/settings/SystemStatusPage.vue"); +const SystemTasksPage = () => import("@/settings/SystemTasksPage.vue"); +const SkillsPage = () => import("@/skills/SkillsPage.vue"); +const TaskDetailPage = () => import("@/tasks/TaskDetailPage.vue"); +const TasksPage = () => import("@/tasks/TasksPage.vue"); +const WorkflowsPage = () => import("@/workflows/WorkflowsPage.vue"); // internal/gateway/dashboard_tools.go mirrors this table. //