chore(downloads-ui): FE-C4 follow-up cleanup
- Delete dead top-level downloads.rename.* i18n block (en/hu/de); the metadata modal moved to downloads.edit.*. Keep downloads.actions.rename (still used by ProfileEditor). - Rename misnamed state renameJob/setRenameJob -> metaJob/setMetaJob in DownloadCenter (it opens MetaEditModal, not a rename dialog). - Extract the duplicated [downloads]/[download-index]/[download-usage] invalidation trio into lib/downloads.ts invalidateDownloads(qc); used by DownloadCenter and DownloadDialog. Behavior-neutral. tsc green, knip shows no new unused export, JSON valid.
This commit is contained in:
parent
94fd7ba9a6
commit
477056bfa8
6 changed files with 16 additions and 29 deletions
|
|
@ -3,6 +3,7 @@ import { useTranslation } from "react-i18next";
|
|||
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import Modal from "./Modal";
|
||||
import { api } from "../lib/api";
|
||||
import { invalidateDownloads } from "../lib/downloads";
|
||||
|
||||
// Lazy: the full profile editor only opens from the dialog's "manage presets" affordance.
|
||||
const ProfileEditor = lazy(() => import("./ProfileEditor"));
|
||||
|
|
@ -43,9 +44,7 @@ export default function DownloadDialog({
|
|||
profile_id: chosen,
|
||||
display_name: name.trim() || undefined,
|
||||
});
|
||||
qc.invalidateQueries({ queryKey: ["downloads"] });
|
||||
qc.invalidateQueries({ queryKey: ["download-index"] });
|
||||
qc.invalidateQueries({ queryKey: ["download-usage"] });
|
||||
invalidateDownloads(qc);
|
||||
notify({
|
||||
level: "success",
|
||||
message: t("downloads.dialog.added"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue