mirror of
https://github.com/stashapp/stash.git
synced 2026-03-26 07:01:54 +01:00
settings +local
This commit is contained in:
parent
d5a409090e
commit
69c84fec4e
2 changed files with 19 additions and 2 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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.",
|
||||
|
|
|
|||
Loading…
Reference in a new issue