mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-13 21:05:22 +00:00
onboarding tweaks
This commit is contained in:
parent
5c2bf01764
commit
fab2fea562
5 changed files with 14 additions and 12 deletions
|
|
@ -21,7 +21,6 @@ export const GerritConnectionCreationForm = ({ onCreated }: GerritConnectionCrea
|
||||||
title="Create a Gerrit connection"
|
title="Create a Gerrit connection"
|
||||||
defaultValues={{
|
defaultValues={{
|
||||||
config: JSON.stringify(defaultConfig, null, 2),
|
config: JSON.stringify(defaultConfig, null, 2),
|
||||||
name: 'my-gerrit-connection',
|
|
||||||
}}
|
}}
|
||||||
schema={gerritSchema}
|
schema={gerritSchema}
|
||||||
quickActions={gerritQuickActions}
|
quickActions={gerritQuickActions}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ export const GiteaConnectionCreationForm = ({ onCreated }: GiteaConnectionCreati
|
||||||
title="Create a Gitea connection"
|
title="Create a Gitea connection"
|
||||||
defaultValues={{
|
defaultValues={{
|
||||||
config: JSON.stringify(defaultConfig, null, 2),
|
config: JSON.stringify(defaultConfig, null, 2),
|
||||||
name: 'my-gitea-connection',
|
|
||||||
}}
|
}}
|
||||||
schema={giteaSchema}
|
schema={giteaSchema}
|
||||||
quickActions={giteaQuickActions}
|
quickActions={giteaQuickActions}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ export const GitHubConnectionCreationForm = ({ onCreated }: GitHubConnectionCrea
|
||||||
title="Create a GitHub connection"
|
title="Create a GitHub connection"
|
||||||
defaultValues={{
|
defaultValues={{
|
||||||
config: JSON.stringify(defaultConfig, null, 2),
|
config: JSON.stringify(defaultConfig, null, 2),
|
||||||
name: 'my-github-connection',
|
|
||||||
}}
|
}}
|
||||||
schema={githubSchema}
|
schema={githubSchema}
|
||||||
quickActions={githubQuickActions}
|
quickActions={githubQuickActions}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ export const GitLabConnectionCreationForm = ({ onCreated }: GitLabConnectionCrea
|
||||||
title="Create a GitLab connection"
|
title="Create a GitLab connection"
|
||||||
defaultValues={{
|
defaultValues={{
|
||||||
config: JSON.stringify(defaultConfig, null, 2),
|
config: JSON.stringify(defaultConfig, null, 2),
|
||||||
name: 'my-gitlab-connection',
|
|
||||||
}}
|
}}
|
||||||
schema={gitlabSchema}
|
schema={gitlabSchema}
|
||||||
quickActions={gitlabQuickActions}
|
quickActions={gitlabQuickActions}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import { useForm } from "react-hook-form";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import ConfigEditor, { isConfigValidJson, onQuickAction, QuickActionFn } from "../configEditor";
|
import ConfigEditor, { isConfigValidJson, onQuickAction, QuickActionFn } from "../configEditor";
|
||||||
import { useDomain } from "@/hooks/useDomain";
|
import { useDomain } from "@/hooks/useDomain";
|
||||||
import { Loader2 } from "lucide-react";
|
import { InfoIcon, Loader2 } from "lucide-react";
|
||||||
import { ReactCodeMirrorRef } from "@uiw/react-codemirror";
|
import { ReactCodeMirrorRef } from "@uiw/react-codemirror";
|
||||||
import { SecretCombobox } from "./secretCombobox";
|
import { SecretCombobox } from "./secretCombobox";
|
||||||
import strings from "@/lib/strings";
|
import strings from "@/lib/strings";
|
||||||
|
|
@ -26,7 +26,7 @@ import useCaptureEvent from "@/hooks/useCaptureEvent";
|
||||||
interface SharedConnectionCreationFormProps<T> {
|
interface SharedConnectionCreationFormProps<T> {
|
||||||
type: CodeHostType;
|
type: CodeHostType;
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
name: string;
|
name?: string;
|
||||||
config: string;
|
config: string;
|
||||||
};
|
};
|
||||||
title: string;
|
title: string;
|
||||||
|
|
@ -117,12 +117,17 @@ export default function SharedConnectionCreationForm<T>({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn("flex flex-col max-w-3xl mx-auto bg-background border rounded-lg p-6", className)}>
|
<div className={cn("flex flex-col max-w-3xl mx-auto bg-background border rounded-lg p-6", className)}>
|
||||||
<div className="flex flex-row items-center gap-3 mb-6">
|
<div className="flex flex-col gap-4 mb-8">
|
||||||
<ConnectionIcon
|
<div className="flex flex-row items-center gap-3">
|
||||||
type={type}
|
<ConnectionIcon
|
||||||
className="w-7 h-7"
|
type={type}
|
||||||
/>
|
className="w-7 h-7"
|
||||||
<h1 className="text-3xl">{title}</h1>
|
/>
|
||||||
|
<h1 className="text-3xl">{title}</h1>
|
||||||
|
</div>
|
||||||
|
<span className="flex flex-row items-center">
|
||||||
|
<InfoIcon className="w-4 h-4 mr-2" />Connections are used to specify what repositories you want Sourcebot to sync.
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<Form
|
<Form
|
||||||
{...form}
|
{...form}
|
||||||
|
|
@ -141,6 +146,7 @@ export default function SharedConnectionCreationForm<T>({
|
||||||
{...field}
|
{...field}
|
||||||
spellCheck={false}
|
spellCheck={false}
|
||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
|
placeholder="my-connection"
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue