mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-10-08 14:05:02 -04:00
perf(webui): inline the default home route
This commit is contained in:
2 files changed
+4
-1
No files matched your search
@@ -3,6 +3,7 @@
|
||||
import { page } from "$app/state";
|
||||
import { auth, onboarding, type OnboardingState, type Session } from "$lib/api";
|
||||
import { liveUpdates } from "$lib/live-updates.svelte";
|
||||
import HomeView from "$lib/components/HomeView.svelte";
|
||||
import SegmentedNav from "$lib/components/SegmentedNav.svelte";
|
||||
|
||||
const destinations = [
|
||||
@@ -101,7 +102,7 @@
|
||||
}
|
||||
|
||||
function viewLoader(path: string) {
|
||||
if (path === "/") return import("$lib/components/HomeView.svelte");
|
||||
if (path === "/") return Promise.resolve({ default: HomeView });
|
||||
if (path === "/library/playlists") return import("$lib/components/PlaylistsView.svelte");
|
||||
if (path === "/library/mappings") return import("$lib/components/MappingView.svelte");
|
||||
if (path === "/library/cached" || path === "/library/kept") {
|
||||
|
||||
@@ -493,6 +493,8 @@ test("Home stays inside runtime and request budgets", async ({ page }) => {
|
||||
await mockApi(page);
|
||||
await page.goto("#/");
|
||||
await expect(page.getByLabel("Loading Home")).toBeHidden();
|
||||
await expect(page.getByText("Managed", { exact: true })).toBeVisible();
|
||||
await expect(page.getByText("Unmanaged", { exact: true })).toBeVisible();
|
||||
|
||||
const apiRequests = requests.filter((path) => path.startsWith("/api/admin/"));
|
||||
const jsRequests = requests.filter((path) => path.endsWith(".js"));
|
||||
|
||||
Reference in new issue
Block a user