mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-13 14:32:03 +00:00
Merge branch 'fix/v14311-settings' into release/v1.43.11
# Conflicts: # messages/de.json # messages/en.json # messages/es.json # messages/fr.json # messages/it.json # messages/ko.json # messages/nl.json # messages/pl.json
This commit is contained in:
commit
eabfeaef08
74 files changed
+2545
-436
No files matched your search
@@ -15,6 +15,7 @@
|
||||
|
||||
import { useState, type ReactNode } from "react";
|
||||
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||
import { toastWrittenOutcome } from "@/components/outcome/outcome-toast";
|
||||
import {
|
||||
Activity,
|
||||
ArrowRight,
|
||||
@@ -34,6 +35,7 @@ import {
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { apiPost } from "@/lib/api/api-fetch";
|
||||
import { showErrorToast } from "@/lib/errors/error-toast";
|
||||
import { useTranslations } from "@/lib/i18n/context";
|
||||
import type { IntegrationCallbackUrls } from "@/lib/integrations/callback-urls";
|
||||
import { loadDocument } from "@/lib/navigation/load-document";
|
||||
@@ -311,7 +313,20 @@ export function OAuthIntegrationCardView({
|
||||
mutationFn: async () => {
|
||||
await apiPost(`/api/${provider}/disconnect`);
|
||||
},
|
||||
onSuccess: invalidateStatus,
|
||||
onSuccess: () => {
|
||||
invalidateStatus();
|
||||
toastWrittenOutcome(
|
||||
"success",
|
||||
t("settings.integrationDisconnected", { provider: providerName }),
|
||||
);
|
||||
},
|
||||
// The confirmation dialog has closed by now; without this a refused
|
||||
// disconnect left the card connected and said nothing.
|
||||
onError: (failure) =>
|
||||
showErrorToast(
|
||||
t("settings.integrationDisconnectFailed", { provider: providerName }),
|
||||
{ cause: failure },
|
||||
),
|
||||
});
|
||||
|
||||
const resume = useMutation({
|
||||
|
||||
Reference in new issue
Block a user