diff --git a/ui/v2.5/src/components/Settings/Tasks/LibraryTasks.tsx b/ui/v2.5/src/components/Settings/Tasks/LibraryTasks.tsx index 6e9c13ea4..6f977d821 100644 --- a/ui/v2.5/src/components/Settings/Tasks/LibraryTasks.tsx +++ b/ui/v2.5/src/components/Settings/Tasks/LibraryTasks.tsx @@ -19,6 +19,7 @@ import { BooleanSetting, Setting, SettingGroup } from "../Inputs"; import { ManualLink } from "src/components/Help/context"; import { Icon } from "src/components/Shared/Icon"; import { faQuestionCircle } from "@fortawesome/free-solid-svg-icons"; +import { AutoTagConfirmDialog } from "src/components/Shared/AutoTagConfirmDialog"; import { useSettings } from "../context"; interface IAutoTagOptions { @@ -78,6 +79,7 @@ export const LibraryTasks: React.FC = () => { const [dialogOpen, setDialogOpenState] = useState({ scan: false, autoTag: false, + autoTagAlert: false, identify: false, generate: false, }); @@ -224,6 +226,19 @@ export const LibraryTasks: React.FC = () => { } } + function renderAutoTagAlert() { + return ( + { + setDialogOpen({ autoTagAlert: false }); + runAutoTag(); + }} + onCancel={() => setDialogOpen({ autoTagAlert: false })} + /> + ); + } + function renderAutoTagDialog() { if (!dialogOpen.autoTag) { return; @@ -341,6 +356,7 @@ export const LibraryTasks: React.FC = () => { return ( {renderScanDialog()} + {renderAutoTagAlert()} {renderAutoTagDialog()} {maybeRenderIdentifyDialog()} {renderGenerateDialog()} @@ -426,9 +442,9 @@ export const LibraryTasks: React.FC = () => { variant="secondary" type="submit" className="mr-2" - onClick={() => runAutoTag()} + onClick={() => setDialogOpen({ autoTagAlert: true })} > - +