From 6ba83ef4e4aa784c6f94d4e28c43b1167991c525 Mon Sep 17 00:00:00 2001 From: renatodellosso Date: Wed, 10 Jul 2024 17:17:24 -0400 Subject: [PATCH 1/6] Removed SLACK_KEY from .env as it is not used --- enviroment.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/enviroment.d.ts b/enviroment.d.ts index e986121a..dc06d898 100644 --- a/enviroment.d.ts +++ b/enviroment.d.ts @@ -28,7 +28,6 @@ declare global { IMAGE_UPLOAD_DIR: string; FILL_TEAMS: string; - SLACK_KEY: string; SLACK_BOT_TOKEN: string; SLACK_CLIENT_ID: string; SLACK_CLIENT_SECRET: string; From d3b9f860b446745fdc38522b67e493ef7c96be42 Mon Sep 17 00:00:00 2001 From: renatodellosso Date: Wed, 10 Jul 2024 17:35:11 -0400 Subject: [PATCH 2/6] Added Add to Slack button and metadata --- components/AddToSlack.tsx | 8 ++++++++ pages/[teamSlug]/index.tsx | 4 +++- pages/_document.tsx | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 components/AddToSlack.tsx diff --git a/components/AddToSlack.tsx b/components/AddToSlack.tsx new file mode 100644 index 00000000..0166066d --- /dev/null +++ b/components/AddToSlack.tsx @@ -0,0 +1,8 @@ +export default function AddToSlack() { + return ( + + Add to Slack + + ); +} \ No newline at end of file diff --git a/pages/[teamSlug]/index.tsx b/pages/[teamSlug]/index.tsx index 7d8c5217..30ce98fe 100644 --- a/pages/[teamSlug]/index.tsx +++ b/pages/[teamSlug]/index.tsx @@ -33,6 +33,7 @@ import { validName } from "@/lib/client/InputVerification"; import { BsSlack } from "react-icons/bs"; import { games } from "@/lib/games"; import { defaultGameId } from "@/lib/client/GameId"; +import AddToSlack from "@/components/AddToSlack"; const api = new ClientAPI("gearboxiscool"); @@ -448,7 +449,8 @@ export default function TeamIndex(props: TeamPageProps) { Not linked to Slack. { team?.owners.includes(session?.user?._id ?? "") && <> - {" "}Run /link-notifications {team.number} followed by + + {" "}Then run /link-notifications {team.number} followed by {" "}/invite @Gearbox in Slack to link notifications. } diff --git a/pages/_document.tsx b/pages/_document.tsx index 09d89a37..bfc109f1 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -8,6 +8,7 @@ export default function Document() { +
From 8285497c549e35907f5840f5f13190c0c1105ff7 Mon Sep 17 00:00:00 2001 From: renatodellosso Date: Thu, 11 Jul 2024 17:09:56 -0400 Subject: [PATCH 3/6] Changed Add to Slack button --- components/AddToSlack.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/AddToSlack.tsx b/components/AddToSlack.tsx index 0166066d..3d29ddc2 100644 --- a/components/AddToSlack.tsx +++ b/components/AddToSlack.tsx @@ -1,8 +1,7 @@ export default function AddToSlack() { return ( - Add to Slack + Add Gearbox to Slack ); } \ No newline at end of file From e92669e644251759752297e3467522b83edfb007 Mon Sep 17 00:00:00 2001 From: renatodellosso Date: Thu, 11 Jul 2024 17:13:11 -0400 Subject: [PATCH 4/6] Better formatting for Add to Slack --- components/AddToSlack.tsx | 2 +- pages/[teamSlug]/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/AddToSlack.tsx b/components/AddToSlack.tsx index 3d29ddc2..decc16c0 100644 --- a/components/AddToSlack.tsx +++ b/components/AddToSlack.tsx @@ -1,6 +1,6 @@ export default function AddToSlack() { return ( - + Add Gearbox to Slack ); diff --git a/pages/[teamSlug]/index.tsx b/pages/[teamSlug]/index.tsx index 30ce98fe..9ba5ea65 100644 --- a/pages/[teamSlug]/index.tsx +++ b/pages/[teamSlug]/index.tsx @@ -449,8 +449,8 @@ export default function TeamIndex(props: TeamPageProps) { Not linked to Slack. { team?.owners.includes(session?.user?._id ?? "") && <> - - {" "}Then run /link-notifications {team.number} followed by + {" "} + {" "}, then run /link-notifications {team.number} followed by {" "}/invite @Gearbox in Slack to link notifications. } From 06cd245b90c48e68944f3f10449dd3765d7cffb8 Mon Sep 17 00:00:00 2001 From: renatodellosso Date: Thu, 11 Jul 2024 17:16:41 -0400 Subject: [PATCH 5/6] Colored lin text --- components/AddToSlack.tsx | 2 +- pages/[teamSlug]/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/AddToSlack.tsx b/components/AddToSlack.tsx index decc16c0..c2abd3d6 100644 --- a/components/AddToSlack.tsx +++ b/components/AddToSlack.tsx @@ -1,6 +1,6 @@ export default function AddToSlack() { return ( - + Add Gearbox to Slack ); diff --git a/pages/[teamSlug]/index.tsx b/pages/[teamSlug]/index.tsx index 9ba5ea65..b618ce82 100644 --- a/pages/[teamSlug]/index.tsx +++ b/pages/[teamSlug]/index.tsx @@ -450,7 +450,7 @@ export default function TeamIndex(props: TeamPageProps) { { team?.owners.includes(session?.user?._id ?? "") && <> {" "} - {" "}, then run /link-notifications {team.number} followed by + , then run /link-notifications {team.number} followed by {" "}/invite @Gearbox in Slack to link notifications. } From fce55122d622a158604f71b71cf43a424d38e6a8 Mon Sep 17 00:00:00 2001 From: renatodellosso Date: Thu, 11 Jul 2024 17:25:11 -0400 Subject: [PATCH 6/6] Changed Add to Slack scopes --- components/AddToSlack.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/AddToSlack.tsx b/components/AddToSlack.tsx index c2abd3d6..3260bb2a 100644 --- a/components/AddToSlack.tsx +++ b/components/AddToSlack.tsx @@ -1,6 +1,6 @@ export default function AddToSlack() { return ( - + Add Gearbox to Slack );