- The Downloads module, its rail icon and badge are gone. A bookmark, the remembered page and an old
history entry that name it land on Files (urlState.resolvePage); `g d` goes to Files too.
- Users page: a Storage tab — the disk in numbers, every user's use against their own limit with
their file count, every user's downloads; aligned tables, one menu per row (edit / reset quota,
open source, copy, the owner's quota). The admin storage rows carry quota + file count, the admin
job list its owner.
- Settings: a Downloads tab — the download formats in one list (duplicate a built-in, edit or delete
your own) and the site sign-ins, moved from Account.
- "View" on an added download, a clip or a converting upload opens the tray on that row (unfolded,
back if closed; a finished one opens as a file; under a player it opens without taking focus).
- The download dialog opens on the format used last.
- DataTable: `pager={false}` for a short list, `cardRow` to give a lone "…" its own card line.
- Welcome and README speak of Files; a new Files screenshot.
28 lines
1.2 KiB
TypeScript
28 lines
1.2 KiB
TypeScript
import type { Page } from "./urlState";
|
|
|
|
// Page links: a page's own address, and whether a click on one is the app's to handle.
|
|
|
|
/** A page's own address, for a link to it (the nav rail's rows). Only the page: the rest of a page's
|
|
* state — the feed's filters, Plex's library — a fresh tab restores from the account's own storage,
|
|
* as a bookmark would; the CURRENT page's params would be the wrong page's state. */
|
|
export function pageHref(p: Page): string {
|
|
return `/?page=${p}`;
|
|
}
|
|
|
|
/** Should this click be handled IN-APP, or left to the browser?
|
|
*
|
|
* An anchor that ALSO navigates in-app has to keep the browser's own gestures working — Ctrl/Cmd-click
|
|
* and Shift-click open a tab/window, and middle-click arrives as `auxclick` and never reaches React's
|
|
* `onClick` at all (the `button !== 0` arm is belt-and-braces for synthetic events). Otherwise the
|
|
* thing looks like a link and behaves like a button, which is what the channel name in the player did.
|
|
* One predicate, so a second such link cannot forget an arm. */
|
|
export function isPlainLeftClick(e: {
|
|
metaKey: boolean;
|
|
ctrlKey: boolean;
|
|
shiftKey: boolean;
|
|
altKey: boolean;
|
|
button: number;
|
|
}): boolean {
|
|
return !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey && e.button === 0;
|
|
}
|