Skip to content
This repository was archived by the owner on Jul 8, 2025. It is now read-only.

fix: buttons in workspace page #159

Merged
merged 2 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ test("can update system prompt", async () => {
await userEvent.type(input, "new prompt from test");
expect(input).toHaveTextContent("new prompt from test");

await userEvent.click(getByRole("button", { name: /save changes/i }));
await userEvent.click(getByRole("button", { name: /Save/i }));

server.use(
http.get("*/api/v1/workspaces/:name/system-prompt", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
CardBody,
CardFooter,
DarkModeContext,
LinkButton,
Loader,
Text,
} from "@stacklok/ui-kit";
Expand Down Expand Up @@ -207,9 +206,6 @@ export function SystemPromptEditor({
</div>
</CardBody>
<CardFooter className="justify-end gap-2">
<LinkButton href="/workspaces" variant="secondary">
Cancel
</LinkButton>
<Button
isPending={isMutationPending}
isDisabled={Boolean(isGetPromptPending ?? saved)}
Expand All @@ -220,7 +216,7 @@ export function SystemPromptEditor({
<span>Saved</span> <Check />
</>
) : (
"Save changes"
"Save"
)}
</Button>
</CardFooter>
Expand Down
24 changes: 13 additions & 11 deletions src/features/workspace/components/archive-workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,24 @@ export function ArchiveWorkspace({

return (
<Card className={twMerge(className, "shrink-0")}>
<CardBody>
<Text className="text-primary">Archive Workspace</Text>
<div className="flex justify-between items-center">
<CardBody className="flex justify-between items-center">
<div>
<Text className="text-primary">Archive Workspace</Text>
<Text className="flex items-center text-secondary mb-0">
Archiving this workspace removes it from the main workspaces list,
though it can be restored if needed.
</Text>
<Button
isPending={isPending}
onPress={() => {
mutate({ path: { workspace_name: workspaceName } });
}}
>
Archive
</Button>
</div>

<Button
isDestructive
isPending={isPending}
onPress={() => {
mutate({ path: { workspace_name: workspaceName } });
}}
>
Archive
</Button>
</CardBody>
</Card>
);
Expand Down
Loading