mirror of
https://github.com/stashapp/stash.git
synced 2026-01-30 12:02:55 +01:00
Fix UI config mutation not working (#4533)
This commit is contained in:
parent
a16f3da33e
commit
79e72ff3bc
3 changed files with 5 additions and 3 deletions
|
|
@ -22,5 +22,5 @@ extend input SetDefaultFilterInput {
|
|||
}
|
||||
|
||||
extend type Mutation {
|
||||
configureUI(input: UIConfig!): UIConfig!
|
||||
configureUI(input: Map!): UIConfig!
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ mutation ConfigureDefaults($input: ConfigDefaultSettingsInput!) {
|
|||
}
|
||||
}
|
||||
|
||||
mutation ConfigureUI($input: UIConfig!) {
|
||||
mutation ConfigureUI($input: Map!) {
|
||||
configureUI(input: $input)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -423,13 +423,15 @@ export const SettingsContext: React.FC = ({ children }) => {
|
|||
});
|
||||
}
|
||||
|
||||
type UIConfigInput = GQL.Scalars["Map"]["input"];
|
||||
|
||||
// saves the configuration if no further changes are made after a half second
|
||||
const saveUIConfig = useDebounce(async (input: IUIConfig) => {
|
||||
try {
|
||||
setUpdateSuccess(undefined);
|
||||
await updateUIConfig({
|
||||
variables: {
|
||||
input,
|
||||
input: input as UIConfigInput,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue