fix: logins now refresh on plugins load
feat: Added tar archive support fix: Downloaded games and emulator execute permission now updated fix: Fixed rclone for linux fix: on screen keyaboard only now shows up when using a gamepad or touch
This commit is contained in:
parent
6aacec2c0d
commit
7bd0ebdcca
39 changed files with 523 additions and 275 deletions
|
|
@ -2,6 +2,7 @@ import { mutationOptions, queryOptions } from "@tanstack/react-query";
|
|||
import { getErrorMessage } from "react-error-boundary";
|
||||
import toast from "react-hot-toast";
|
||||
import { rommApi, settingsApi } from "../clientApi";
|
||||
import { invalidateLogin } from "./romm";
|
||||
|
||||
export const changeDownloadsMutation = mutationOptions({
|
||||
mutationKey: ["setting", "downloads"],
|
||||
|
|
@ -29,21 +30,25 @@ export const autoEmulatorsQuery = queryOptions({
|
|||
}
|
||||
});
|
||||
export const twitchLogoutMutation = mutationOptions({
|
||||
mutationKey: ['twitch', 'logout'],
|
||||
mutationKey: ['twitch', 'auth', 'logout'],
|
||||
mutationFn: () =>
|
||||
{
|
||||
return rommApi.api.romm.logout.twitch.post();
|
||||
}
|
||||
});
|
||||
export const twitchLoginMutation = mutationOptions({
|
||||
mutationKey: ['twitch', 'login'],
|
||||
mutationKey: ['twitch', 'auth', 'login'],
|
||||
mutationFn: (openInBrowser: boolean) =>
|
||||
{
|
||||
return rommApi.api.romm.login.twitch.post({ openInBrowser });
|
||||
}
|
||||
},
|
||||
onSuccess (data, variables, onMutateResult, context)
|
||||
{
|
||||
invalidateLogin(context.client);
|
||||
},
|
||||
});
|
||||
export const twitchLoginVerificationQuery = queryOptions({
|
||||
queryKey: ['twitch', 'login', 'status'],
|
||||
queryKey: ['twitch', 'login', 'status', 'auth'],
|
||||
retry (failureCount, error)
|
||||
{
|
||||
if ((error as any).status === 404)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue