feat(ui): R3 S2 — loading rows for blank-flash pages, error paths for forever-loading ones

- Blank-flash (showed an empty state on first load before data): DownloadCenter (queue + library
  tabs), AdminUsers (roles + invites), ChatThread, PlaylistsRail now show a loading indicator
  (and an error+retry) instead of a false-empty flash — guarded on `&& !data` so live data isn't
  disturbed on refetch.
- Forever-loading (`isLoading || !data` loops forever on a failed fetch): ConfigPanel, the three
  PlexBrowse subviews (playlist/show/season), and Stats' admin dashboard get an `isError && !data`
  error+retry path before the loading branch.
- Playlists' detail pane already had an error path (isError+retry); its list lives in PlaylistsRail
  (now covered), so no change needed there.
This commit is contained in:
2026-07-22 04:24:38 +02:00
parent a393fd2fb1
commit bf96318dea
7 changed files with 92 additions and 20 deletions
+14 -3
View File
@@ -210,9 +210,20 @@ export default function PlaylistsRail({
title: t("playlists.listGroup"),
body: (
<>
{playlists.length === 0 && !listQuery.isLoading && (
<div className="text-xs text-muted px-1 py-1">{t("playlists.noneYet")}</div>
)}
{playlists.length === 0 &&
(listQuery.isError && !listQuery.data ? (
<button
type="button"
onClick={() => listQuery.refetch()}
className="text-xs text-red-400 px-1 py-1 text-left hover:underline"
>
{t("common.loadError")} — {t("common.retry")}
</button>
) : listQuery.isLoading ? (
<div className="text-xs text-muted px-1 py-1">{t("common.loading")}</div>
) : (
<div className="text-xs text-muted px-1 py-1">{t("playlists.noneYet")}</div>
))}
{playlists.length > 0 && visiblePlaylists.length === 0 && (
<div className="text-xs text-muted px-1 py-1">{t("playlists.noMatches")}</div>
)}