diff --git a/apps/backend/src/api/routes/integrations.controller.ts b/apps/backend/src/api/routes/integrations.controller.ts
index ee11cff4..21d47e8d 100644
--- a/apps/backend/src/api/routes/integrations.controller.ts
+++ b/apps/backend/src/api/routes/integrations.controller.ts
@@ -24,7 +24,6 @@ export class IntegrationsController {
private _integrationService: IntegrationService
) {}
@Get('/')
- @CheckPolicies([AuthorizationActions.Create, Sections.CHANNEL])
getIntegration() {
return this._integrationManager.getAllIntegrations();
}
@@ -56,6 +55,7 @@ export class IntegrationsController {
}
@Get('/social/:integration')
+ @CheckPolicies([AuthorizationActions.Create, Sections.CHANNEL])
async getIntegrationUrl(@Param('integration') integration: string) {
if (
!this._integrationManager
diff --git a/apps/frontend/public/success.svg b/apps/frontend/public/success.svg
new file mode 100644
index 00000000..eef8857d
--- /dev/null
+++ b/apps/frontend/public/success.svg
@@ -0,0 +1,50 @@
+
diff --git a/apps/frontend/src/components/launches/add.provider.component.tsx b/apps/frontend/src/components/launches/add.provider.component.tsx
index 795de7cf..68798e2e 100644
--- a/apps/frontend/src/components/launches/add.provider.component.tsx
+++ b/apps/frontend/src/components/launches/add.provider.component.tsx
@@ -44,8 +44,9 @@ export const ApiModal: FC<{
identifier: string;
name: string;
update?: () => void;
+ close?: () => void;
}> = (props) => {
- const { update, name } = props;
+ const { update, name, close: closePopup } = props;
const fetch = useFetch();
const router = useRouter();
const modal = useModals();
@@ -55,6 +56,9 @@ export const ApiModal: FC<{
});
const close = useCallback(() => {
+ if (closePopup) {
+ return closePopup();
+ }
modal.closeAll();
}, []);
@@ -68,7 +72,11 @@ export const ApiModal: FC<{
);
if (add.ok) {
- modal.closeAll();
+ if (closePopup) {
+ closePopup();
+ } else {
+ modal.closeAll();
+ }
router.refresh();
if (update) update();
return;
diff --git a/apps/frontend/src/components/launches/launches.component.tsx b/apps/frontend/src/components/launches/launches.component.tsx
index 00f59a25..dd3f89f0 100644
--- a/apps/frontend/src/components/launches/launches.component.tsx
+++ b/apps/frontend/src/components/launches/launches.component.tsx
@@ -1,7 +1,7 @@
'use client';
import { AddProviderButton } from '@gitroom/frontend/components/launches/add.provider.component';
-import { useCallback, useMemo, useState } from 'react';
+import { useCallback, useEffect, useMemo, useState } from 'react';
import Image from 'next/image';
import { orderBy } from 'lodash';
import { Calendar } from '@gitroom/frontend/components/launches/calendar';
@@ -56,6 +56,12 @@ export const LaunchesComponent = () => {
}
}, []);
+ useEffect(() => {
+ if (typeof window !== 'undefined' && window.opener) {
+ window.close();
+ }
+ }, []);
+
if (isLoading || reload) {
return