Split warning message and add warning icon

This commit is contained in:
WithoutPants 2026-03-23 16:07:47 +11:00
parent 69c84fec4e
commit 28c2b564ef
2 changed files with 20 additions and 8 deletions

View file

@ -1,7 +1,8 @@
import React from "react";
import { useIntl } from "react-intl";
import { FormattedMessage, useIntl } from "react-intl";
import { faExclamationTriangle } from "@fortawesome/free-solid-svg-icons";
import { ModalComponent } from "./Modal";
import { Icon } from "./Icon";
interface IAutoTagConfirmDialog {
show: boolean;
@ -9,6 +10,21 @@ interface IAutoTagConfirmDialog {
onCancel: () => void;
}
export const AutoTagWarning = () => (
<>
<p>
<FormattedMessage id="config.tasks.auto_tag_based_on_filenames" />
</p>
<p>
<FormattedMessage id="config.tasks.auto_tag_confirm" />
</p>
<p className="lead">
<Icon icon={faExclamationTriangle} className="text-warning" />
<FormattedMessage id="config.tasks.auto_tag_warning" />
</p>
</>
);
export const AutoTagConfirmDialog: React.FC<IAutoTagConfirmDialog> = ({
show,
onConfirm,
@ -30,12 +46,7 @@ export const AutoTagConfirmDialog: React.FC<IAutoTagConfirmDialog> = ({
onClick: onCancel,
}}
>
<p>
{intl.formatMessage({
id: "config.tasks.auto_tag_based_on_filenames",
})}
</p>
<p>{intl.formatMessage({ id: "config.tasks.auto_tag_confirm" })}</p>
<AutoTagWarning />
</ModalComponent>
);
};

View file

@ -512,7 +512,8 @@
"auto_tagging_paths": "Auto tagging the following paths"
},
"auto_tag_based_on_filenames": "Auto tag content based on file paths.",
"auto_tag_confirm": "This will attempt to match your content against existing metadata. This process cannot be undone and may produce incorrect matches. Are you sure you want to continue?",
"auto_tag_confirm": "This will attempt to match your content against existing metadata.",
"auto_tag_warning": "This process cannot be undone and may produce incorrect matches.",
"auto_tagging": "Auto tagging",
"backing_up_database": "Backing up database",
"backup_and_download": "Performs a backup of the database and downloads the resulting file.",