settings +local

This commit is contained in:
Gykes 2026-03-22 15:55:15 -07:00
parent d5a409090e
commit 69c84fec4e
2 changed files with 19 additions and 2 deletions

View file

@ -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 (
<AutoTagConfirmDialog
show={dialogOpen.autoTagAlert}
onConfirm={() => {
setDialogOpen({ autoTagAlert: false });
runAutoTag();
}}
onCancel={() => setDialogOpen({ autoTagAlert: false })}
/>
);
}
function renderAutoTagDialog() {
if (!dialogOpen.autoTag) {
return;
@ -341,6 +356,7 @@ export const LibraryTasks: React.FC = () => {
return (
<Form.Group>
{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 })}
>
<FormattedMessage id="actions.auto_tag" />
<FormattedMessage id="actions.auto_tag" />
</Button>
<Button
variant="secondary"

View file

@ -512,6 +512,7 @@
"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_tagging": "Auto tagging",
"backing_up_database": "Backing up database",
"backup_and_download": "Performs a backup of the database and downloads the resulting file.",