Compare commits
No commits in common. "78457a7d271553a307c1b4a42c9273df3d582937" and "059bbe956a303b56e60705589954f894f9e4b5b4" have entirely different histories.
78457a7d27
...
059bbe956a
2 changed files with 0 additions and 17 deletions
|
|
@ -791,9 +791,6 @@ export function useConnections() {
|
||||||
knowledgePreferences?: import('../api/connectionApi').KnowledgePreferences | null,
|
knowledgePreferences?: import('../api/connectionApi').KnowledgePreferences | null,
|
||||||
): Promise<void> => {
|
): Promise<void> => {
|
||||||
if (isConnecting) return;
|
if (isConnecting) return;
|
||||||
if (type === 'infomaniak') {
|
|
||||||
throw new Error('Infomaniak uses PAT flow – use createInfomaniakConnection + submitInfomaniakToken instead.');
|
|
||||||
}
|
|
||||||
setIsConnecting(true);
|
setIsConnecting(true);
|
||||||
try {
|
try {
|
||||||
const newConnection = await createConnection({
|
const newConnection = await createConnection({
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,6 @@ export const ConnectionsPage: React.FC = () => {
|
||||||
connectWithPopup,
|
connectWithPopup,
|
||||||
refreshMicrosoftToken,
|
refreshMicrosoftToken,
|
||||||
refreshGoogleToken,
|
refreshGoogleToken,
|
||||||
createInfomaniakConnection,
|
|
||||||
submitInfomaniakToken,
|
|
||||||
isConnecting,
|
isConnecting,
|
||||||
} = useConnections();
|
} = useConnections();
|
||||||
|
|
||||||
|
|
@ -236,17 +234,6 @@ export const ConnectionsPage: React.FC = () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleInfomaniakConnect = async (token: string, knowledgeEnabled: boolean) => {
|
|
||||||
try {
|
|
||||||
const newConn = await createInfomaniakConnection();
|
|
||||||
await submitInfomaniakToken(newConn.id, token);
|
|
||||||
refetch();
|
|
||||||
if (knowledgeEnabled) showSyncBanner('Infomaniak');
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Error creating Infomaniak connection:', error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleMsftAdminConsent = () => {
|
const handleMsftAdminConsent = () => {
|
||||||
const url = `${getApiBaseUrl()}/api/msft/adminconsent`;
|
const url = `${getApiBaseUrl()}/api/msft/adminconsent`;
|
||||||
window.open(url, 'msft-admin-consent', 'width=560,height=720,scrollbars=yes,resizable=yes');
|
window.open(url, 'msft-admin-consent', 'width=560,height=720,scrollbars=yes,resizable=yes');
|
||||||
|
|
@ -482,7 +469,6 @@ export const ConnectionsPage: React.FC = () => {
|
||||||
open={wizardOpen}
|
open={wizardOpen}
|
||||||
onClose={() => setWizardOpen(false)}
|
onClose={() => setWizardOpen(false)}
|
||||||
onConnect={handleWizardConnect}
|
onConnect={handleWizardConnect}
|
||||||
onInfomaniakConnect={handleInfomaniakConnect}
|
|
||||||
onMsftAdminConsent={handleMsftAdminConsent}
|
onMsftAdminConsent={handleMsftAdminConsent}
|
||||||
isConnecting={isConnecting}
|
isConnecting={isConnecting}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue