feat(web): distill shell rail
This commit is contained in:
+6
-16
@@ -325,7 +325,7 @@ function main() {
|
||||
library.open();
|
||||
await movieDetail.open(
|
||||
route.movieId,
|
||||
must<HTMLElement>("#nav-library"),
|
||||
must<HTMLElement>("#wordmark"),
|
||||
must<HTMLElement>("#library"),
|
||||
{
|
||||
kind: "library",
|
||||
@@ -350,7 +350,7 @@ function main() {
|
||||
library.open();
|
||||
await seriesDetail.open(
|
||||
route.seriesId,
|
||||
must<HTMLElement>("#nav-library"),
|
||||
must<HTMLElement>("#wordmark"),
|
||||
must<HTMLElement>("#library"),
|
||||
{
|
||||
kind: "library",
|
||||
@@ -396,7 +396,7 @@ function main() {
|
||||
library.open();
|
||||
await seriesDetail.open(
|
||||
seriesId,
|
||||
must<HTMLElement>("#nav-library"),
|
||||
must<HTMLElement>("#wordmark"),
|
||||
must<HTMLElement>("#library"),
|
||||
{ kind: "library" },
|
||||
);
|
||||
@@ -407,7 +407,7 @@ function main() {
|
||||
sub,
|
||||
seriesId,
|
||||
target,
|
||||
origin: must<HTMLElement>("#nav-library"),
|
||||
origin: must<HTMLElement>("#wordmark"),
|
||||
returnTo: must<HTMLElement>("#series"),
|
||||
parentRoute: { kind: "series", seriesId },
|
||||
});
|
||||
@@ -2532,7 +2532,6 @@ function libraryMain(
|
||||
): LibraryView {
|
||||
const view = must<HTMLElement>("#library");
|
||||
const deck = must<HTMLElement>("#deck");
|
||||
const nav = must<HTMLButtonElement>("#nav-library");
|
||||
const summary = must<HTMLElement>("#library-summary");
|
||||
const toggle = must<HTMLButtonElement>("#library-toggle");
|
||||
const status = must<HTMLElement>("#library-status");
|
||||
@@ -2677,25 +2676,14 @@ function libraryMain(
|
||||
}
|
||||
deck.hidden = true;
|
||||
view.hidden = false;
|
||||
nav.setAttribute("aria-pressed", "true");
|
||||
void load();
|
||||
}
|
||||
|
||||
function hide() {
|
||||
view.hidden = true;
|
||||
nav.setAttribute("aria-pressed", "false");
|
||||
sequence += 1;
|
||||
}
|
||||
|
||||
// §9.7: the library is the homepage — the bottom layer. There is nothing
|
||||
// beneath it, so the nav control never toggles off and Esc has no handler.
|
||||
nav.addEventListener("click", () => {
|
||||
if (view.hidden) {
|
||||
navigate({ kind: "library" });
|
||||
open();
|
||||
}
|
||||
});
|
||||
|
||||
toggle.addEventListener("click", () => {
|
||||
showAll = !showAll;
|
||||
render();
|
||||
@@ -4128,6 +4116,7 @@ function queuesMain(movieDetail: MovieView, views: HideableView[], goHome: () =>
|
||||
const view = must<HTMLElement>("#queues");
|
||||
const deck = must<HTMLElement>("#deck");
|
||||
const nav = must<HTMLButtonElement>("#nav-queues");
|
||||
nav.prepend(icon("warning"));
|
||||
const badge = must<HTMLElement>("#queues-count");
|
||||
const summary = must<HTMLElement>("#queues-summary");
|
||||
const status = must<HTMLElement>("#queues-status");
|
||||
@@ -4167,6 +4156,7 @@ function queuesMain(movieDetail: MovieView, views: HideableView[], goHome: () =>
|
||||
}
|
||||
|
||||
function paintBadge(total: number) {
|
||||
nav.hidden = total === 0;
|
||||
badge.hidden = total === 0;
|
||||
badge.textContent = total === 0 ? "" : String(total);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user