Skip to content

Commit bf7b1f1

Browse files
committed
Project settings page centered
1 parent 96ff617 commit bf7b1f1

File tree

1 file changed

+44
-38
lines changed
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.settings

1 file changed

+44
-38
lines changed

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.settings/route.tsx

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ import { type ActionFunction, json } from "@remix-run/server-runtime";
66
import { z } from "zod";
77
import { AdminDebugTooltip } from "~/components/admin/debugTooltip";
88
import { InlineCode } from "~/components/code/InlineCode";
9-
import { PageBody, PageContainer } from "~/components/layout/AppLayout";
9+
import {
10+
MainHorizontallyCenteredContainer,
11+
PageBody,
12+
PageContainer,
13+
} from "~/components/layout/AppLayout";
1014
import { Button } from "~/components/primitives/Buttons";
1115
import { ClipboardField } from "~/components/primitives/ClipboardField";
1216
import { Fieldset } from "~/components/primitives/Fieldset";
@@ -144,49 +148,51 @@ export default function Page() {
144148
</NavBar>
145149

146150
<PageBody>
147-
<div className="flex flex-col gap-4">
151+
<MainHorizontallyCenteredContainer>
148152
<div className="flex flex-col gap-4">
149-
<Fieldset>
150-
<InputGroup>
151-
<Label>Project ref</Label>
152-
<ClipboardField value={project.externalRef} variant={"secondary/small"} />
153-
<Hint>
154-
This goes in your{" "}
155-
<InlineCode variant="extra-extra-small">trigger.config</InlineCode> file.
156-
</Hint>
157-
</InputGroup>
158-
</Fieldset>
159-
160-
<Form method="post" {...renameForm.props} className="max-w-md">
161-
<input type="hidden" name="action" value="rename" />
153+
<div className="flex flex-col gap-4">
162154
<Fieldset>
163155
<InputGroup>
164-
<Label htmlFor={projectName.id}>Rename your project</Label>
165-
<Input
166-
{...conform.input(projectName, { type: "text" })}
167-
defaultValue={project.name}
168-
placeholder="Your project name"
169-
icon={FolderIcon}
170-
autoFocus
171-
/>
172-
<FormError id={projectName.errorId}>{projectName.error}</FormError>
156+
<Label>Project ref</Label>
157+
<ClipboardField value={project.externalRef} variant={"secondary/small"} />
158+
<Hint>
159+
This goes in your{" "}
160+
<InlineCode variant="extra-extra-small">trigger.config</InlineCode> file.
161+
</Hint>
173162
</InputGroup>
174-
<FormButtons
175-
confirmButton={
176-
<Button
177-
type="submit"
178-
variant={"primary/small"}
179-
disabled={isRenameLoading}
180-
LeadingIcon={isRenameLoading ? SpinnerWhite : undefined}
181-
>
182-
Rename project
183-
</Button>
184-
}
185-
/>
186163
</Fieldset>
187-
</Form>
164+
165+
<Form method="post" {...renameForm.props} className="max-w-md">
166+
<input type="hidden" name="action" value="rename" />
167+
<Fieldset>
168+
<InputGroup>
169+
<Label htmlFor={projectName.id}>Rename your project</Label>
170+
<Input
171+
{...conform.input(projectName, { type: "text" })}
172+
defaultValue={project.name}
173+
placeholder="Your project name"
174+
icon={FolderIcon}
175+
autoFocus
176+
/>
177+
<FormError id={projectName.errorId}>{projectName.error}</FormError>
178+
</InputGroup>
179+
<FormButtons
180+
confirmButton={
181+
<Button
182+
type="submit"
183+
variant={"primary/small"}
184+
disabled={isRenameLoading}
185+
LeadingIcon={isRenameLoading ? SpinnerWhite : undefined}
186+
>
187+
Rename project
188+
</Button>
189+
}
190+
/>
191+
</Fieldset>
192+
</Form>
193+
</div>
188194
</div>
189-
</div>
195+
</MainHorizontallyCenteredContainer>
190196
</PageBody>
191197
</PageContainer>
192198
);

0 commit comments

Comments
 (0)