Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

💄 Update control panel styles (#2089)

Luke Vella29d74359019e
diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.json
index 586fabd85..f7a560ed1 100644
--- a/apps/web/public/locales/en/app.json
+++ b/apps/web/public/locales/en/app.json
@@ -251,7 +251,6 @@
"commandMenuNoResults": "No results",
"commandMenu": "Command Menu",
"commandMenuDescription": "Select a command",
- "homeNavTitle": "Navigation",
"account": "Account",
"signOut": "Sign Out",
"paginationItems": "Showing {startItem}–{endItem} of {totalItems}",
@@ -325,13 +324,9 @@
"authErrorsUserBanned": "This account has been banned. Please contact support if you believe this is an error.",
"authErrorsEmailBlocked": "This email address is not allowed. Please use a different email or contact support.",
"authErrorsUserNotFound": "No account found with this email address. Please check the email or register for a new account.",
- "disableUserRegistration": "Disable User Registration",
- "disableUserRegistrationDescription": "Prevent new users from registering an account.",
"authenticationAndSecurity": "Authentication & Security",
"authenticationAndSecurityDescription": "Manage authentication and security settings",
- "youHaveUnsavedChanges": "You have unsaved changes",
"unexpectedError": "Unexpected Error",
- "unexpectedErrorDescription": "There was an unexpected error. Please try again later.",
"actionErrorUnauthorized": "You are not authorized to perform this action",
"actionErrorNotFound": "The resource was not found",
"actionErrorForbidden": "You are not allowed to perform this action",
@@ -557,5 +552,14 @@
"themeLight": "Light",
"themeDark": "Dark",
"theme": "Theme",
- "themeDescription": "Choose your preferred appearance"
+ "themeDescription": "Choose your preferred appearance",
+ "licenseKeyDescription": "Manage your instance license",
+ "userRegistration": "User Registration",
+ "userRegistrationDescription": "Allow new users to register an account.",
+ "enabled": "Enabled",
+ "disabled": "Disabled",
+ "saving": "Saving...",
+ "saved": "Saved",
+ "instanceSettingsDescription": "Configure your instance settings",
+ "usersDescription": "Manage users on this instance"
}
diff --git a/apps/web/src/app/[locale]/(space)/(dashboard)/layout.tsx b/apps/web/src/app/[locale]/(space)/(dashboard)/layout.tsx
index 71854f2ee..ad62e8393 100644
--- a/apps/web/src/app/[locale]/(space)/(dashboard)/layout.tsx
+++ b/apps/web/src/app/[locale]/(space)/(dashboard)/layout.tsx
@@ -12,7 +12,7 @@ import {
SidebarMenuItem,
SidebarSeparator,
} from "@rallly/ui/sidebar";
-import { Settings2Icon } from "lucide-react";
+import { GaugeIcon, Settings2Icon } from "lucide-react";
import type { Metadata } from "next";
import Link from "next/link";
import { FeedbackMenuItem } from "@/app/[locale]/(space)/(dashboard)/components/feedback-menu-item";
@@ -57,6 +57,21 @@ export default async function Layout({
<IfFeatureEnabled feature="feedback">
<FeedbackMenuItem />
</IfFeatureEnabled>
+ {user.role === "admin" ? (
+ <SidebarMenuItem>
+ <SidebarMenuButton asChild>
+ <Link href="/control-panel">
+ <Icon>
+ <GaugeIcon />
+ </Icon>
+ <Trans
+ i18nKey="controlPanel"
+ defaults="Control Panel"
+ />
+ </Link>
+ </SidebarMenuButton>
+ </SidebarMenuItem>
+ ) : null}
<SidebarMenuItem>
<SidebarMenuButton asChild>
<Link href="/settings/preferences">
diff --git a/apps/web/src/app/[locale]/control-panel/layout.tsx b/apps/web/src/app/[locale]/control-panel/layout.tsx
index 27b6cf7a5..1f50921ea 100644
--- a/apps/web/src/app/[locale]/control-panel/layout.tsx
+++ b/apps/web/src/app/[locale]/control-panel/layout.tsx
@@ -1,5 +1,8 @@
-import { SidebarInset } from "@rallly/ui/sidebar";
+import { Icon } from "@rallly/ui/icon";
+import { SidebarInset, SidebarTrigger } from "@rallly/ui/sidebar";
+import { GaugeIcon } from "lucide-react";
import type { Metadata } from "next";
+import { Trans } from "@/components/trans";
import { LicenseLimitWarning } from "@/features/licensing/components/license-limit-warning";
import { CommandMenu } from "@/features/navigation/command-menu";
import { getTranslation } from "@/i18n/server";
@@ -17,8 +20,21 @@ export default async function AdminLayout({
<ControlPanelSidebar />
<SidebarInset>
<LicenseLimitWarning />
- <div className="flex min-w-0 flex-1 flex-col">
- <div className="flex-1">{children}</div>
+ <div className="flex flex-1 flex-col">
+ <header className="sticky top-0 z-10 border-b bg-background/90 p-3 backdrop-blur-xs md:hidden">
+ <div className="flex items-center gap-4">
+ <SidebarTrigger />
+ <div className="flex items-center gap-2">
+ <Icon>
+ <GaugeIcon />
+ </Icon>
+ <span className="font-medium text-sm">
+ <Trans i18nKey="controlPanel" defaults="Control Panel" />
+ </span>
+ </div>
+ </div>
+ </header>
+ <main className="flex-1 p-4 lg:py-12">{children}</main>
</div>
</SidebarInset>
</ControlPanelSidebarProvider>
diff --git a/apps/web/src/app/[locale]/control-panel/license/page.tsx b/apps/web/src/app/[locale]/control-panel/license/page.tsx
index dfeaeb3bf..a382ac9c7 100644
--- a/apps/web/src/app/[locale]/control-panel/license/page.tsx
+++ b/apps/web/src/app/[locale]/control-panel/license/page.tsx
@@ -10,8 +10,20 @@ import { Icon } from "@rallly/ui/icon";
import dayjs from "dayjs";
import { KeySquareIcon, PlusIcon, ShoppingBagIcon } from "lucide-react";
import type { Metadata } from "next";
-import { PageIcon } from "@/app/components/page-icons";
+import { PageSection } from "@/app/components/page-layout";
+import {
+ SettingsPage,
+ SettingsPageContent,
+ SettingsPageDescription,
+ SettingsPageHeader,
+ SettingsPageTitle,
+} from "@/app/components/settings-layout";
import { requireAdmin } from "@/auth/data";
+import {
+ DescriptionList,
+ DescriptionListTitle,
+ DescriptionListValue,
+} from "@/components/description-list";
import {
EmptyState,
EmptyStateDescription,
@@ -19,12 +31,6 @@ import {
EmptyStateIcon,
EmptyStateTitle,
} from "@/components/empty-state";
-import {
- FullWidthLayout,
- FullWidthLayoutContent,
- FullWidthLayoutHeader,
- FullWidthLayoutTitle,
-} from "@/components/full-width-layout";
import { Trans } from "@/components/trans";
import { LicenseKeyForm } from "@/features/licensing/components/license-key-form";
import { RemoveLicenseButton } from "@/features/licensing/components/remove-license-button";
@@ -36,36 +42,24 @@ async function loadData() {
return { license };
}
-function DescriptionList({ children }: { children: React.ReactNode }) {
- return <dl>{children}</dl>;
-}
-
-function DescriptionListTitle({ children }: { children: React.ReactNode }) {
- return <dt className="mb-1 text-muted-foreground text-xs">{children}</dt>;
-}
-
-function DescriptionListValue({ children }: { children: React.ReactNode }) {
- return <dd className="mb-4 font-mono text-sm">{children}</dd>;
-}
-
export default async function LicensePage() {
const { license } = await loadData();
return (
- <FullWidthLayout>
- <FullWidthLayoutHeader>
- <FullWidthLayoutTitle
- icon={
- <PageIcon size="sm" color="darkGray">
- <KeySquareIcon />
- </PageIcon>
- }
- >
+ <SettingsPage>
+ <SettingsPageHeader>
+ <SettingsPageTitle>
<Trans i18nKey="license" defaults="License" />
- </FullWidthLayoutTitle>
- </FullWidthLayoutHeader>
- <FullWidthLayoutContent>
+ </SettingsPageTitle>
+ <SettingsPageDescription>
+ <Trans
+ i18nKey="licenseKeyDescription"
+ defaults="Manage your instance license"
+ />
+ </SettingsPageDescription>
+ </SettingsPageHeader>
+ <SettingsPageContent>
{license ? (
- <div>
+ <PageSection variant="card">
<DescriptionList>
<DescriptionListTitle>
<Trans i18nKey="licenseType" defaults="License Type" />
@@ -111,10 +105,10 @@ export default async function LicensePage() {
{dayjs(license.issuedAt).format("YYYY-MM-DD")}
</DescriptionListValue>
</DescriptionList>
- <div className="mt-6">
+ <div>
<RemoveLicenseButton />
</div>
- </div>
+ </PageSection>
) : (
<EmptyState className="h-full">
<EmptyStateIcon>
@@ -126,7 +120,7 @@ export default async function LicensePage() {
<EmptyStateDescription>
<Trans
i18nKey="noLicenseKeyDescription"
- defaults="This instance doesn’t have a license key yet."
+ defaults="This instance doesn't have a license key yet."
/>
</EmptyStateDescription>
<EmptyStateFooter className="flex gap-2">
@@ -169,8 +163,8 @@ export default async function LicensePage() {
</EmptyStateFooter>
</EmptyState>
)}
- </FullWidthLayoutContent>
- </FullWidthLayout>
+ </SettingsPageContent>
+ </SettingsPage>
);
}
diff --git a/apps/web/src/app/[locale]/control-panel/loading.tsx b/apps/web/src/app/[locale]/control-panel/loading.tsx
index fdf5e4f64..03e55bd0a 100644
--- a/apps/web/src/app/[locale]/control-panel/loading.tsx
+++ b/apps/web/src/app/[locale]/control-panel/loading.tsx
@@ -1,11 +1,5 @@
-import { PageSkeleton } from "@/app/components/page-layout";
import { RouterLoadingIndicator } from "@/components/router-loading-indicator";
export default async function Loading() {
- return (
- <>
- <RouterLoadingIndicator />
- <PageSkeleton />
- </>
- );
+ return <RouterLoadingIndicator />;
}
diff --git a/apps/web/src/app/[locale]/control-panel/page.tsx b/apps/web/src/app/[locale]/control-panel/page.tsx
index eb6a873ed..0ee1702be 100644
--- a/apps/web/src/app/[locale]/control-panel/page.tsx
+++ b/apps/web/src/app/[locale]/control-panel/page.tsx
@@ -3,7 +3,6 @@ import { cn } from "@rallly/ui";
import { Icon } from "@rallly/ui/icon";
import { Tile, TileGrid, TileTitle } from "@rallly/ui/tile";
import {
- GaugeIcon,
InfinityIcon,
KeySquareIcon,
SettingsIcon,
@@ -12,13 +11,13 @@ import {
import type { Metadata } from "next";
import Link from "next/link";
import { PageIcon } from "@/app/components/page-icons";
-import { requireAdmin } from "@/auth/data";
import {
- FullWidthLayout,
- FullWidthLayoutContent,
- FullWidthLayoutHeader,
- FullWidthLayoutTitle,
-} from "@/components/full-width-layout";
+ SettingsPage,
+ SettingsPageContent,
+ SettingsPageHeader,
+ SettingsPageTitle,
+} from "@/app/components/settings-layout";
+import { requireAdmin } from "@/auth/data";
import { Trans } from "@/components/trans";
import { loadInstanceLicense } from "@/features/licensing/data";
@@ -42,23 +41,14 @@ export default async function AdminPage() {
const tier = license?.type;
return (
- <FullWidthLayout>
- <FullWidthLayoutHeader>
- <FullWidthLayoutTitle
- icon={
- <PageIcon size="sm" color="indigo">
- <GaugeIcon />
- </PageIcon>
- }
- >
- <Trans i18nKey="controlPanel" defaults="Control Panel" />
- </FullWidthLayoutTitle>
- </FullWidthLayoutHeader>
- <FullWidthLayoutContent>
+ <SettingsPage>
+ <SettingsPageHeader>
+ <SettingsPageTitle>
+ <Trans i18nKey="home" defaults="Home" />
+ </SettingsPageTitle>
+ </SettingsPageHeader>
+ <SettingsPageContent>
<div className="space-y-4">
- <h2 className="text-muted-foreground text-sm">
- <Trans i18nKey="homeNavTitle" defaults="Navigation" />
- </h2>
<TileGrid>
{/* USERS */}
<Tile asChild>
@@ -134,8 +124,8 @@ export default async function AdminPage() {
</Tile>
</TileGrid>
</div>
- </FullWidthLayoutContent>
- </FullWidthLayout>
+ </SettingsPageContent>
+ </SettingsPage>
);
}
diff --git a/apps/web/src/app/[locale]/control-panel/settings/instance-settings-form.tsx b/apps/web/src/app/[locale]/control-panel/settings/instance-settings-form.tsx
index 049e12fad..c0996f33b 100644
--- a/apps/web/src/app/[locale]/control-panel/settings/instance-settings-form.tsx
+++ b/apps/web/src/app/[locale]/control-panel/settings/instance-settings-form.tsx
@@ -1,35 +1,19 @@
"use client";
-import { zodResolver } from "@hookform/resolvers/zod";
-import {
- ActionBar,
- ActionBarGroup,
- ActionBarTitle,
-} from "@rallly/ui/action-bar";
import { Alert, AlertDescription } from "@rallly/ui/alert";
-import { Button } from "@rallly/ui/button";
+import { Label } from "@rallly/ui/label";
import {
- Form,
- FormControl,
- FormDescription,
- FormField,
- FormItem,
- FormLabel,
-} from "@rallly/ui/form";
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from "@rallly/ui/select";
import { toast } from "@rallly/ui/sonner";
-import { Switch } from "@rallly/ui/switch";
import { ContainerIcon } from "lucide-react";
-import { useForm } from "react-hook-form";
-import {
- SettingsGroup,
- SettingsGroupContent,
- SettingsGroupDescription,
- SettingsGroupHeader,
- SettingsGroupTitle,
-} from "@/components/settings-group";
+import React from "react";
import { Trans } from "@/components/trans";
import type { InstanceSettings } from "@/features/instance-settings/schema";
-import { instanceSettingsSchema } from "@/features/instance-settings/schema";
import { useTranslation } from "@/i18n/client";
import { useFeatureFlag } from "@/lib/feature-flags/client";
import { useSafeAction } from "@/lib/safe-action/client";
@@ -41,129 +25,71 @@ export function InstanceSettingsForm({
defaultValue: InstanceSettings;
}) {
const isRegistrationEnabled = useFeatureFlag("registration");
-
- const form = useForm<InstanceSettings>({
- defaultValues: {
- ...defaultValue,
- disableUserRegistration:
- !isRegistrationEnabled || Boolean(defaultValue.disableUserRegistration),
- },
- resolver: zodResolver(instanceSettingsSchema),
- });
+ const [disableUserRegistration, setDisableUserRegistration] = React.useState(
+ !isRegistrationEnabled || Boolean(defaultValue.disableUserRegistration),
+ );
const updateInstanceSettings = useSafeAction(updateInstanceSettingsAction);
-
const { t } = useTranslation();
+ const handleChange = (value: string) => {
+ const disabled = value === "disabled";
+ setDisableUserRegistration(disabled);
+ toast.promise(
+ updateInstanceSettings.executeAsync({
+ disableUserRegistration: disabled,
+ }),
+ {
+ loading: t("saving", { defaultValue: "Saving..." }),
+ success: t("saved", { defaultValue: "Saved" }),
+ error: t("unexpectedError", { defaultValue: "Unexpected Error" }),
+ },
+ );
+ };
+
return (
- <Form {...form}>
- <form
- name="instance-settings-form"
- onSubmit={form.handleSubmit(async (data) => {
- try {
- await updateInstanceSettings.executeAsync(data);
- form.reset(data);
- } catch (error) {
- console.error(error);
- toast.error(
- t("unexpectedError", {
- defaultValue: "Unexpected Error",
- }),
- {
- description: t("unexpectedErrorDescription", {
- defaultValue:
- "There was an unexpected error. Please try again later.",
- }),
- },
- );
- }
- })}
- >
- <SettingsGroup>
- <SettingsGroupHeader>
- <SettingsGroupTitle>
- <Trans
- i18nKey="authenticationAndSecurity"
- defaults="Authentication & Security"
- />
- </SettingsGroupTitle>
- <SettingsGroupDescription>
- <Trans
- i18nKey="authenticationAndSecurityDescription"
- defaults="Manage authentication and security settings"
- />
- </SettingsGroupDescription>
- </SettingsGroupHeader>
- <SettingsGroupContent>
- <FormField
- control={form.control}
- name="disableUserRegistration"
- render={({ field }) => (
- <FormItem>
- <div className="flex items-center gap-2">
- <FormControl>
- <Switch
- onCheckedChange={field.onChange}
- checked={field.value}
- disabled={!isRegistrationEnabled}
- />
- </FormControl>
- <FormLabel>
- <Trans
- i18nKey="disableUserRegistration"
- defaults="Disable User Registration"
- />
- </FormLabel>
- </div>
- <FormDescription>
- <Trans
- i18nKey="disableUserRegistrationDescription"
- defaults="Prevent new users from registering an account."
- />
- </FormDescription>
- </FormItem>
- )}
+ <div className="space-y-4">
+ <div className="flex items-center justify-between gap-4">
+ <div className="space-y-1">
+ <Label htmlFor="userRegistration">
+ <Trans i18nKey="userRegistration" defaults="User Registration" />
+ </Label>
+ <p className="text-muted-foreground text-sm">
+ <Trans
+ i18nKey="userRegistrationDescription"
+ defaults="Allow new users to register an account."
/>
- {!isRegistrationEnabled && (
- <Alert variant="note" className="mt-4">
- <ContainerIcon />
- <AlertDescription>
- <p>
- <Trans
- i18nKey="configuredByEnvironmentVariable"
- defaults="This setting has been configured by environment variable."
- />
- </p>
- </AlertDescription>
- </Alert>
- )}
- </SettingsGroupContent>
- </SettingsGroup>
- <ActionBar open={form.formState.isDirty}>
- <ActionBarTitle>
+ </p>
+ </div>
+ <Select
+ value={disableUserRegistration ? "disabled" : "enabled"}
+ onValueChange={handleChange}
+ disabled={!isRegistrationEnabled}
+ >
+ <SelectTrigger id="userRegistration" className="w-32">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ <SelectItem value="enabled">
+ <Trans i18nKey="enabled" defaults="Enabled" />
+ </SelectItem>
+ <SelectItem value="disabled">
+ <Trans i18nKey="disabled" defaults="Disabled" />
+ </SelectItem>
+ </SelectContent>
+ </Select>
+ </div>
+ {!isRegistrationEnabled && (
+ <Alert variant="note">
+ <ContainerIcon />
+ <AlertDescription>
<Trans
- i18nKey="youHaveUnsavedChanges"
- defaults="You have unsaved changes"
+ i18nKey="configuredByEnvironmentVariable"
+ defaults="This setting has been configured by environment variable."
/>
- </ActionBarTitle>
- <ActionBarGroup>
- <Button
- variant="actionBar"
- type="button"
- onClick={() => form.reset()}
- >
- <Trans i18nKey="cancel" defaults="Cancel" />
- </Button>
- <Button
- loading={form.formState.isSubmitting}
- variant="primary"
- type="submit"
- >
- <Trans i18nKey="save" defaults="Save" />
- </Button>
- </ActionBarGroup>
- </ActionBar>
- </form>
- </Form>
+ </AlertDescription>
+ </Alert>
+ )}
+ </div>
);
}
diff --git a/apps/web/src/app/[locale]/control-panel/settings/page.tsx b/apps/web/src/app/[locale]/control-panel/settings/page.tsx
index f0c6cdde7..a38409206 100644
--- a/apps/web/src/app/[locale]/control-panel/settings/page.tsx
+++ b/apps/web/src/app/[locale]/control-panel/settings/page.tsx
@@ -1,12 +1,19 @@
-import { SettingsIcon } from "lucide-react";
-import { PageIcon } from "@/app/components/page-icons";
-import { requireAdmin } from "@/auth/data";
import {
- FullWidthLayout,
- FullWidthLayoutContent,
- FullWidthLayoutHeader,
- FullWidthLayoutTitle,
-} from "@/components/full-width-layout";
+ PageSection,
+ PageSectionContent,
+ PageSectionDescription,
+ PageSectionGroup,
+ PageSectionHeader,
+ PageSectionTitle,
+} from "@/app/components/page-layout";
+import {
+ SettingsPage,
+ SettingsPageContent,
+ SettingsPageDescription,
+ SettingsPageHeader,
+ SettingsPageTitle,
+} from "@/app/components/settings-layout";
+import { requireAdmin } from "@/auth/data";
import { Trans } from "@/components/trans";
import { getInstanceSettings } from "@/features/instance-settings/queries";
import { InstanceSettingsForm } from "./instance-settings-form";
@@ -22,25 +29,45 @@ async function loadData() {
};
}
-export default async function SettingsPage() {
+export default async function InstanceSettingsPage() {
const { instanceSettings } = await loadData();
return (
- <FullWidthLayout>
- <FullWidthLayoutHeader>
- <FullWidthLayoutTitle
- icon={
- <PageIcon size="sm" color="darkGray">
- <SettingsIcon />
- </PageIcon>
- }
- >
+ <SettingsPage>
+ <SettingsPageHeader>
+ <SettingsPageTitle>
<Trans i18nKey="settings" defaults="Settings" />
- </FullWidthLayoutTitle>
- </FullWidthLayoutHeader>
- <FullWidthLayoutContent>
- <InstanceSettingsForm defaultValue={instanceSettings} />
- </FullWidthLayoutContent>
- </FullWidthLayout>
+ </SettingsPageTitle>
+ <SettingsPageDescription>
+ <Trans
+ i18nKey="instanceSettingsDescription"
+ defaults="Configure your instance settings"
+ />
+ </SettingsPageDescription>
+ </SettingsPageHeader>
+ <SettingsPageContent>
+ <PageSectionGroup>
+ <PageSection variant="card">
+ <PageSectionHeader>
+ <PageSectionTitle>
+ <Trans
+ i18nKey="authenticationAndSecurity"
+ defaults="Authentication & Security"
+ />
+ </PageSectionTitle>
+ <PageSectionDescription>
+ <Trans
+ i18nKey="authenticationAndSecurityDescription"
+ defaults="Manage authentication and security settings"
+ />
+ </PageSectionDescription>
+ </PageSectionHeader>
+ <PageSectionContent>
+ <InstanceSettingsForm defaultValue={instanceSettings} />
+ </PageSectionContent>
+ </PageSection>
+ </PageSectionGroup>
+ </SettingsPageContent>
+ </SettingsPage>
);
}
diff --git a/apps/web/src/app/[locale]/control-panel/users/page.tsx b/apps/web/src/app/[locale]/control-panel/users/page.tsx
index 578273149..5520ef849 100644
--- a/apps/web/src/app/[locale]/control-panel/users/page.tsx
+++ b/apps/web/src/app/[locale]/control-panel/users/page.tsx
@@ -4,7 +4,13 @@ import { UsersIcon } from "lucide-react";
import type { Metadata } from "next";
import { notFound } from "next/navigation";
import z from "zod";
-import { PageIcon } from "@/app/components/page-icons";
+import {
+ SettingsPage,
+ SettingsPageContent,
+ SettingsPageDescription,
+ SettingsPageHeader,
+ SettingsPageTitle,
+} from "@/app/components/settings-layout";
import { requireUser } from "@/auth/data";
import {
EmptyState,
@@ -12,12 +18,6 @@ import {
EmptyStateIcon,
EmptyStateTitle,
} from "@/components/empty-state";
-import {
- FullWidthLayout,
- FullWidthLayoutContent,
- FullWidthLayoutHeader,
- FullWidthLayoutTitle,
-} from "@/components/full-width-layout";
import { Pagination } from "@/components/pagination";
import { StackedList } from "@/components/stacked-list";
import { Trans } from "@/components/trans";
@@ -121,19 +121,19 @@ export default async function AdminPage(props: {
const totalItems = totalUsers;
return (
- <FullWidthLayout>
- <FullWidthLayoutHeader>
- <FullWidthLayoutTitle
- icon={
- <PageIcon size="sm" color="darkGray">
- <UsersIcon />
- </PageIcon>
- }
- >
+ <SettingsPage>
+ <SettingsPageHeader>
+ <SettingsPageTitle>
<Trans i18nKey="users" defaults="Users" />
- </FullWidthLayoutTitle>
- </FullWidthLayoutHeader>
- <FullWidthLayoutContent>
+ </SettingsPageTitle>
+ <SettingsPageDescription>
+ <Trans
+ i18nKey="usersDescription"
+ defaults="Manage users on this instance"
+ />
+ </SettingsPageDescription>
+ </SettingsPageHeader>
+ <SettingsPageContent>
<div className="space-y-4">
<UserSearchInput />
<UsersTabbedView>
@@ -175,8 +175,8 @@ export default async function AdminPage(props: {
)}
</UsersTabbedView>
</div>
- </FullWidthLayoutContent>
- </FullWidthLayout>
+ </SettingsPageContent>
+ </SettingsPage>
);
}
diff --git a/apps/web/src/components/description-list.tsx b/apps/web/src/components/description-list.tsx
new file mode 100644
index 000000000..1f7360629
--- /dev/null
+++ b/apps/web/src/components/description-list.tsx
@@ -0,0 +1,13 @@
+function DescriptionList({ children }: { children: React.ReactNode }) {
+ return <dl>{children}</dl>;
+}
+
+function DescriptionListTitle({ children }: { children: React.ReactNode }) {
+ return <dt className="mb-1 text-muted-foreground text-xs">{children}</dt>;
+}
+
+function DescriptionListValue({ children }: { children: React.ReactNode }) {
+ return <dd className="mb-4 font-mono text-sm">{children}</dd>;
+}
+
+export { DescriptionList, DescriptionListTitle, DescriptionListValue };
diff --git a/apps/web/src/components/empty-state.tsx b/apps/web/src/components/empty-state.tsx
index cdb5b81a2..0c644bdd2 100644
--- a/apps/web/src/components/empty-state.tsx
+++ b/apps/web/src/components/empty-state.tsx
@@ -22,7 +22,7 @@ export function EmptyState({
export function EmptyStateIcon({ children }: { children: React.ReactNode }) {
return (
- <div className="mb-4 inline-flex rounded-full border bg-linear-to-b from-gray-50 to-white p-4 dark:border-gray-700 dark:from-gray-800 dark:to-gray-700">
+ <div className="mb-4 inline-flex rounded-full border bg-linear-to-b from-gray-50 to-white p-4 dark:border-gray-700 dark:from-gray-900 dark:to-gray-800">
<Icon size="xl" className="opacity-50">
{children}
</Icon>
diff --git a/apps/web/src/components/full-width-layout.tsx b/apps/web/src/components/full-width-layout.tsx
deleted file mode 100644
index 53f4a0e20..000000000
--- a/apps/web/src/components/full-width-layout.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-import { SidebarTrigger } from "@rallly/ui/sidebar";
-
-export function FullWidthLayout({ children }: { children: React.ReactNode }) {
- return <div>{children}</div>;
-}
-
-export function FullWidthLayoutHeader({
- children,
-}: {
- children: React.ReactNode;
-}) {
- return (
- <header className="sticky top-0 z-10 rounded-t-lg border-b bg-background/90 px-3 py-4 backdrop-blur-xs md:px-6">
- <div className="flex items-center gap-4">
- <div className="md:hidden">
- <SidebarTrigger />
- </div>
- <div className="flex-1">{children}</div>
- </div>
- </header>
- );
-}
-
-export function FullWidthLayoutContent({
- children,
-}: {
- children: React.ReactNode;
-}) {
- return <main className="p-3 pb-44 md:px-6 md:pt-6">{children}</main>;
-}
-
-export function FullWidthLayoutTitle({
- children,
- icon,
-}: {
- children: React.ReactNode;
- icon?: React.ReactNode;
-}) {
- return (
- <div className="flex items-center gap-2.5">
- {icon}
- <h1 className="font-bold text-xl">{children}</h1>
- </div>
- );
-}
diff --git a/apps/web/tests/control-panel.spec.ts b/apps/web/tests/control-panel.spec.ts
index 49fd3c157..2a7ad9b76 100644
--- a/apps/web/tests/control-panel.spec.ts
+++ b/apps/web/tests/control-panel.spec.ts
@@ -54,7 +54,7 @@ test.describe
await expect(page).toHaveURL("/control-panel");
await expect(
- page.getByRole("heading", { name: "Control Panel" }),
+ page.getByRole("heading", { name: "Home" }),
).toBeVisible();
});
});
diff --git a/packages/ui/src/label.tsx b/packages/ui/src/label.tsx
index 45e798ac9..a273fcba6 100644
--- a/packages/ui/src/label.tsx
+++ b/packages/ui/src/label.tsx
@@ -8,7 +8,7 @@ import * as React from "react";
import { cn } from "./lib/utils";
const labelVariants = cva(
- "text-muted-foreground text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
+ "text-foreground text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
);
const Label = React.forwardRef<
diff --git a/packages/ui/src/sonner.tsx b/packages/ui/src/sonner.tsx
index 2e5afa6d3..3f657a18e 100644
--- a/packages/ui/src/sonner.tsx
+++ b/packages/ui/src/sonner.tsx
@@ -15,7 +15,7 @@ const Toaster = ({ ...props }: ToasterProps) => {
toastOptions={{
classNames: {
toast:
- "group toast group-[.toaster]:bg-white group-[.toaster]:text-gray-950 group-[.toaster]:border-gray-200 group-[.toaster]:shadow-lg dark:group-[.toaster]:bg-gray-950 dark:group-[.toaster]:text-gray-50 dark:group-[.toaster]:border-gray-800",
+ "group toast group-[.toaster]:bg-popover group-[.toaster]:text-popover-foreground group-[.toaster]:border-popover-border group-[.toaster]:shadow-lg",
description:
"group-[.toast]:text-gray-500 dark:group-[.toast]:text-gray-400",
actionButton: