aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/admin
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/components/admin')
-rw-r--r--apps/web/components/admin/AdminActions.tsx22
1 files changed, 22 insertions, 0 deletions
diff --git a/apps/web/components/admin/AdminActions.tsx b/apps/web/components/admin/AdminActions.tsx
index 34b3d63a..fb151ac8 100644
--- a/apps/web/components/admin/AdminActions.tsx
+++ b/apps/web/components/admin/AdminActions.tsx
@@ -37,6 +37,21 @@ export default function AdminActions() {
},
});
+ const { mutate: reprocessAssetsFixMode, isPending: isReprocessingPending } =
+ api.admin.reprocessAssetsFixMode.useMutation({
+ onSuccess: () => {
+ toast({
+ description: "Reprocessing enqueued",
+ });
+ },
+ onError: (e) => {
+ toast({
+ variant: "destructive",
+ description: e.message,
+ });
+ },
+ });
+
const {
mutate: reRunInferenceOnAllBookmarks,
isPending: isInferencePending,
@@ -126,6 +141,13 @@ export default function AdminActions() {
</ActionButton>
<ActionButton
variant="destructive"
+ loading={isReprocessingPending}
+ onClick={() => reprocessAssetsFixMode()}
+ >
+ {t("admin.actions.reprocess_assets_fix_mode")}
+ </ActionButton>
+ <ActionButton
+ variant="destructive"
loading={isTidyAssetsPending}
onClick={() => tidyAssets()}
>