Settings, Configuration and Users name their tab (stab/cfgtab/utab); a link's tab wins and a tab pre-selected while its page is on screen now switches it. A playlist's sort, filters and grouping (plsort/plf/plgroup), the Files sort (fsort, always written) and the name searches of Channels, Files, Playlists and Plex (cq/fq/plq/pq+pqf) reopen from the address; the searches are written once the typing pauses.
23 lines
915 B
TypeScript
23 lines
915 B
TypeScript
import { Clapperboard } from "lucide-react";
|
|
import { lazyWithPreload, lazyWithPreloadAlongside } from "../../lib/lazyWithPreload";
|
|
import type { ModuleDef } from "../../lib/moduleDef";
|
|
import { PLEX_KEYS, PLEX_SEARCH_KEYS, PLEX_SUB_KEY } from "../../lib/plexUrlState";
|
|
import { PlexStore } from "./PlexStore";
|
|
|
|
// The rail loads with the page (lazyWithPreloadAlongside), so it never arrives after it.
|
|
const Rail = lazyWithPreload(() => import("./PlexSidebar"));
|
|
|
|
// This page as the shell and the navigation know it (lib/moduleDef). Its page and rail load lazily.
|
|
export const plexModule: ModuleDef = {
|
|
id: "plex",
|
|
labelKey: "plex.navLabel",
|
|
railKey: "nav.rail.plex",
|
|
icon: Clapperboard,
|
|
gate: (me) => me.plex_enabled,
|
|
Rail,
|
|
Page: lazyWithPreloadAlongside(() => import("./PlexBrowse"), Rail),
|
|
maxWidth: "100rem",
|
|
Store: PlexStore,
|
|
urlKeys: [...PLEX_KEYS, ...PLEX_SEARCH_KEYS, PLEX_SUB_KEY],
|
|
};
|