Skip to content

Commit aa76f3d

Browse files
authored
Merge pull request #399 from trycompai/lewis/integrations
feat: update authentication options and integration settings
2 parents 4b92cf9 + 1617cd9 commit aa76f3d

File tree

21 files changed

+400
-438
lines changed

21 files changed

+400
-438
lines changed

apps/app/src/app/[locale]/(public)/auth/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ export default async function Page({
2424
const preferredSignInOption = (
2525
<div className="flex flex-col space-y-2">
2626
<GoogleSignIn inviteCode={inviteCode} />
27-
<GithubSignIn inviteCode={inviteCode} />
2827
</div>
2928
);
3029

3130
const moreSignInOptions = (
3231
<div className="flex flex-col space-y-2">
3332
<MagicLinkSignIn inviteCode={inviteCode} />
33+
<GithubSignIn inviteCode={inviteCode} />
3434
</div>
3535
);
3636

apps/app/src/components/integrations/integration-settings.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export type IntegrationSettingsItem = {
1515
type: "switch" | "text" | "select";
1616
required: boolean;
1717
value: string | boolean;
18+
placeholder?: string;
1819
isSet?: boolean;
1920
};
2021

@@ -66,7 +67,7 @@ function IntegrationSettingsItem({
6667
}
6768
value={setting.value as string}
6869
placeholder={
69-
installedSettings[setting.id] ? "••••••••" : ""
70+
installedSettings[setting.id] ? "••••••••" : setting.placeholder
7071
}
7172
onChange={(e) => {
7273
onSettingChange(setting.id, e.target.value);
@@ -105,15 +106,16 @@ export function IntegrationSettings({
105106
? settings
106107
: settings
107108
? Object.entries(settings).map(([key, value]) => ({
108-
id: key,
109-
label:
110-
key.charAt(0).toUpperCase() +
111-
key.slice(1).replace(/_/g, " "),
112-
description: `Enter your ${key.replace(/_/g, " ")}`,
113-
type: "text",
114-
required: true,
115-
value: value,
116-
}))
109+
id: key,
110+
label:
111+
key.charAt(0).toUpperCase() +
112+
key.slice(1).replace(/_/g, " "),
113+
description: `Enter your ${key.replace(/_/g, " ")}`,
114+
type: "text",
115+
required: true,
116+
value: value,
117+
placeholder: `Enter your ${key.replace(/_/g, " ")}`,
118+
}))
117119
: [];
118120

119121
const [localSettings, setLocalSettings] = useState(normalizedSettings);
@@ -147,7 +149,7 @@ export function IntegrationSettings({
147149
</p>
148150
) : (
149151
localSettings.map((setting) => (
150-
<div key={setting.id}>
152+
<div key={setting.id} className="flex flex-col my-2">
151153
<IntegrationSettingsItem
152154
setting={setting}
153155
integrationId={integrationId}

0 commit comments

Comments
 (0)