Skip to content

Membership settings rework #198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 18, 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
1 change: 1 addition & 0 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-navigation-menu": "^1.2.0",
"@radix-ui/react-scroll-area": "^1.1.0",
"@radix-ui/react-select": "^2.1.6",
"@radix-ui/react-separator": "^1.1.0",
"@radix-ui/react-slot": "^1.1.1",
"@radix-ui/react-tabs": "^1.1.2",
Expand Down
305 changes: 208 additions & 97 deletions packages/web/src/actions.ts

Large diffs are not rendered by default.

21 changes: 9 additions & 12 deletions packages/web/src/app/[domain]/secrets/secretsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { useDomain } from "@/hooks/useDomain";

const formSchema = z.object({
key: z.string().min(2).max(40),
value: z.string().min(2).max(40),
value: z.string().min(2),
});

interface SecretsTableProps {
Expand All @@ -30,18 +30,15 @@ export const SecretsTable = ({ initialSecrets }: SecretsTableProps) => {
const { toast } = useToast();
const domain = useDomain();

const fetchSecretKeys = async () => {
const keys = await getSecrets(domain);
if ('keys' in keys) {
setSecrets(keys);
} else {
console.error(keys);
}
};

useEffect(() => {
fetchSecretKeys();
}, [fetchSecretKeys]);
getSecrets(domain).then((keys) => {
if ('keys' in keys) {
setSecrets(keys);
} else {
console.error(keys);
}
})
}, []);

const form = useForm<z.infer<typeof formSchema>>({
resolver: zodResolver(formSchema),
Expand Down
7 changes: 7 additions & 0 deletions packages/web/src/app/[domain]/settings/(general)/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

export default async function GeneralSettingsPage() {
return (
<p>todo</p>
)
}

22 changes: 22 additions & 0 deletions packages/web/src/app/[domain]/settings/components/header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Separator } from "@/components/ui/separator";
import { cn } from "@/lib/utils";
import clsx from "clsx";

interface HeaderProps {
children: React.ReactNode;
withTopMargin?: boolean;
className?: string;
}

export const Header = ({
children,
withTopMargin = true,
className,
}: HeaderProps) => {
return (
<div className={cn("mb-16", className)}>
{children}
<Separator className={clsx("absolute left-0 right-0", { "mt-12": withTopMargin })} />
</div>
)
}
47 changes: 0 additions & 47 deletions packages/web/src/app/[domain]/settings/components/inviteTable.tsx

This file was deleted.

This file was deleted.

This file was deleted.

42 changes: 0 additions & 42 deletions packages/web/src/app/[domain]/settings/components/memberTable.tsx

This file was deleted.

Loading