diff --git a/frontend/src/components/Playlists.tsx b/frontend/src/components/Playlists.tsx index f472f118..626ddee2 100644 --- a/frontend/src/components/Playlists.tsx +++ b/frontend/src/components/Playlists.tsx @@ -492,6 +492,23 @@ export default function Playlists() { // every render re-subscribed those listeners and re-ran focusModal() under the open player. const closePlayer = useCallback(() => setPlayingId(null), []); + // Name the current view in the user's terms: "Title ↑", "grouped by channel", or both. + const sortLabel = viewSort && !isStoredSort(viewSort) + ? `${columns.find((c) => c.key === viewSort.key)?.header ?? viewSort.key} ${ + viewSort.dir === "asc" ? "↑" : "↓" + }` + : null; + const viewName = groupBy + ? sortLabel + ? t("playlists.viewGroupedAnd", { sort: sortLabel }) + : t("playlists.viewGrouped") + : (sortLabel ?? ""); + const viewStatus = filterActive + ? t("playlists.viewFiltered", { shown: shown.length, total: items.length }) + : canSaveOrder + ? t("playlists.viewDiffers", { view: viewName }) + : t("playlists.viewMatches", { view: viewName }); + // Order matters: a built-in list is never reorderable, whatever the view says. const dragHint = !canEdit ? t("playlists.dragBlockedBuiltin") @@ -670,19 +687,19 @@ export default function Playlists() { {canSaveOrder && ( )} - {canSaveOrder && ( - - {t("playlists.saveOrderHint")} - - )} + {/* ONE sentence that names the state. Three loose texts used to pile up here (reset + link + save hint + "reordering is off"), and none of them answered the question a + user actually has — "did I just change my playlist?". Worse, sorting a list whose + stored order ALREADY matches the sort produced a warning, no Save button and no + visible change, which reads as a malfunction. Now the line says which of the three + situations you are in; the disabled grip still explains itself on hover/focus. */} {viewActive && ( - {dragHint} + {viewStatus} )} {canEdit && (
diff --git a/frontend/src/i18n/locales/en/playlists.json b/frontend/src/i18n/locales/en/playlists.json index 675e2320..d10d8771 100644 --- a/frontend/src/i18n/locales/en/playlists.json +++ b/frontend/src/i18n/locales/en/playlists.json @@ -65,7 +65,6 @@ "dragBlockedFilter": "Reordering by hand is off while a filter is applied.", "clearView": "Reset view", "saveOrder": "Save this order", - "saveOrderHint": "Store the order you see as the playlist's own order (undoable).", "filteredCount": "{{count}} shown", "noneMatchFilter": "No videos match the filter.", "loadFailed": "Couldn't load this playlist.", @@ -79,5 +78,10 @@ "dndPickedUp": "Picked up “{{title}}”, position {{pos}} of {{total}}.", "dndMovedOver": "“{{title}}” moved to position {{pos}} of {{total}}.", "dndDropped": "“{{title}}” dropped at position {{pos}} of {{total}}.", - "dndCancelled": "Move cancelled; “{{title}}” is back at position {{pos}}." + "dndCancelled": "Move cancelled; “{{title}}” is back at position {{pos}}.", + "viewGrouped": "grouped by channel", + "viewGroupedAnd": "grouped by channel, {{sort}}", + "viewDiffers": "Temporary view ({{view}}) — the playlist's saved order is unchanged. Save it to keep this order.", + "viewMatches": "This view ({{view}}) already matches the playlist's saved order, so there is nothing to save.", + "viewFiltered": "Filtered view — {{shown}} of {{total}} shown. The order can't be saved while a filter is on." } diff --git a/frontend/src/i18n/locales/hu/playlists.json b/frontend/src/i18n/locales/hu/playlists.json index 6064a4cf..3048f09f 100644 --- a/frontend/src/i18n/locales/hu/playlists.json +++ b/frontend/src/i18n/locales/hu/playlists.json @@ -65,7 +65,6 @@ "dragBlockedFilter": "A kézi átrendezés ki van kapcsolva, amíg szűrő van érvényben.", "clearView": "Nézet visszaállítása", "saveOrder": "Sorrend mentése", - "saveOrderHint": "A látott sorrend legyen a lista saját sorrendje (visszavonható).", "filteredCount": "{{count}} látszik", "noneMatchFilter": "Egy videó sem felel meg a szűrőnek.", "loadFailed": "Nem sikerült betölteni ezt a listát.", @@ -79,5 +78,10 @@ "dndPickedUp": "„{{title}}” felvéve, {{pos}}. a(z) {{total}} közül.", "dndMovedOver": "„{{title}}” a(z) {{pos}}. helyre került a(z) {{total}} közül.", "dndDropped": "„{{title}}” letéve a(z) {{pos}}. helyre a(z) {{total}} közül.", - "dndCancelled": "Mozgatás megszakítva; „{{title}}” visszakerült a(z) {{pos}}. helyre." + "dndCancelled": "Mozgatás megszakítva; „{{title}}” visszakerült a(z) {{pos}}. helyre.", + "viewGrouped": "csatorna szerint csoportosítva", + "viewGroupedAnd": "csatorna szerint csoportosítva, {{sort}}", + "viewDiffers": "Ideiglenes nézet ({{view}}) — a lista mentett sorrendje változatlan. Mentsd, ha ez maradjon.", + "viewMatches": "Ez a nézet ({{view}}) megegyezik a lista mentett sorrendjével, így nincs mit menteni.", + "viewFiltered": "Szűrt nézet — {{total}} elemből {{shown}} látszik. Szűrés közben a sorrend nem menthető." }