-
-
Notifications
You must be signed in to change notification settings - Fork 840
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Persist tagger settings and change defaults (#5165)
* Persist tagger settings in UIConfig * Show males and set tags by default * Add release note
- Loading branch information
1 parent
c74456c
commit b1b223c
Showing
8 changed files
with
42 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { useCallback, useContext } from "react"; | ||
import { ConfigurationContext } from "src/hooks/Config"; | ||
import { initialConfig, ITaggerConfig } from "./constants"; | ||
import { useConfigureUISetting } from "src/core/StashService"; | ||
|
||
export function useTaggerConfig() { | ||
const { configuration: stashConfig } = useContext(ConfigurationContext); | ||
const [saveUISetting] = useConfigureUISetting(); | ||
|
||
const config = stashConfig?.ui.taggerConfig ?? initialConfig; | ||
|
||
const setConfig = useCallback( | ||
(c: ITaggerConfig) => { | ||
saveUISetting({ variables: { key: "taggerConfig", value: c } }); | ||
}, | ||
[saveUISetting] | ||
); | ||
|
||
return { config, setConfig }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Tagger settings have been reset, but are now persisted between browser sessions. `Show male performers` and `Set Tags` are now defaulted to true. Please verify your settings before using the Tagger. |