Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

feat(web): redesign settings navigation and pages

Tin22472e34f493
diff --git a/apps/web/src/components/SettingsSidebar.tsx b/apps/web/src/components/SettingsSidebar.tsx
deleted file mode 100644
index 3eed27919..000000000
--- a/apps/web/src/components/SettingsSidebar.tsx
+++ /dev/null
@@ -1,104 +0,0 @@
-import { useNavigate } from "@tanstack/react-router";
-import { ChevronLeft } from "lucide-react";
-import {
- createContext,
- type ReactElement,
- type ReactNode,
- useContext,
- useMemo,
-} from "react";
-import { useTranslation } from "react-i18next";
-import { Button } from "@/components/ui/button";
-import {
- Sheet,
- SheetDescription,
- SheetHeader,
- SheetPopup,
- SheetTitle,
-} from "@/components/ui/sheet";
-
-type SettingsSidebarContextValue = {
- workspaceId?: string;
- menuOpen: boolean;
- setMenuOpen: (open: boolean) => void;
-};
-
-const SettingsSidebarContext = createContext<SettingsSidebarContextValue>({
- workspaceId: undefined,
- menuOpen: false,
- setMenuOpen: () => {},
-});
-
-export function SettingsSidebarProvider({
- children,
- workspaceId,
- menuOpen,
- setMenuOpen,
-}: {
- children: ReactNode;
- workspaceId?: string;
- menuOpen: boolean;
- setMenuOpen: (open: boolean) => void;
-}): ReactElement {
- const value = useMemo(
- () => ({ workspaceId, menuOpen, setMenuOpen }),
- [workspaceId, menuOpen, setMenuOpen],
- );
-
- return (
- <SettingsSidebarContext.Provider value={value}>
- {children}
- </SettingsSidebarContext.Provider>
- );
-}
-
-export default function SettingsSidebar({
- children,
-}: {
- children: ReactNode;
-}): ReactElement {
- const { t } = useTranslation();
- const navigate = useNavigate();
- const { workspaceId, menuOpen, setMenuOpen } = useContext(
- SettingsSidebarContext,
- );
-
- return (
- <>
- <aside className="hidden w-64 shrink-0 md:block">{children}</aside>
- <Sheet onOpenChange={setMenuOpen} open={menuOpen}>
- <SheetPopup
- side="left"
- className="w-64 bg-sidebar p-0 text-sidebar-foreground md:hidden"
- >
- <SheetHeader className="sr-only">
- <SheetTitle>{t("common:sidebar.title")}</SheetTitle>
- <SheetDescription>
- {t("common:sidebar.mobileDescription")}
- </SheetDescription>
- </SheetHeader>
- <div className="border-b border-sidebar-border p-2 pr-14">
- <Button
- variant="ghost"
- size="sm"
- disabled={!workspaceId}
- className="w-full justify-start text-sm font-normal"
- onClick={() => {
- if (!workspaceId) return;
-
- navigate({
- to: "/dashboard/workspace/$workspaceId",
- params: { workspaceId },
- });
- }}
- >
- <ChevronLeft aria-hidden="true" className="size-4" />
- {t("navigation:page.backToWorkspace")}
- </Button>
- </div>
- {children}
- </SheetPopup>
- </Sheet>
- </>
- );
-}
diff --git a/apps/web/src/components/account/change-password-settings.tsx b/apps/web/src/components/account/change-password-settings.tsx
index ff618fab4..6be423020 100644
--- a/apps/web/src/components/account/change-password-settings.tsx
+++ b/apps/web/src/components/account/change-password-settings.tsx
@@ -22,6 +22,7 @@ import { Input, type InputProps } from "@/components/ui/input";
import useChangePassword from "@/hooks/mutations/use-change-password";
import useListAccounts from "@/hooks/queries/use-list-accounts";
import { toast } from "@/lib/toast";
+import { SettingsSectionHeader } from "@/components/settings/settings-section-header";
type ChangePasswordFormValues = {
currentPassword: string;
@@ -114,17 +115,13 @@ export function ChangePasswordSettings() {
};
return (
- <div className="space-y-6">
- <div className="space-y-1">
- <h2 className="text-md font-medium">
- {t("settings:securityPage.sectionTitle")}
- </h2>
- <p className="text-xs text-muted-foreground">
- {t("settings:securityPage.sectionSubtitle")}
- </p>
- </div>
+ <div className="space-y-3">
+ <SettingsSectionHeader
+ title={t("settings:securityPage.sectionTitle")}
+ description={t("settings:securityPage.sectionSubtitle")}
+ />
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
{isLoading ? (
<div className="flex justify-center py-6">
<Loader2 className="size-4 animate-spin text-muted-foreground" />
diff --git a/apps/web/src/components/account/notification-preferences-settings.tsx b/apps/web/src/components/account/notification-preferences-settings.tsx
index 2d70f990d..693d4e32b 100644
--- a/apps/web/src/components/account/notification-preferences-settings.tsx
+++ b/apps/web/src/components/account/notification-preferences-settings.tsx
@@ -118,7 +118,7 @@ function ChannelCard({
}) {
return (
<div
- className="space-y-4 rounded-md border border-border bg-sidebar p-4"
+ className="space-y-4 rounded-xl border border-border bg-card p-4"
data-channel={channel}
>
<div className="flex items-start justify-between gap-4">
@@ -245,7 +245,7 @@ function WorkspaceRuleCard({
};
return (
- <div className="space-y-4 border border-border rounded-md bg-sidebar p-4">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex items-start justify-between gap-4">
<div className="min-w-0 space-y-1">
<p className="text-sm font-medium">{workspace.name}</p>
@@ -574,7 +574,7 @@ export function NotificationPreferencesSettings() {
return (
<div className="space-y-8">
- <div className="flex flex-col gap-5 rounded-md border bg-sidebar p-4">
+ <div className="flex flex-col gap-5 rounded-xl border border-border bg-card p-4">
<div className="flex flex-col gap-1">
<h2 className="font-medium">
{t("settings:notificationsPage.eventPreferencesTitle")}
diff --git a/apps/web/src/components/account/theme-picker.tsx b/apps/web/src/components/account/theme-picker.tsx
new file mode 100644
index 000000000..5f491e043
--- /dev/null
+++ b/apps/web/src/components/account/theme-picker.tsx
@@ -0,0 +1,65 @@
+import { Radio as RadioPrimitive } from "@base-ui/react/radio";
+import { Check } from "lucide-react";
+import { useTranslation } from "react-i18next";
+import { ThemePreviewWindow } from "@/components/account/theme-preview-window";
+import { RadioGroup } from "@/components/ui/radio-group";
+type Theme = "light" | "dark" | "system";
+
+const THEMES: { value: Theme; labelKey: string }[] = [
+ { value: "light", labelKey: "settings:preferencesPage.themeLight" },
+ { value: "dark", labelKey: "settings:preferencesPage.themeDark" },
+ { value: "system", labelKey: "settings:preferencesPage.themeSystem" },
+];
+
+type ThemePickerProps = {
+ value: Theme;
+ onChange: (theme: Theme) => void;
+};
+
+export function ThemePicker({ value, onChange }: ThemePickerProps) {
+ const { t } = useTranslation();
+
+ return (
+ <RadioGroup
+ value={value}
+ onValueChange={(next) => onChange(next as Theme)}
+ aria-label={t("settings:preferencesPage.theme")}
+ className="grid grid-cols-3 gap-3"
+ >
+ {THEMES.map((theme) => {
+ const checked = theme.value === value;
+
+ return (
+ <label
+ key={theme.value}
+ className="flex cursor-pointer flex-col gap-2"
+ >
+ <RadioPrimitive.Root
+ value={theme.value}
+ aria-label={t(theme.labelKey)}
+ className="h-20 overflow-hidden rounded-lg border border-border outline-none transition-shadow focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-checked:border-foreground data-checked:ring-2 data-checked:ring-foreground/15 sm:h-24"
+ >
+ {theme.value === "system" ? (
+ <span className="grid h-full grid-cols-2">
+ <ThemePreviewWindow tone="light" />
+ <ThemePreviewWindow tone="dark" className="pl-0" />
+ </span>
+ ) : (
+ <ThemePreviewWindow tone={theme.value} />
+ )}
+ </RadioPrimitive.Root>
+ <span
+ aria-hidden="true"
+ className="flex items-center gap-1.5 text-xs text-muted-foreground has-[svg]:font-medium has-[svg]:text-foreground"
+ >
+ {checked ? (
+ <Check aria-hidden="true" className="size-3.5" />
+ ) : null}
+ {t(theme.labelKey)}
+ </span>
+ </label>
+ );
+ })}
+ </RadioGroup>
+ );
+}
diff --git a/apps/web/src/components/account/theme-preview-window.tsx b/apps/web/src/components/account/theme-preview-window.tsx
new file mode 100644
index 000000000..1a53990b3
--- /dev/null
+++ b/apps/web/src/components/account/theme-preview-window.tsx
@@ -0,0 +1,61 @@
+import { cn } from "@/lib/cn";
+
+type ThemePreviewWindowProps = {
+ tone: "light" | "dark";
+ className?: string;
+};
+
+// A tiny sketch of the app frame in a fixed palette, so each option shows
+// its theme regardless of the theme currently applied.
+export function ThemePreviewWindow({
+ tone,
+ className,
+}: ThemePreviewWindowProps) {
+ const dark = tone === "dark";
+
+ return (
+ <span
+ className={cn(
+ "flex h-full pt-2.5 pl-2.5",
+ dark ? "bg-neutral-950" : "bg-neutral-100",
+ className,
+ )}
+ >
+ <span
+ className={cn(
+ "flex flex-1 gap-2 rounded-tl-md border-t border-l p-2.5",
+ dark ? "border-white/10 bg-neutral-900" : "border-black/5 bg-white",
+ )}
+ >
+ <span className="flex w-8 shrink-0 flex-col gap-1.5">
+ <span
+ className={cn(
+ "h-1.5 rounded-full",
+ dark ? "bg-white/25" : "bg-black/15",
+ )}
+ />
+ <span
+ className={cn(
+ "h-1.5 w-6 rounded-full",
+ dark ? "bg-white/10" : "bg-black/5",
+ )}
+ />
+ <span
+ className={cn(
+ "h-1.5 w-7 rounded-full",
+ dark ? "bg-white/10" : "bg-black/5",
+ )}
+ />
+ </span>
+ <span className="flex min-w-0 flex-1 flex-col gap-1.5">
+ <span
+ className={cn("h-5 rounded", dark ? "bg-white/5" : "bg-black/4")}
+ />
+ <span
+ className={cn("h-5 rounded", dark ? "bg-white/5" : "bg-black/4")}
+ />
+ </span>
+ </span>
+ </span>
+ );
+}
diff --git a/apps/web/src/components/admin/user-management-panel.tsx b/apps/web/src/components/admin/user-management-panel.tsx
index 98fe363af..57fc91881 100644
--- a/apps/web/src/components/admin/user-management-panel.tsx
+++ b/apps/web/src/components/admin/user-management-panel.tsx
@@ -81,6 +81,7 @@ import {
hasInstanceAdminRole,
withInstanceAdminRole,
} from "@/lib/instance-admin";
+import { SettingsPage } from "@/components/settings/settings-page";
type PendingAction = {
type: "deactivate" | "reactivate" | "delete";
@@ -222,30 +223,20 @@ function UserManagementPanel() {
};
return (
- <div className="mx-auto flex w-full max-w-6xl flex-col gap-6">
- <header className="flex flex-col gap-2">
- <div className="flex items-center gap-3">
- <div className="flex size-10 items-center justify-center rounded-xl border bg-sidebar text-muted-foreground shadow-xs/5">
- <UsersRoundIcon aria-hidden="true" />
- </div>
- <div className="min-w-0">
- <div className="flex items-center gap-2">
- <h1 className="text-2xl font-semibold tracking-tight">
- {t("settings:adminUsers.title")}
- </h1>
- <Badge variant="outline" size="sm">
- {t("settings:adminUsers.instanceBadge")}
- </Badge>
- </div>
- <p className="text-sm text-muted-foreground">
- {t("settings:adminUsers.subtitle")}
- </p>
- </div>
- </div>
- </header>
-
+ <SettingsPage
+ className="max-w-5xl"
+ title={
+ <span className="flex items-center gap-2">
+ {t("settings:adminUsers.title")}
+ <Badge variant="outline" size="sm">
+ {t("settings:adminUsers.instanceBadge")}
+ </Badge>
+ </span>
+ }
+ description={t("settings:adminUsers.subtitle")}
+ >
<section className="overflow-hidden rounded-xl border bg-card shadow-xs/5">
- <div className="flex flex-col gap-4 border-b bg-sidebar/40 p-4 sm:flex-row sm:items-center sm:justify-between">
+ <div className="flex flex-col gap-4 border-b p-4 sm:flex-row sm:items-center sm:justify-between">
<div className="flex items-center gap-3">
<div>
<h2 className="text-sm font-medium">
@@ -519,7 +510,7 @@ function UserManagementPanel() {
</div>
{!isLoading && !isError ? (
- <div className="flex items-center justify-between gap-4 border-t bg-sidebar/30 px-4 py-3">
+ <div className="flex items-center justify-between gap-4 border-t px-4 py-3">
<p className="text-xs text-muted-foreground tabular-nums">
{t("settings:adminUsers.pagination", {
current: page + 1,
@@ -699,7 +690,7 @@ function UserManagementPanel() {
</AlertDialogFooter>
</AlertDialogPopup>
</AlertDialog>
- </div>
+ </SettingsPage>
);
}
diff --git a/apps/web/src/components/billing/billing-section-header.tsx b/apps/web/src/components/billing/billing-section-header.tsx
deleted file mode 100644
index 0b10a8ca1..000000000
--- a/apps/web/src/components/billing/billing-section-header.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-type BillingSectionHeaderProps = {
- title: string;
- subtitle: string;
-};
-
-export function BillingSectionHeader({
- title,
- subtitle,
-}: BillingSectionHeaderProps) {
- return (
- <div className="space-y-1">
- <h2 className="font-medium text-md">{title}</h2>
- <p className="text-muted-foreground text-xs">{subtitle}</p>
- </div>
- );
-}
diff --git a/apps/web/src/components/billing/founding-free-card.tsx b/apps/web/src/components/billing/founding-free-card.tsx
index 7ded04755..8d5b66e74 100644
--- a/apps/web/src/components/billing/founding-free-card.tsx
+++ b/apps/web/src/components/billing/founding-free-card.tsx
@@ -6,7 +6,7 @@ export function FoundingFreeCard() {
const { t } = useTranslation();
return (
- <div className="overflow-hidden rounded-md border border-primary/30 bg-sidebar">
+ <div className="overflow-hidden rounded-xl border border-primary/30 bg-card">
<div className="flex items-start gap-3 p-5">
<div className="mt-0.5 flex size-9 items-center justify-center rounded-md bg-primary/10 text-primary">
<Sparkles className="size-4.5" />
diff --git a/apps/web/src/components/billing/subscription-card.tsx b/apps/web/src/components/billing/subscription-card.tsx
index 890da145a..91994a3ea 100644
--- a/apps/web/src/components/billing/subscription-card.tsx
+++ b/apps/web/src/components/billing/subscription-card.tsx
@@ -35,7 +35,7 @@ export function SubscriptionCard({
const renews = formatBillingDate(billing.currentPeriodEnd);
return (
- <div className="rounded-md border border-border bg-sidebar">
+ <div className="rounded-xl border border-border bg-card">
<div className="flex flex-wrap items-start justify-between gap-4 p-5">
<div className="space-y-1.5">
<div className="flex items-center gap-2">
diff --git a/apps/web/src/components/billing/trial-status-card.tsx b/apps/web/src/components/billing/trial-status-card.tsx
index 273a18451..c8c85db6a 100644
--- a/apps/web/src/components/billing/trial-status-card.tsx
+++ b/apps/web/src/components/billing/trial-status-card.tsx
@@ -22,7 +22,7 @@ export function TrialStatusCard({ billing }: TrialStatusCardProps) {
return (
<div
className={cn(
- "rounded-md border bg-sidebar p-5",
+ "rounded-xl border border-border bg-card p-5",
expired ? "border-warning/40" : "border-border",
)}
>
diff --git a/apps/web/src/components/icons/discord-icon.tsx b/apps/web/src/components/icons/discord-icon.tsx
new file mode 100644
index 000000000..fe2831329
--- /dev/null
+++ b/apps/web/src/components/icons/discord-icon.tsx
@@ -0,0 +1,16 @@
+import type { SVGProps } from "react";
+
+// lucide-react dropped its brand icons in v1, so the Discord mark lives here.
+export function DiscordIcon(props: SVGProps<SVGSVGElement>) {
+ return (
+ <svg
+ viewBox="0 0 24 24"
+ fill="currentColor"
+ aria-hidden="true"
+ focusable="false"
+ {...props}
+ >
+ <path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z" />
+ </svg>
+ );
+}
diff --git a/apps/web/src/components/icons/gitea-icon.tsx b/apps/web/src/components/icons/gitea-icon.tsx
new file mode 100644
index 000000000..1bb71c213
--- /dev/null
+++ b/apps/web/src/components/icons/gitea-icon.tsx
@@ -0,0 +1,16 @@
+import type { SVGProps } from "react";
+
+// lucide-react dropped its brand icons in v1, so the Gitea teacup lives here.
+export function GiteaIcon(props: SVGProps<SVGSVGElement>) {
+ return (
+ <svg
+ viewBox="0 0 24 24"
+ fill="currentColor"
+ aria-hidden="true"
+ focusable="false"
+ {...props}
+ >
+ <path d="M4.209 4.603c-.247 0-.525.02-.84.088-.333.07-1.28.283-2.054 1.027C-.403 7.25.035 9.685.089 10.052c.065.446.263 1.687 1.21 2.768 1.749 2.141 5.513 2.092 5.513 2.092s.462 1.103 1.168 2.119c.955 1.263 1.936 2.248 2.89 2.367 2.406 0 7.212-.004 7.212-.004s.458.004 1.08-.394c.535-.324 1.013-.893 1.013-.893s.492-.527 1.18-1.73c.21-.37.385-.729.538-1.068 0 0 2.107-4.471 2.107-8.823-.042-1.318-.367-1.55-.443-1.627-.156-.156-.366-.153-.366-.153s-4.475.252-6.792.306c-.508.011-1.012.023-1.512.027v4.474l-.634-.301c0-1.39-.004-4.17-.004-4.17-1.107.016-3.405-.084-3.405-.084s-5.399-.27-5.987-.324c-.187-.011-.401-.032-.648-.032zm.354 1.832h.111s.271 2.269.6 3.597C5.549 11.147 6.22 13 6.22 13s-.996-.119-1.641-.348c-.99-.324-1.409-.714-1.409-.714s-.73-.511-1.096-1.52C1.444 8.73 2.021 7.7 2.021 7.7s.32-.859 1.47-1.145c.395-.106.863-.12 1.072-.12zm8.33 2.554c.26.003.509.127.509.127l.868.422-.529 1.075a.686.686 0 0 0-.614.359.685.685 0 0 0 .072.756l-.939 1.924a.69.69 0 0 0-.66.527.687.687 0 0 0 .347.763.686.686 0 0 0 .867-.206.688.688 0 0 0-.069-.882l.916-1.874a.667.667 0 0 0 .237-.02.657.657 0 0 0 .271-.137 8.826 8.826 0 0 1 1.016.512.761.761 0 0 1 .286.282c.073.21-.073.569-.073.569-.087.29-.702 1.55-.702 1.55a.692.692 0 0 0-.676.477.681.681 0 1 0 1.157-.252c.073-.141.141-.282.214-.431.19-.397.515-1.16.515-1.16.035-.066.218-.394.103-.814-.095-.435-.48-.638-.48-.638-.467-.301-1.116-.58-1.116-.58s0-.156-.042-.27a.688.688 0 0 0-.148-.241l.516-1.062 2.89 1.401s.48.218.583.619c.073.282-.019.534-.069.657-.24.587-2.1 4.317-2.1 4.317s-.232.554-.748.588a1.065 1.065 0 0 1-.393-.045l-.202-.08-4.31-2.1s-.417-.218-.49-.596c-.083-.31.104-.691.104-.691l2.073-4.272s.183-.37.466-.497a.855.855 0 0 1 .35-.077z" />
+ </svg>
+ );
+}
diff --git a/apps/web/src/components/icons/mattermost-icon.tsx b/apps/web/src/components/icons/mattermost-icon.tsx
new file mode 100644
index 000000000..135cf9eaf
--- /dev/null
+++ b/apps/web/src/components/icons/mattermost-icon.tsx
@@ -0,0 +1,16 @@
+import type { SVGProps } from "react";
+
+// lucide-react dropped its brand icons in v1, so the Mattermost mark lives here.
+export function MattermostIcon(props: SVGProps<SVGSVGElement>) {
+ return (
+ <svg
+ viewBox="0 0 24 24"
+ fill="currentColor"
+ aria-hidden="true"
+ focusable="false"
+ {...props}
+ >
+ <path d="M12.081 0C7.048-.034 2.339 3.125.637 8.153c-2.125 6.276 1.24 13.086 7.516 15.21 6.276 2.125 13.086-1.24 15.21-7.516 1.727-5.1-.172-10.552-4.311-13.557l.126 2.547c2.065 2.282 2.88 5.512 1.852 8.549-1.534 4.532-6.594 6.915-11.3 5.321-4.708-1.593-7.28-6.559-5.745-11.092 1.031-3.046 3.655-5.121 6.694-5.67l1.642-1.94A4.87 4.87 0 0 0 12.08 0zm3.528 1.094a.284.284 0 0 0-.123.024l-.004.001a.33.33 0 0 0-.109.071c-.145.142-.657.828-.657.828L13.6 3.4l-1.3 1.585-2.232 2.776s-1.024 1.278-.798 2.851c.226 1.574 1.396 2.34 2.304 2.648.907.307 2.302.408 3.438-.704 1.135-1.112 1.098-2.75 1.098-2.75l-.087-3.56-.07-2.05-.047-1.775s.01-.856-.02-1.057a.33.33 0 0 0-.035-.107l-.006-.012-.007-.011a.277.277 0 0 0-.229-.14z" />
+ </svg>
+ );
+}
diff --git a/apps/web/src/components/icons/slack-icon.tsx b/apps/web/src/components/icons/slack-icon.tsx
new file mode 100644
index 000000000..b870232f5
--- /dev/null
+++ b/apps/web/src/components/icons/slack-icon.tsx
@@ -0,0 +1,26 @@
+import type { SVGProps } from "react";
+
+// Slack's mark is defined by its four brand colors, so unlike the other brand
+// icons it does not follow currentColor.
+export function SlackIcon(props: SVGProps<SVGSVGElement>) {
+ return (
+ <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false" {...props}>
+ <path
+ fill="#E01E5A"
+ d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313z"
+ />
+ <path
+ fill="#36C5F0"
+ d="M8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312z"
+ />
+ <path
+ fill="#2EB67D"
+ d="M18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.268 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312z"
+ />
+ <path
+ fill="#ECB22E"
+ d="M15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.268a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"
+ />
+ </svg>
+ );
+}
diff --git a/apps/web/src/components/icons/telegram-icon.tsx b/apps/web/src/components/icons/telegram-icon.tsx
new file mode 100644
index 000000000..8ffbcb1ae
--- /dev/null
+++ b/apps/web/src/components/icons/telegram-icon.tsx
@@ -0,0 +1,16 @@
+import type { SVGProps } from "react";
+
+// lucide-react dropped its brand icons in v1, so the Telegram mark lives here.
+export function TelegramIcon(props: SVGProps<SVGSVGElement>) {
+ return (
+ <svg
+ viewBox="0 0 24 24"
+ fill="currentColor"
+ aria-hidden="true"
+ focusable="false"
+ {...props}
+ >
+ <path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z" />
+ </svg>
+ );
+}
diff --git a/apps/web/src/components/project/custom-field-editor.tsx b/apps/web/src/components/project/custom-field-editor.tsx
index 03315c978..1de97dc1b 100644
--- a/apps/web/src/components/project/custom-field-editor.tsx
+++ b/apps/web/src/components/project/custom-field-editor.tsx
@@ -393,7 +393,7 @@ export default function CustomFieldEditor({
{t("settings:customFields.loading")}
</div>
) : fieldsToRender.length === 0 ? (
- <div className="text-sm text-muted-foreground border border-border rounded-md bg-sidebar p-4">
+ <div className="text-sm text-muted-foreground rounded-xl border border-border bg-card p-4">
{t("settings:customFields.empty")}
</div>
) : (
diff --git a/apps/web/src/components/project/discord-integration-settings.tsx b/apps/web/src/components/project/discord-integration-settings.tsx
index b777956db..b73c09c31 100644
--- a/apps/web/src/components/project/discord-integration-settings.tsx
+++ b/apps/web/src/components/project/discord-integration-settings.tsx
@@ -260,12 +260,12 @@ export function DiscordIntegrationSettings({
if (isLoading) {
return (
<div className="space-y-4">
- <div className="space-y-4 rounded-md border border-border bg-sidebar p-4">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="h-4 w-40 animate-pulse rounded bg-muted" />
<div className="h-10 w-full animate-pulse rounded bg-muted" />
<div className="h-10 w-full animate-pulse rounded bg-muted" />
</div>
- <div className="space-y-4 rounded-md border border-border bg-sidebar p-4">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="h-4 w-40 animate-pulse rounded bg-muted" />
<div className="h-10 w-full animate-pulse rounded bg-muted" />
<div className="h-10 w-full animate-pulse rounded bg-muted" />
@@ -278,7 +278,7 @@ export function DiscordIntegrationSettings({
<div className="space-y-4">
<Form {...form}>
<form className="space-y-4" onSubmit={form.handleSubmit(onSubmit)}>
- <div className="space-y-4 rounded-md border border-border bg-sidebar p-4">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex items-start justify-between gap-4">
<div className="space-y-1">
<div className="flex items-center gap-2">
@@ -361,7 +361,7 @@ export function DiscordIntegrationSettings({
/>
</div>
- <div className="space-y-3 rounded-md border border-border bg-sidebar p-4">
+ <div className="space-y-3 rounded-xl border border-border bg-card p-4">
<div>
<h3 className="font-medium">
{t("settings:discordIntegration.eventsTitle")}
diff --git a/apps/web/src/components/project/generic-webhook-integration-settings.tsx b/apps/web/src/components/project/generic-webhook-integration-settings.tsx
index 3c474c608..5430cacb9 100644
--- a/apps/web/src/components/project/generic-webhook-integration-settings.tsx
+++ b/apps/web/src/components/project/generic-webhook-integration-settings.tsx
@@ -296,7 +296,7 @@ export function GenericWebhookIntegrationSettings({
if (isLoading) {
return (
<div className="space-y-4">
- <div className="space-y-4 rounded-md border border-border bg-sidebar p-4">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="h-4 w-40 animate-pulse rounded bg-muted" />
<div className="h-10 w-full animate-pulse rounded bg-muted" />
<div className="h-10 w-full animate-pulse rounded bg-muted" />
@@ -309,7 +309,7 @@ export function GenericWebhookIntegrationSettings({
<div className="space-y-4">
<Form {...form}>
<form className="space-y-4" onSubmit={form.handleSubmit(onSubmit)}>
- <div className="space-y-4 rounded-md border border-border bg-sidebar p-4">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex items-start justify-between gap-4">
<div className="space-y-1">
<h3 className="font-medium">
@@ -397,7 +397,7 @@ export function GenericWebhookIntegrationSettings({
/>
</div>
- <div className="space-y-3 rounded-md border border-border bg-sidebar p-4">
+ <div className="space-y-3 rounded-xl border border-border bg-card p-4">
<div>
<h3 className="font-medium">
{t("settings:genericWebhookIntegration.eventsTitle")}
diff --git a/apps/web/src/components/project/gitea-integration-settings.tsx b/apps/web/src/components/project/gitea-integration-settings.tsx
index e669cbf93..912771b54 100644
--- a/apps/web/src/components/project/gitea-integration-settings.tsx
+++ b/apps/web/src/components/project/gitea-integration-settings.tsx
@@ -411,7 +411,7 @@ export function GiteaIntegrationSettings({ projectId }: { projectId: string }) {
if (integrationError) {
return (
- <div className="space-y-4 border border-destructive/25 rounded-md p-4 bg-sidebar">
+ <div className="space-y-4 rounded-xl border border-destructive/25 bg-card p-4">
<div className="flex items-start justify-between gap-4">
<div className="space-y-1">
<p className="text-sm font-medium text-destructive">
@@ -459,7 +459,7 @@ export function GiteaIntegrationSettings({ projectId }: { projectId: string }) {
return (
<div className="space-y-4">
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex items-center justify-between">
<div className="space-y-0.5">
<p className="text-sm font-medium">
@@ -606,7 +606,7 @@ export function GiteaIntegrationSettings({ projectId }: { projectId: string }) {
)}
</div>
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">
<FormField
@@ -846,7 +846,7 @@ export function GiteaIntegrationSettings({ projectId }: { projectId: string }) {
</div>
{isConnected && (
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex items-center justify-between">
<div className="space-y-0.5">
<p className="text-sm font-medium">
diff --git a/apps/web/src/components/project/github-integration-settings.tsx b/apps/web/src/components/project/github-integration-settings.tsx
index be329a32c..59a68bb4d 100644
--- a/apps/web/src/components/project/github-integration-settings.tsx
+++ b/apps/web/src/components/project/github-integration-settings.tsx
@@ -283,14 +283,14 @@ export function GitHubIntegrationSettings({
if (isLoading) {
return (
<div className="space-y-4">
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="space-y-4">
<div className="h-4 bg-muted rounded animate-pulse w-40" />
<div className="h-4 bg-muted rounded animate-pulse w-full" />
<div className="h-10 bg-muted rounded animate-pulse w-full" />
</div>
</div>
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="space-y-4">
<div className="h-4 bg-muted rounded animate-pulse w-40" />
<div className="h-10 bg-muted rounded animate-pulse w-full" />
@@ -310,7 +310,7 @@ export function GitHubIntegrationSettings({
return (
<div className="space-y-4">
{appInfo && !appInfo.accountConnected && (
- <div className="space-y-3 rounded-md border border-border bg-sidebar p-4">
+ <div className="space-y-3 rounded-xl border border-border bg-card p-4">
<p className="text-sm">
{t("settings:githubIntegration.accountVerificationHint")}
</p>
@@ -339,7 +339,7 @@ export function GitHubIntegrationSettings({
{t("settings:githubIntegration.reverifyHint")}
</p>
)}
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex items-center justify-between">
<div className="space-y-0.5">
<p className="text-sm font-medium">
@@ -482,7 +482,7 @@ export function GitHubIntegrationSettings({
</>
)}
</div>
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">
<FormField
@@ -721,7 +721,7 @@ export function GitHubIntegrationSettings({
</div>
{isConnected && (
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex items-center justify-between">
<div className="space-y-0.5">
<p className="text-sm font-medium">
diff --git a/apps/web/src/components/project/gitlab-integration-settings.tsx b/apps/web/src/components/project/gitlab-integration-settings.tsx
index 0c786ab4e..30cced77f 100644
--- a/apps/web/src/components/project/gitlab-integration-settings.tsx
+++ b/apps/web/src/components/project/gitlab-integration-settings.tsx
@@ -415,7 +415,7 @@ export function GitlabIntegrationSettings({
if (integrationError) {
return (
- <div className="space-y-4 border border-destructive/25 rounded-md p-4 bg-sidebar">
+ <div className="space-y-4 rounded-xl border border-destructive/25 bg-card p-4">
<div className="flex items-start justify-between gap-4">
<div className="space-y-1">
<p className="text-sm font-medium text-destructive">
@@ -457,7 +457,7 @@ export function GitlabIntegrationSettings({
return (
<div className="space-y-4">
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex items-center justify-between">
<div className="space-y-0.5">
<p className="text-sm font-medium">
@@ -605,7 +605,7 @@ export function GitlabIntegrationSettings({
)}
</div>
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">
<FormField
@@ -861,7 +861,7 @@ export function GitlabIntegrationSettings({
</div>
{isConnected && (
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex items-center justify-between">
<div className="space-y-0.5">
<p className="text-sm font-medium">
diff --git a/apps/web/src/components/project/integrations/get-integration-status.test.ts b/apps/web/src/components/project/integrations/get-integration-status.test.ts
new file mode 100644
index 000000000..012fb9518
--- /dev/null
+++ b/apps/web/src/components/project/integrations/get-integration-status.test.ts
@@ -0,0 +1,44 @@
+import { describe, expect, it } from "vite-plus/test";
+import {
+ formatChannel,
+ formatRepository,
+ getIntegrationStatus,
+} from "@/components/project/integrations/get-integration-status";
+
+describe("getIntegrationStatus", () => {
+ it("is disconnected until the integration is configured", () => {
+ expect(
+ getIntegrationStatus({ configured: false, isActive: true, detail: "x" }),
+ ).toEqual({ state: "disconnected" });
+ });
+
+ it("is paused when configured but switched off", () => {
+ expect(
+ getIntegrationStatus({ configured: true, isActive: false }).state,
+ ).toBe("paused");
+ });
+
+ it("is connected when configured and not switched off", () => {
+ expect(
+ getIntegrationStatus({
+ configured: true,
+ isActive: true,
+ detail: " acme/web ",
+ }),
+ ).toEqual({ state: "connected", detail: "acme/web" });
+ expect(getIntegrationStatus({ configured: true }).state).toBe("connected");
+ });
+});
+
+describe("integration detail formatting", () => {
+ it("joins repository owner and name", () => {
+ expect(formatRepository("acme", "web")).toBe("acme/web");
+ expect(formatRepository("acme", null)).toBeUndefined();
+ });
+
+ it("prefixes channels with a single #", () => {
+ expect(formatChannel("general")).toBe("#general");
+ expect(formatChannel("#general")).toBe("#general");
+ expect(formatChannel(" ")).toBeUndefined();
+ });
+});
diff --git a/apps/web/src/components/project/integrations/get-integration-status.ts b/apps/web/src/components/project/integrations/get-integration-status.ts
new file mode 100644
index 000000000..54a47bcb9
--- /dev/null
+++ b/apps/web/src/components/project/integrations/get-integration-status.ts
@@ -0,0 +1,37 @@
+export type IntegrationState = "connected" | "paused" | "disconnected";
+
+export type IntegrationStatus = {
+ state: IntegrationState;
+ detail?: string;
+};
+
+type IntegrationStatusInput = {
+ configured: boolean;
+ isActive?: boolean | null;
+ detail?: string | null;
+};
+
+export function getIntegrationStatus({
+ configured,
+ isActive,
+ detail,
+}: IntegrationStatusInput): IntegrationStatus {
+ if (!configured) return { state: "disconnected" };
+
+ return {
+ state: isActive === false ? "paused" : "connected",
+ detail: detail?.trim() || undefined,
+ };
+}
+
+export function formatRepository(
+ owner: string | null | undefined,
+ name: string | null | undefined,
+) {
+ return owner && name ? `${owner}/${name}` : undefined;
+}
+
+export function formatChannel(channel: string | null | undefined) {
+ const trimmed = channel?.trim().replace(/^#/, "");
+ return trimmed ? `#${trimmed}` : undefined;
+}
diff --git a/apps/web/src/components/project/integrations/integration-definitions.tsx b/apps/web/src/components/project/integrations/integration-definitions.tsx
new file mode 100644
index 000000000..90ee51f70
--- /dev/null
+++ b/apps/web/src/components/project/integrations/integration-definitions.tsx
@@ -0,0 +1,114 @@
+import { Webhook } from "lucide-react";
+import type { ComponentType, SVGProps } from "react";
+import { DiscordIcon } from "@/components/icons/discord-icon";
+import { GiteaIcon } from "@/components/icons/gitea-icon";
+import { GithubIcon } from "@/components/icons/github-icon";
+import { GitlabIcon } from "@/components/icons/gitlab-icon";
+import { MattermostIcon } from "@/components/icons/mattermost-icon";
+import { SlackIcon } from "@/components/icons/slack-icon";
+import { TelegramIcon } from "@/components/icons/telegram-icon";
+import { DiscordIntegrationSettings } from "@/components/project/discord-integration-settings";
+import { GenericWebhookIntegrationSettings } from "@/components/project/generic-webhook-integration-settings";
+import { GiteaIntegrationSettings } from "@/components/project/gitea-integration-settings";
+import { GitHubIntegrationSettings } from "@/components/project/github-integration-settings";
+import { GitlabIntegrationSettings } from "@/components/project/gitlab-integration-settings";
+import { MattermostIntegrationSettings } from "@/components/project/mattermost-integration-settings";
+import { SlackIntegrationSettings } from "@/components/project/slack-integration-settings";
+import { TelegramIntegrationSettings } from "@/components/project/telegram-integration-settings";
+
+export type IntegrationId =
+ | "github"
+ | "gitea"
+ | "gitlab"
+ | "slack"
+ | "discord"
+ | "mattermost"
+ | "telegram"
+ | "webhook";
+
+export type IntegrationDefinition = {
+ id: IntegrationId;
+ category: "code" | "chat";
+ // Product names stay untranslated; only the generic webhook needs a key.
+ name: string | { key: string };
+ descriptionKey: string;
+ icon: ComponentType<SVGProps<SVGSVGElement>>;
+ iconClassName: string;
+ Settings: ComponentType<{ projectId: string }>;
+};
+
+export const INTEGRATIONS: IntegrationDefinition[] = [
+ {
+ id: "github",
+ category: "code",
+ name: "GitHub",
+ descriptionKey: "settings:projectIntegrations.githubSectionSubtitle",
+ icon: GithubIcon,
+ iconClassName: "text-foreground",
+ Settings: GitHubIntegrationSettings,
+ },
+ {
+ id: "gitea",
+ category: "code",
+ name: "Gitea",
+ descriptionKey: "settings:projectIntegrations.giteaSectionSubtitle",
+ icon: GiteaIcon,
+ iconClassName: "text-[#609926]",
+ Settings: GiteaIntegrationSettings,
+ },
+ {
+ id: "gitlab",
+ category: "code",
+ name: "GitLab",
+ descriptionKey: "settings:projectIntegrations.gitlabSectionSubtitle",
+ icon: GitlabIcon,
+ iconClassName: "text-[#FC6D26]",
+ Settings: GitlabIntegrationSettings,
+ },
+ {
+ id: "slack",
+ category: "chat",
+ name: "Slack",
+ descriptionKey: "settings:projectIntegrations.slackSectionSubtitle",
+ icon: SlackIcon,
+ iconClassName: "",
+ Settings: SlackIntegrationSettings,
+ },
+ {
+ id: "discord",
+ category: "chat",
+ name: "Discord",
+ descriptionKey: "settings:projectIntegrations.discordSectionSubtitle",
+ icon: DiscordIcon,
+ iconClassName: "text-[#5865F2]",
+ Settings: DiscordIntegrationSettings,
+ },
+ {
+ id: "mattermost",
+ category: "chat",
+ name: "Mattermost",
+ descriptionKey: "settings:projectIntegrations.mattermostSectionSubtitle",
+ icon: MattermostIcon,
+ iconClassName: "text-[#0058CC] dark:text-[#5C9DFF]",
+ Settings: MattermostIntegrationSettings,
+ },
+ {
+ id: "telegram",
+ category: "chat",
+ name: "Telegram",
+ descriptionKey: "settings:projectIntegrations.telegramSectionSubtitle",
+ icon: TelegramIcon,
+ iconClassName: "text-[#26A5E4]",
+ Settings: TelegramIntegrationSettings,
+ },
+ {
+ id: "webhook",
+ category: "chat",
+ name: { key: "settings:projectIntegrations.genericWebhookSectionTitle" },
+ descriptionKey:
+ "settings:projectIntegrations.genericWebhookSectionSubtitle",
+ icon: Webhook,
+ iconClassName: "text-muted-foreground",
+ Settings: GenericWebhookIntegrationSettings,
+ },
+];
diff --git a/apps/web/src/components/project/integrations/integration-row.tsx b/apps/web/src/components/project/integrations/integration-row.tsx
new file mode 100644
index 000000000..de861f116
--- /dev/null
+++ b/apps/web/src/components/project/integrations/integration-row.tsx
@@ -0,0 +1,79 @@
+import { useState } from "react";
+import { useTranslation } from "react-i18next";
+import type { IntegrationStatus } from "@/components/project/integrations/get-integration-status";
+import type { IntegrationDefinition } from "@/components/project/integrations/integration-definitions";
+import { IntegrationStatusBadge } from "@/components/project/integrations/integration-status-badge";
+import { buttonVariants } from "@/components/ui/button";
+import {
+ Collapsible,
+ CollapsiblePanel,
+ CollapsibleTrigger,
+} from "@/components/ui/collapsible";
+import { cn } from "@/lib/cn";
+
+type IntegrationRowProps = {
+ integration: IntegrationDefinition;
+ projectId: string;
+ status: IntegrationStatus | undefined;
+};
+
+export function IntegrationRow({
+ integration,
+ projectId,
+ status,
+}: IntegrationRowProps) {
+ const { t } = useTranslation();
+ const [open, setOpen] = useState(false);
+ const name =
+ typeof integration.name === "string"
+ ? integration.name
+ : t(integration.name.key);
+ const state = status?.state ?? "disconnected";
+ const isSetUp = state !== "disconnected";
+
+ return (
+ <Collapsible open={open} onOpenChange={setOpen}>
+ <div className="flex items-center gap-3.5 px-4 py-3.5">
+ <span className="flex size-8 shrink-0 items-center justify-center rounded-lg border border-border bg-background">
+ <integration.icon
+ aria-hidden="true"
+ className={cn("size-4", integration.iconClassName)}
+ />
+ </span>
+ <div className="min-w-0 flex-1 space-y-0.5">
+ <div className="flex items-center gap-2">
+ <p className="truncate text-sm font-medium">{name}</p>
+ <IntegrationStatusBadge state={state} />
+ </div>
+ {isSetUp && status?.detail ? (
+ <p className="truncate font-mono text-xs text-muted-foreground">
+ {status.detail}
+ </p>
+ ) : (
+ <p className="line-clamp-2 text-xs text-muted-foreground">
+ {t(integration.descriptionKey)}
+ </p>
+ )}
+ </div>
+ <CollapsibleTrigger
+ className={buttonVariants({
+ variant: "outline",
+ size: "sm",
+ className: "w-24 shrink-0",
+ })}
+ >
+ {open
+ ? t("settings:projectIntegrations.done")
+ : isSetUp
+ ? t("settings:projectIntegrations.configure")
+ : t("settings:projectIntegrations.connect")}
+ </CollapsibleTrigger>
+ </div>
+ <CollapsiblePanel>
+ <div className="border-t border-border bg-muted/40 p-4">
+ <integration.Settings projectId={projectId} />
+ </div>
+ </CollapsiblePanel>
+ </Collapsible>
+ );
+}
diff --git a/apps/web/src/components/project/integrations/integration-status-badge.tsx b/apps/web/src/components/project/integrations/integration-status-badge.tsx
new file mode 100644
index 000000000..ebe121cc3
--- /dev/null
+++ b/apps/web/src/components/project/integrations/integration-status-badge.tsx
@@ -0,0 +1,37 @@
+import { useTranslation } from "react-i18next";
+import type { IntegrationState } from "@/components/project/integrations/get-integration-status";
+import { cn } from "@/lib/cn";
+
+type IntegrationStatusBadgeProps = {
+ state: IntegrationState;
+};
+
+export function IntegrationStatusBadge({ state }: IntegrationStatusBadgeProps) {
+ const { t } = useTranslation();
+
+ if (state === "disconnected") return null;
+
+ const connected = state === "connected";
+
+ return (
+ <span
+ className={cn(
+ "inline-flex h-5 shrink-0 items-center gap-1.5 rounded-full px-2 text-xs font-medium",
+ connected
+ ? "bg-success/10 text-success-foreground"
+ : "bg-warning/10 text-warning-foreground",
+ )}
+ >
+ <span
+ aria-hidden="true"
+ className={cn(
+ "size-1.5 rounded-full",
+ connected ? "bg-success" : "bg-warning",
+ )}
+ />
+ {connected
+ ? t("settings:projectIntegrations.statusConnected")
+ : t("settings:projectIntegrations.statusPaused")}
+ </span>
+ );
+}
diff --git a/apps/web/src/components/project/integrations/integrations-group.tsx b/apps/web/src/components/project/integrations/integrations-group.tsx
new file mode 100644
index 000000000..039d3838b
--- /dev/null
+++ b/apps/web/src/components/project/integrations/integrations-group.tsx
@@ -0,0 +1,37 @@
+import type { IntegrationStatus } from "@/components/project/integrations/get-integration-status";
+import type {
+ IntegrationDefinition,
+ IntegrationId,
+} from "@/components/project/integrations/integration-definitions";
+import { IntegrationRow } from "@/components/project/integrations/integration-row";
+import { SettingsSectionHeader } from "@/components/settings/settings-section-header";
+
+type IntegrationsGroupProps = {
+ title: string;
+ integrations: IntegrationDefinition[];
+ projectId: string;
+ statuses: Partial<Record<IntegrationId, IntegrationStatus>>;
+};
+
+export function IntegrationsGroup({
+ title,
+ integrations,
+ projectId,
+ statuses,
+}: IntegrationsGroupProps) {
+ return (
+ <section className="space-y-3">
+ <SettingsSectionHeader title={title} />
+ <div className="divide-y divide-border overflow-hidden rounded-xl border border-border bg-card">
+ {integrations.map((integration) => (
+ <IntegrationRow
+ key={integration.id}
+ integration={integration}
+ projectId={projectId}
+ status={statuses[integration.id]}
+ />
+ ))}
+ </div>
+ </section>
+ );
+}
diff --git a/apps/web/src/components/project/integrations/use-integration-statuses.ts b/apps/web/src/components/project/integrations/use-integration-statuses.ts
new file mode 100644
index 000000000..1dff81aa9
--- /dev/null
+++ b/apps/web/src/components/project/integrations/use-integration-statuses.ts
@@ -0,0 +1,76 @@
+import {
+ formatChannel,
+ formatRepository,
+ getIntegrationStatus,
+ type IntegrationStatus,
+} from "@/components/project/integrations/get-integration-status";
+import type { IntegrationId } from "@/components/project/integrations/integration-definitions";
+import useGetDiscordIntegration from "@/hooks/queries/discord-integration/use-get-discord-integration";
+import useGetGenericWebhookIntegration from "@/hooks/queries/generic-webhook-integration/use-get-generic-webhook-integration";
+import useGetGiteaIntegration from "@/hooks/queries/gitea-integration/use-get-gitea-integration";
+import useGetGithubIntegration from "@/hooks/queries/github-integration/use-get-github-integration";
+import useGetGitlabIntegration from "@/hooks/queries/gitlab-integration/use-get-gitlab-integration";
+import useGetMattermostIntegration from "@/hooks/queries/mattermost-integration/use-get-mattermost-integration";
+import useGetSlackIntegration from "@/hooks/queries/slack-integration/use-get-slack-integration";
+import useGetTelegramIntegration from "@/hooks/queries/telegram-integration/use-get-telegram-integration";
+
+// Shares query keys with the per-integration settings panels, so opening a
+// panel reuses what the list already loaded.
+export function useIntegrationStatuses(
+ projectId: string,
+ enabled: boolean,
+): Partial<Record<IntegrationId, IntegrationStatus>> {
+ const options = { enabled };
+ const { data: github } = useGetGithubIntegration(projectId, options);
+ const { data: gitea } = useGetGiteaIntegration(projectId, options);
+ const { data: gitlab } = useGetGitlabIntegration(projectId, options);
+ const { data: slack } = useGetSlackIntegration(projectId, options);
+ const { data: discord } = useGetDiscordIntegration(projectId, options);
+ const { data: mattermost } = useGetMattermostIntegration(projectId, options);
+ const { data: telegram } = useGetTelegramIntegration(projectId, options);
+ const { data: webhook } = useGetGenericWebhookIntegration(projectId, options);
+
+ if (!enabled) return {};
+
+ return {
+ github: getIntegrationStatus({
+ configured: Boolean(github),
+ isActive: github?.isActive,
+ detail: formatRepository(github?.repositoryOwner, github?.repositoryName),
+ }),
+ gitea: getIntegrationStatus({
+ configured: Boolean(gitea),
+ isActive: gitea?.isActive,
+ detail: formatRepository(gitea?.repositoryOwner, gitea?.repositoryName),
+ }),
+ gitlab: getIntegrationStatus({
+ configured: Boolean(gitlab),
+ isActive: gitlab?.isActive,
+ detail: gitlab?.projectPath,
+ }),
+ slack: getIntegrationStatus({
+ configured: Boolean(slack?.webhookConfigured),
+ isActive: slack?.isActive,
+ detail: formatChannel(slack?.channelName),
+ }),
+ discord: getIntegrationStatus({
+ configured: Boolean(discord?.webhookConfigured),
+ isActive: discord?.isActive,
+ detail: formatChannel(discord?.channelName),
+ }),
+ mattermost: getIntegrationStatus({
+ configured: Boolean(mattermost?.webhookConfigured),
+ isActive: mattermost?.isActive,
+ detail: formatChannel(mattermost?.channelName),
+ }),
+ telegram: getIntegrationStatus({
+ configured: Boolean(telegram?.botTokenConfigured),
+ isActive: telegram?.isActive,
+ detail: telegram?.chatLabel,
+ }),
+ webhook: getIntegrationStatus({
+ configured: Boolean(webhook?.webhookConfigured),
+ isActive: webhook?.isActive,
+ }),
+ };
+}
diff --git a/apps/web/src/components/project/mattermost-integration-settings.tsx b/apps/web/src/components/project/mattermost-integration-settings.tsx
index 325611682..0d288b525 100644
--- a/apps/web/src/components/project/mattermost-integration-settings.tsx
+++ b/apps/web/src/components/project/mattermost-integration-settings.tsx
@@ -266,12 +266,12 @@ export function MattermostIntegrationSettings({
if (isLoading) {
return (
<div className="space-y-4">
- <div className="space-y-4 rounded-md border border-border bg-sidebar p-4">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="h-4 w-40 animate-pulse rounded bg-muted" />
<div className="h-10 w-full animate-pulse rounded bg-muted" />
<div className="h-10 w-full animate-pulse rounded bg-muted" />
</div>
- <div className="space-y-4 rounded-md border border-border bg-sidebar p-4">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="h-4 w-40 animate-pulse rounded bg-muted" />
<div className="h-10 w-full animate-pulse rounded bg-muted" />
<div className="h-10 w-full animate-pulse rounded bg-muted" />
@@ -284,7 +284,7 @@ export function MattermostIntegrationSettings({
<div className="space-y-4">
<Form {...form}>
<form className="space-y-4" onSubmit={form.handleSubmit(onSubmit)}>
- <div className="space-y-4 rounded-md border border-border bg-sidebar p-4">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex items-start justify-between gap-4">
<div className="space-y-1">
<div className="flex items-center gap-2">
@@ -367,7 +367,7 @@ export function MattermostIntegrationSettings({
/>
</div>
- <div className="space-y-3 rounded-md border border-border bg-sidebar p-4">
+ <div className="space-y-3 rounded-xl border border-border bg-card p-4">
<div>
<h3 className="font-medium">
{t("settings:mattermostIntegration.eventsTitle")}
diff --git a/apps/web/src/components/project/slack-integration-settings.tsx b/apps/web/src/components/project/slack-integration-settings.tsx
index 731d6fb0b..59184b5b6 100644
--- a/apps/web/src/components/project/slack-integration-settings.tsx
+++ b/apps/web/src/components/project/slack-integration-settings.tsx
@@ -253,12 +253,12 @@ export function SlackIntegrationSettings({ projectId }: { projectId: string }) {
if (isLoading) {
return (
<div className="space-y-4">
- <div className="space-y-4 rounded-md border border-border bg-sidebar p-4">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="h-4 w-40 animate-pulse rounded bg-muted" />
<div className="h-10 w-full animate-pulse rounded bg-muted" />
<div className="h-10 w-full animate-pulse rounded bg-muted" />
</div>
- <div className="space-y-4 rounded-md border border-border bg-sidebar p-4">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="h-4 w-40 animate-pulse rounded bg-muted" />
<div className="h-10 w-full animate-pulse rounded bg-muted" />
<div className="h-10 w-full animate-pulse rounded bg-muted" />
@@ -271,7 +271,7 @@ export function SlackIntegrationSettings({ projectId }: { projectId: string }) {
<div className="space-y-4">
<Form {...form}>
<form className="space-y-4" onSubmit={form.handleSubmit(onSubmit)}>
- <div className="space-y-4 rounded-md border border-border bg-sidebar p-4">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex items-start justify-between gap-4">
<div className="space-y-1">
<div className="flex items-center gap-2">
@@ -354,7 +354,7 @@ export function SlackIntegrationSettings({ projectId }: { projectId: string }) {
/>
</div>
- <div className="space-y-3 rounded-md border border-border bg-sidebar p-4">
+ <div className="space-y-3 rounded-xl border border-border bg-card p-4">
<div>
<h3 className="font-medium">
{t("settings:slackIntegration.eventsTitle")}
diff --git a/apps/web/src/components/project/telegram-integration-settings.tsx b/apps/web/src/components/project/telegram-integration-settings.tsx
index 5813d6abb..2eb99d3f9 100644
--- a/apps/web/src/components/project/telegram-integration-settings.tsx
+++ b/apps/web/src/components/project/telegram-integration-settings.tsx
@@ -313,12 +313,12 @@ export function TelegramIntegrationSettings({
if (isLoading) {
return (
<div className="space-y-4">
- <div className="space-y-4 rounded-md border border-border bg-sidebar p-4">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="h-4 w-40 animate-pulse rounded bg-muted" />
<div className="h-10 w-full animate-pulse rounded bg-muted" />
<div className="h-10 w-full animate-pulse rounded bg-muted" />
</div>
- <div className="space-y-4 rounded-md border border-border bg-sidebar p-4">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="h-4 w-40 animate-pulse rounded bg-muted" />
<div className="h-10 w-full animate-pulse rounded bg-muted" />
<div className="h-10 w-full animate-pulse rounded bg-muted" />
@@ -335,7 +335,7 @@ export function TelegramIntegrationSettings({
<div className="space-y-4">
<Form {...form}>
<form className="space-y-4" onSubmit={form.handleSubmit(onSubmit)}>
- <div className="space-y-4 rounded-md border border-border bg-sidebar p-4">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex items-start justify-between gap-4">
<div className="space-y-1">
<div className="flex items-center gap-2">
@@ -472,7 +472,7 @@ export function TelegramIntegrationSettings({
/>
</div>
- <div className="space-y-3 rounded-md border border-border bg-sidebar p-4">
+ <div className="space-y-3 rounded-xl border border-border bg-card p-4">
<div>
<h3 className="font-medium">
{t("settings:telegramIntegration.eventsTitle")}
diff --git a/apps/web/src/components/settings-layout.tsx b/apps/web/src/components/settings-layout.tsx
deleted file mode 100644
index 6d36661fe..000000000
--- a/apps/web/src/components/settings-layout.tsx
+++ /dev/null
@@ -1,192 +0,0 @@
-import { useNavigate } from "@tanstack/react-router";
-import { AlertTriangle, ArrowLeft } from "lucide-react";
-import type { ReactNode } from "react";
-import { useTranslation } from "react-i18next";
-import Layout from "@/components/common/layout";
-import {
- Breadcrumb,
- BreadcrumbItem,
- BreadcrumbLink,
- BreadcrumbList,
- BreadcrumbSeparator,
-} from "@/components/ui/breadcrumb";
-import { Button } from "@/components/ui/button";
-import { KbdSequence } from "@/components/ui/kbd";
-import { Separator } from "@/components/ui/separator";
-import { SidebarTrigger } from "@/components/ui/sidebar";
-import {
- Tooltip,
- TooltipContent,
- TooltipProvider,
- TooltipTrigger,
-} from "@/components/ui/tooltip";
-import { shortcuts } from "@/constants/shortcuts";
-import { cn } from "@/lib/cn";
-
-type SettingsLayoutProps = {
- title: string;
- description?: string;
- icon?: ReactNode;
- backPath?: string;
- backLabel?: string;
- children: ReactNode;
- className?: string;
-};
-
-export function SettingsLayout({
- title,
- description,
- backPath,
- backLabel,
- children,
- className,
-}: SettingsLayoutProps) {
- const { t } = useTranslation();
- const navigate = useNavigate();
- const resolvedBackLabel = backLabel ?? t("navigation:settingsLayout.back");
-
- const handleBack = () => {
- if (backPath) {
- navigate({ to: backPath });
- } else {
- window.history.back();
- }
- };
-
- return (
- <Layout>
- <Layout.Header>
- <div className="flex items-center justify-between w-full">
- <div className="flex items-center gap-1 w-full">
- <TooltipProvider>
- <Tooltip>
- <TooltipTrigger asChild>
- <SidebarTrigger className="-ml-1 h-6 w-6" />
- </TooltipTrigger>
- <TooltipContent>
- <p className="flex items-center gap-2 text-[10px]">
- {t("navigation:settingsLayout.toggleSidebar")}
- <KbdSequence
- keys={[
- shortcuts.sidebar.prefix,
- shortcuts.sidebar.toggle,
- ]}
- />
- </p>
- </TooltipContent>
- </Tooltip>
- </TooltipProvider>
- <Separator
- orientation="vertical"
- className="mx-1.5 data-[orientation=vertical]:h-2.5"
- />
- <Breadcrumb className="flex items-center gap-1 text-xs w-full">
- <BreadcrumbList>
- <BreadcrumbItem>
- <BreadcrumbLink href="/dashboard/settings">
- <h1 className="text-xs text-card-foreground">
- {t("navigation:page.settingsTitle")}
- </h1>
- </BreadcrumbLink>
- </BreadcrumbItem>
- <BreadcrumbSeparator />
- <BreadcrumbItem>
- <h1 className="text-xs text-card-foreground">{title}</h1>
- </BreadcrumbItem>
- </BreadcrumbList>
- </Breadcrumb>
- </div>
- <div className="flex items-center gap-1.5">
- {backPath && (
- <Button
- variant="ghost"
- size="sm"
- onClick={handleBack}
- className="gap-1.5 text-xs"
- >
- <ArrowLeft className="w-3 h-3" />
- {resolvedBackLabel}
- </Button>
- )}
- </div>
- </div>
- </Layout.Header>
- <Layout.Content>
- <div className={cn("max-w-4xl mx-auto space-y-8 py-6", className)}>
- {description && (
- <div className="space-y-1">
- <p className="text-sm text-muted-foreground">{description}</p>
- </div>
- )}
- {children}
- </div>
- </Layout.Content>
- </Layout>
- );
-}
-
-type SettingsSectionProps = {
- title: string;
- description?: string;
- icon?: ReactNode;
- children: ReactNode;
- className?: string;
-};
-
-export function SettingsSection({
- title,
- description,
- icon,
- children,
- className,
-}: SettingsSectionProps) {
- return (
- <div className={cn("space-y-6", className)}>
- <div className="flex items-center gap-3">
- {icon && (
- <div className="flex h-8 w-8 items-center justify-center rounded-md border bg-background">
- {icon}
- </div>
- )}
- <div className="space-y-1">
- <h2 className="text-lg font-semibold tracking-tight">{title}</h2>
- {description && (
- <p className="text-sm text-muted-foreground">{description}</p>
- )}
- </div>
- </div>
- <div className="space-y-4">{children}</div>
- </div>
- );
-}
-
-type DangerZoneSectionProps = {
- title: string;
- description: string;
- children: ReactNode;
-};
-
-export function DangerZoneSection({
- title,
- description,
- children,
-}: DangerZoneSectionProps) {
- return (
- <div className="space-y-6">
- <div className="flex items-center gap-3">
- <div className="flex h-8 w-8 items-center justify-center rounded-md border border-destructive/20 bg-destructive/10">
- <AlertTriangle className="h-4 w-4 text-destructive" />
- </div>
- <div className="space-y-1">
- <h2 className="text-lg font-semibold tracking-tight text-destructive">
- {title}
- </h2>
- <p className="text-sm text-muted-foreground">{description}</p>
- </div>
- </div>
- <div className="rounded-lg border border-destructive/20 bg-destructive/5 p-6">
- {children}
- </div>
- </div>
- );
-}
diff --git a/apps/web/src/components/settings-sidebar.test.tsx b/apps/web/src/components/settings-sidebar.test.tsx
deleted file mode 100644
index 8db51239d..000000000
--- a/apps/web/src/components/settings-sidebar.test.tsx
+++ /dev/null
@@ -1,96 +0,0 @@
-import { cleanup, render, screen } from "@testing-library/react";
-import { afterEach, describe, expect, it, vi } from "vite-plus/test";
-import SettingsSidebar, {
- SettingsSidebarProvider,
-} from "@/components/SettingsSidebar";
-import {
- AlertDialog,
- AlertDialogContent,
- AlertDialogHeader,
- AlertDialogTitle,
-} from "@/components/ui/alert-dialog";
-import { Sheet } from "@/components/ui/sheet";
-
-vi.mock("@tanstack/react-router", () => ({
- useNavigate: () => vi.fn(),
-}));
-
-vi.mock("react-i18next", () => ({
- useTranslation: () => ({ t: (key: string) => key }),
- initReactI18next: { type: "3rdParty", init: () => {} },
-}));
-
-function renderSettings({ menuOpen }: { menuOpen: boolean }) {
- return render(
- <SettingsSidebarProvider
- workspaceId="workspace-1"
- menuOpen={menuOpen}
- setMenuOpen={vi.fn()}
- >
- <div className="flex">
- <SettingsSidebar>
- <span>Account nav</span>
- </SettingsSidebar>
- <AlertDialog open>
- <AlertDialogContent>
- <AlertDialogHeader>
- <AlertDialogTitle>Delete your account?</AlertDialogTitle>
- </AlertDialogHeader>
- </AlertDialogContent>
- </AlertDialog>
- </div>
- </SettingsSidebarProvider>,
- );
-}
-
-afterEach(() => {
- cleanup();
-});
-
-describe("SettingsSidebar", () => {
- it("renders only the desktop sidebar while the mobile menu is closed", () => {
- renderSettings({ menuOpen: false });
-
- expect(screen.getAllByText("Account nav")).toHaveLength(1);
- });
-
- it("renders the nav in the mobile sheet when the menu is open", () => {
- renderSettings({ menuOpen: true });
-
- expect(screen.getAllByText("Account nav")).toHaveLength(2);
- });
-
- it("keeps page dialogs out of the settings sheet's dialog tree", () => {
- renderSettings({ menuOpen: false });
-
- expect(screen.getByText("Delete your account?")).toBeTruthy();
- expect(
- document.querySelector('[data-slot="alert-dialog-backdrop"]'),
- ).not.toBeNull();
- expect(
- document
- .querySelector('[data-slot="alert-dialog-popup"]')
- ?.hasAttribute("data-nested"),
- ).toBe(false);
- });
-
- it("treats a dialog inside the sheet's root as nested, which is what the old layout did", () => {
- render(
- <Sheet open={false}>
- <AlertDialog open>
- <AlertDialogContent>
- <AlertDialogHeader>
- <AlertDialogTitle>Nested</AlertDialogTitle>
- </AlertDialogHeader>
- </AlertDialogContent>
- </AlertDialog>
- </Sheet>,
- );
-
- expect(
- document
- .querySelector('[data-slot="alert-dialog-popup"]')
- ?.hasAttribute("data-nested"),
- ).toBe(true);
- });
-});
diff --git a/apps/web/src/components/settings/nav/build-settings-nav.test.ts b/apps/web/src/components/settings/nav/build-settings-nav.test.ts
new file mode 100644
index 000000000..8c3831a2f
--- /dev/null
+++ b/apps/web/src/components/settings/nav/build-settings-nav.test.ts
@@ -0,0 +1,59 @@
+import { describe, expect, it } from "vite-plus/test";
+import { buildSettingsNav } from "@/components/settings/nav/build-settings-nav";
+
+const t = (key: string) => key;
+
+function build(
+ overrides: Partial<Parameters<typeof buildSettingsNav>[0]> = {},
+) {
+ return buildSettingsNav({
+ t,
+ workspaceName: "Acme",
+ billingEnabled: false,
+ hasAdminAccess: false,
+ projects: [],
+ ...overrides,
+ });
+}
+
+describe("buildSettingsNav", () => {
+ it("labels the workspace group with the workspace name", () => {
+ expect(build().workspace.label).toBe("Acme");
+ expect(build({ workspaceName: undefined }).workspace.label).toBe(
+ "navigation:page.settingsWorkspaceTab",
+ );
+ });
+
+ it("only offers billing when billing is enabled", () => {
+ const linkIds = (nav: ReturnType<typeof build>) =>
+ nav.workspace.links.map((link) => link.id);
+
+ expect(linkIds(build())).not.toContain("workspace-billing");
+ expect(linkIds(build({ billingEnabled: true }))).toContain(
+ "workspace-billing",
+ );
+ });
+
+ it("only shows administration to instance admins", () => {
+ expect(build().admin).toBeNull();
+ expect(build({ hasAdminAccess: true }).admin?.links[0]?.to).toBe(
+ "/dashboard/settings/admin/users",
+ );
+ });
+
+ it("gives every project its own settings pages", () => {
+ const nav = build({
+ projects: [{ id: "p1", name: "Kaneo Web", icon: "Unknown" }],
+ });
+
+ expect(nav.projects).toHaveLength(1);
+ expect(nav.projects[0]?.links.map((link) => link.to)).toEqual([
+ "/dashboard/settings/projects/p1/general",
+ "/dashboard/settings/projects/p1/workflow",
+ "/dashboard/settings/projects/p1/visibility",
+ "/dashboard/settings/projects/p1/integrations",
+ "/dashboard/settings/projects/p1/calendar",
+ ]);
+ expect(nav.projects[0]?.icon).toBeDefined();
+ });
+});
diff --git a/apps/web/src/components/settings/nav/build-settings-nav.ts b/apps/web/src/components/settings/nav/build-settings-nav.ts
new file mode 100644
index 000000000..e10afb927
--- /dev/null
+++ b/apps/web/src/components/settings/nav/build-settings-nav.ts
@@ -0,0 +1,151 @@
+import {
+ Bell,
+ Code,
+ CreditCard,
+ KeyRound,
+ Server,
+ Settings,
+ Shield,
+ SlidersHorizontal,
+ Tag,
+ User,
+} from "lucide-react";
+import projectIcons from "@/constants/project-icons";
+import type {
+ SettingsNav,
+ SettingsNavProject,
+} from "@/components/settings/nav/types";
+
+type Translate = (key: string) => string;
+
+type BuildSettingsNavInput = {
+ t: Translate;
+ workspaceName?: string;
+ billingEnabled: boolean;
+ hasAdminAccess: boolean;
+ projects: { id: string; name: string; icon?: string | null }[];
+};
+
+const PROJECT_SECTIONS = [
+ { id: "general", labelKey: "settings:projectGeneral.title" },
+ { id: "workflow", labelKey: "settings:projectWorkflow.title" },
+ { id: "visibility", labelKey: "settings:projectVisibility.title" },
+ { id: "integrations", labelKey: "settings:projectIntegrations.title" },
+ { id: "calendar", labelKey: "settings:calendarFeeds.title" },
+] as const;
+
+function buildProject(
+ t: Translate,
+ project: BuildSettingsNavInput["projects"][number],
+): SettingsNavProject {
+ const icon =
+ projectIcons[project.icon as keyof typeof projectIcons] ??
+ projectIcons.Layout;
+
+ return {
+ id: project.id,
+ name: project.name,
+ icon,
+ links: PROJECT_SECTIONS.map((section) => ({
+ id: `project-${project.id}-${section.id}`,
+ label: t(section.labelKey),
+ to: `/dashboard/settings/projects/${project.id}/${section.id}`,
+ })),
+ };
+}
+
+export function buildSettingsNav({
+ t,
+ workspaceName,
+ billingEnabled,
+ hasAdminAccess,
+ projects,
+}: BuildSettingsNavInput): SettingsNav {
+ return {
+ account: {
+ id: "account",
+ label: t("settings:account"),
+ links: [
+ {
+ id: "information",
+ label: t("settings:information"),
+ to: "/dashboard/settings/account/information",
+ icon: User,
+ },
+ {
+ id: "preferences",
+ label: t("settings:preferences"),
+ to: "/dashboard/settings/account/preferences",
+ icon: SlidersHorizontal,
+ },
+ {
+ id: "notifications",
+ label: t("settings:notifications"),
+ to: "/dashboard/settings/account/notifications",
+ icon: Bell,
+ },
+ {
+ id: "security",
+ label: t("settings:security"),
+ to: "/dashboard/settings/account/security",
+ icon: KeyRound,
+ },
+ {
+ id: "developer",
+ label: t("settings:apiKeys"),
+ to: "/dashboard/settings/account/developer",
+ icon: Code,
+ },
+ ],
+ },
+ workspace: {
+ id: "workspace",
+ label: workspaceName || t("navigation:page.settingsWorkspaceTab"),
+ links: [
+ {
+ id: "workspace-general",
+ label: t("settings:workspaceGeneral.title"),
+ to: "/dashboard/settings/workspace/general",
+ icon: Settings,
+ },
+ {
+ id: "workspace-roles",
+ label: t("settings:workspaceRoles.title"),
+ to: "/dashboard/settings/workspace/roles",
+ icon: Shield,
+ },
+ {
+ id: "workspace-labels",
+ label: t("settings:workspaceLabels.title"),
+ to: "/dashboard/settings/workspace/labels",
+ icon: Tag,
+ },
+ ...(billingEnabled
+ ? [
+ {
+ id: "workspace-billing",
+ label: t("settings:billing.pageTitle"),
+ to: "/dashboard/settings/workspace/billing",
+ icon: CreditCard,
+ },
+ ]
+ : []),
+ ],
+ },
+ projects: projects.map((project) => buildProject(t, project)),
+ admin: hasAdminAccess
+ ? {
+ id: "admin",
+ label: t("settings:administration"),
+ links: [
+ {
+ id: "admin-users",
+ label: t("settings:adminUsers.title"),
+ to: "/dashboard/settings/admin/users",
+ icon: Server,
+ },
+ ],
+ }
+ : null,
+ };
+}
diff --git a/apps/web/src/components/settings/nav/get-settings-breadcrumb.test.ts b/apps/web/src/components/settings/nav/get-settings-breadcrumb.test.ts
new file mode 100644
index 000000000..f3182187f
--- /dev/null
+++ b/apps/web/src/components/settings/nav/get-settings-breadcrumb.test.ts
@@ -0,0 +1,43 @@
+import { describe, expect, it } from "vite-plus/test";
+import { buildSettingsNav } from "@/components/settings/nav/build-settings-nav";
+import { getSettingsBreadcrumb } from "@/components/settings/nav/get-settings-breadcrumb";
+
+const nav = buildSettingsNav({
+ t: (key) => key,
+ workspaceName: "Acme",
+ billingEnabled: false,
+ hasAdminAccess: true,
+ projects: [{ id: "p1", name: "Kaneo Web" }],
+});
+
+describe("getSettingsBreadcrumb", () => {
+ it("names the group and page for account and workspace pages", () => {
+ expect(
+ getSettingsBreadcrumb(nav, "/dashboard/settings/account/preferences"),
+ ).toEqual({
+ section: "settings:account",
+ page: "settings:preferences",
+ });
+ expect(
+ getSettingsBreadcrumb(nav, "/dashboard/settings/workspace/labels/"),
+ ).toEqual({ section: "Acme", page: "settings:workspaceLabels.title" });
+ });
+
+ it("uses the project name for project pages", () => {
+ expect(
+ getSettingsBreadcrumb(
+ nav,
+ "/dashboard/settings/projects/p1/integrations",
+ ),
+ ).toEqual({
+ section: "Kaneo Web",
+ page: "settings:projectIntegrations.title",
+ });
+ });
+
+ it("returns null for paths outside the nav", () => {
+ expect(getSettingsBreadcrumb(nav, "/dashboard/settings/projects")).toBe(
+ null,
+ );
+ });
+});
diff --git a/apps/web/src/components/settings/nav/get-settings-breadcrumb.ts b/apps/web/src/components/settings/nav/get-settings-breadcrumb.ts
new file mode 100644
index 000000000..b75603acc
--- /dev/null
+++ b/apps/web/src/components/settings/nav/get-settings-breadcrumb.ts
@@ -0,0 +1,33 @@
+import type { SettingsNav } from "@/components/settings/nav/types";
+
+export type SettingsBreadcrumb = {
+ section: string;
+ page: string;
+};
+
+export function normalizeSettingsPath(pathname: string) {
+ return pathname.replace(/\/+$/, "");
+}
+
+export function getSettingsBreadcrumb(
+ nav: SettingsNav,
+ pathname: string,
+): SettingsBreadcrumb | null {
+ const path = normalizeSettingsPath(pathname);
+
+ for (const group of [nav.account, nav.workspace, nav.admin]) {
+ const link = group?.links.find((candidate) => candidate.to === path);
+ if (group && link) {
+ return { section: group.label, page: link.label };
+ }
+ }
+
+ for (const project of nav.projects) {
+ const link = project.links.find((candidate) => candidate.to === path);
+ if (link) {
+ return { section: project.name, page: link.label };
+ }
+ }
+
+ return null;
+}
diff --git a/apps/web/src/components/settings/nav/settings-nav-group.tsx b/apps/web/src/components/settings/nav/settings-nav-group.tsx
new file mode 100644
index 000000000..8a59e99e2
--- /dev/null
+++ b/apps/web/src/components/settings/nav/settings-nav-group.tsx
@@ -0,0 +1,41 @@
+import { Link } from "@tanstack/react-router";
+import type { SettingsNavGroup as SettingsNavGroupModel } from "@/components/settings/nav/types";
+import {
+ SidebarGroup,
+ SidebarGroupContent,
+ SidebarGroupLabel,
+ SidebarMenu,
+ SidebarMenuButton,
+ SidebarMenuItem,
+} from "@/components/ui/sidebar";
+
+type SettingsNavGroupProps = {
+ group: SettingsNavGroupModel;
+ pathname: string;
+};
+
+export function SettingsNavGroup({ group, pathname }: SettingsNavGroupProps) {
+ return (
+ <SidebarGroup className="gap-0.5 px-2 py-1.5">
+ <SidebarGroupLabel className="h-7 truncate text-sidebar-foreground/70">
+ {group.label}
+ </SidebarGroupLabel>
+ <SidebarGroupContent>
+ <SidebarMenu className="gap-0.5">
+ {group.links.map((link) => (
+ <SidebarMenuItem key={link.id}>
+ <SidebarMenuButton
+ isActive={pathname === link.to}
+ className="h-8 text-sm"
+ render={<Link to={link.to} />}
+ >
+ <link.icon aria-hidden="true" />
+ <span>{link.label}</span>
+ </SidebarMenuButton>
+ </SidebarMenuItem>
+ ))}
+ </SidebarMenu>
+ </SidebarGroupContent>
+ </SidebarGroup>
+ );
+}
diff --git a/apps/web/src/components/settings/nav/settings-nav-project.test.tsx b/apps/web/src/components/settings/nav/settings-nav-project.test.tsx
new file mode 100644
index 000000000..faac305e0
--- /dev/null
+++ b/apps/web/src/components/settings/nav/settings-nav-project.test.tsx
@@ -0,0 +1,68 @@
+import { cleanup, fireEvent, render, screen } from "@testing-library/react";
+import type { ReactNode } from "react";
+import { afterEach, describe, expect, it, vi } from "vite-plus/test";
+import { buildSettingsNav } from "@/components/settings/nav/build-settings-nav";
+import { SettingsNavProject } from "@/components/settings/nav/settings-nav-project";
+import { SidebarMenu, SidebarProvider } from "@/components/ui/sidebar";
+
+vi.mock("@tanstack/react-router", () => ({
+ Link: ({ to, children, ...props }: { to: string; children?: ReactNode }) => (
+ <a href={to} {...props}>
+ {children}
+ </a>
+ ),
+}));
+
+vi.mock("@/hooks/use-mobile", () => ({ useIsMobile: () => false }));
+
+const [project] = buildSettingsNav({
+ t: (key) => key,
+ billingEnabled: false,
+ hasAdminAccess: false,
+ projects: [{ id: "p1", name: "Kaneo Web" }],
+}).projects;
+
+function renderProject(pathname: string) {
+ return render(
+ <SidebarProvider>
+ <SidebarMenu>
+ {project ? (
+ <SettingsNavProject project={project} pathname={pathname} />
+ ) : null}
+ </SidebarMenu>
+ </SidebarProvider>,
+ );
+}
+
+afterEach(() => {
+ cleanup();
+});
+
+describe("SettingsNavProject", () => {
+ it("starts expanded on one of its own pages and marks that page", () => {
+ renderProject("/dashboard/settings/projects/p1/integrations");
+
+ expect(
+ screen
+ .getByRole("button", { name: "Kaneo Web" })
+ .getAttribute("aria-expanded"),
+ ).toBe("true");
+ expect(
+ screen
+ .getByRole("link", { name: "settings:projectIntegrations.title" })
+ .getAttribute("data-active"),
+ ).toBe("true");
+ });
+
+ it("starts collapsed elsewhere and expands on click", () => {
+ renderProject("/dashboard/settings/account/information");
+ const toggle = screen.getByRole("button", { name: "Kaneo Web" });
+
+ expect(toggle.getAttribute("aria-expanded")).toBe("false");
+ fireEvent.click(toggle);
+ expect(toggle.getAttribute("aria-expanded")).toBe("true");
+ expect(
+ screen.getByRole("link", { name: "settings:projectGeneral.title" }),
+ ).toBeTruthy();
+ });
+});
diff --git a/apps/web/src/components/settings/nav/settings-nav-project.tsx b/apps/web/src/components/settings/nav/settings-nav-project.tsx
new file mode 100644
index 000000000..5f35c8131
--- /dev/null
+++ b/apps/web/src/components/settings/nav/settings-nav-project.tsx
@@ -0,0 +1,64 @@
+import { Link } from "@tanstack/react-router";
+import { ChevronRight } from "lucide-react";
+import { useEffect, useState } from "react";
+import type { SettingsNavProject as SettingsNavProjectModel } from "@/components/settings/nav/types";
+import {
+ SidebarMenuButton,
+ SidebarMenuItem,
+ SidebarMenuSub,
+ SidebarMenuSubButton,
+ SidebarMenuSubItem,
+} from "@/components/ui/sidebar";
+import { cn } from "@/lib/cn";
+
+type SettingsNavProjectProps = {
+ project: SettingsNavProjectModel;
+ pathname: string;
+};
+
+export function SettingsNavProject({
+ project,
+ pathname,
+}: SettingsNavProjectProps) {
+ const containsActivePage = project.links.some((link) => link.to === pathname);
+ const [open, setOpen] = useState(containsActivePage);
+
+ useEffect(() => {
+ if (containsActivePage) setOpen(true);
+ }, [containsActivePage]);
+
+ return (
+ <SidebarMenuItem>
+ <SidebarMenuButton
+ aria-expanded={open}
+ className="h-8 text-sm aria-expanded:font-medium aria-expanded:text-sidebar-accent-foreground"
+ onClick={() => setOpen((current) => !current)}
+ >
+ <project.icon aria-hidden="true" />
+ <span className="flex-1 truncate">{project.name}</span>
+ <ChevronRight
+ aria-hidden="true"
+ className={cn(
+ "ml-auto size-3.5! text-sidebar-foreground/60 transition-transform duration-150 ease-out",
+ open && "rotate-90",
+ )}
+ />
+ </SidebarMenuButton>
+ {open ? (
+ <SidebarMenuSub className="mx-4 my-0.5 gap-0.5 px-2">
+ {project.links.map((link) => (
+ <SidebarMenuSubItem key={link.id}>
+ <SidebarMenuSubButton
+ isActive={pathname === link.to}
+ className="h-7 data-[active=true]:font-medium"
+ render={<Link to={link.to} />}
+ >
+ <span>{link.label}</span>
+ </SidebarMenuSubButton>
+ </SidebarMenuSubItem>
+ ))}
+ </SidebarMenuSub>
+ ) : null}
+ </SidebarMenuItem>
+ );
+}
diff --git a/apps/web/src/components/settings/nav/settings-nav-projects.tsx b/apps/web/src/components/settings/nav/settings-nav-projects.tsx
new file mode 100644
index 000000000..91b0d1432
--- /dev/null
+++ b/apps/web/src/components/settings/nav/settings-nav-projects.tsx
@@ -0,0 +1,42 @@
+import { useTranslation } from "react-i18next";
+import { SettingsNavProject } from "@/components/settings/nav/settings-nav-project";
+import type { SettingsNavProject as SettingsNavProjectModel } from "@/components/settings/nav/types";
+import {
+ SidebarGroup,
+ SidebarGroupContent,
+ SidebarGroupLabel,
+ SidebarMenu,
+} from "@/components/ui/sidebar";
+
+type SettingsNavProjectsProps = {
+ projects: SettingsNavProjectModel[];
+ pathname: string;
+};
+
+export function SettingsNavProjects({
+ projects,
+ pathname,
+}: SettingsNavProjectsProps) {
+ const { t } = useTranslation();
+
+ if (projects.length === 0) return null;
+
+ return (
+ <SidebarGroup className="gap-0.5 px-2 py-1.5">
+ <SidebarGroupLabel className="h-7 text-sidebar-foreground/70">
+ {t("navigation:sidebar.projects")}
+ </SidebarGroupLabel>
+ <SidebarGroupContent>
+ <SidebarMenu className="gap-0.5">
+ {projects.map((project) => (
+ <SettingsNavProject
+ key={project.id}
+ project={project}
+ pathname={pathname}
+ />
+ ))}
+ </SidebarMenu>
+ </SidebarGroupContent>
+ </SidebarGroup>
+ );
+}
diff --git a/apps/web/src/components/settings/nav/settings-sidebar-header.tsx b/apps/web/src/components/settings/nav/settings-sidebar-header.tsx
new file mode 100644
index 000000000..038c729cb
--- /dev/null
+++ b/apps/web/src/components/settings/nav/settings-sidebar-header.tsx
@@ -0,0 +1,39 @@
+import { ChevronLeft } from "lucide-react";
+import { useTranslation } from "react-i18next";
+import { Kbd } from "@/components/ui/kbd";
+import {
+ SidebarHeader,
+ SidebarMenu,
+ SidebarMenuButton,
+ SidebarMenuItem,
+} from "@/components/ui/sidebar";
+
+type SettingsSidebarHeaderProps = {
+ onLeave: (() => void) | undefined;
+};
+
+export function SettingsSidebarHeader({ onLeave }: SettingsSidebarHeaderProps) {
+ const { t } = useTranslation();
+
+ return (
+ <SidebarHeader className="pt-1 pb-1.5">
+ <SidebarMenu>
+ <SidebarMenuItem>
+ <SidebarMenuButton
+ className="h-8 text-sm font-medium text-sidebar-accent-foreground"
+ disabled={!onLeave}
+ onClick={onLeave}
+ aria-label={t("navigation:page.backToWorkspace")}
+ title={t("navigation:page.backToWorkspace")}
+ >
+ <ChevronLeft aria-hidden="true" />
+ <span className="flex-1">{t("navigation:page.settingsTitle")}</span>
+ <Kbd aria-hidden="true" className="hidden md:inline-flex">
+ Esc
+ </Kbd>
+ </SidebarMenuButton>
+ </SidebarMenuItem>
+ </SidebarMenu>
+ </SidebarHeader>
+ );
+}
diff --git a/apps/web/src/components/settings/nav/settings-sidebar.tsx b/apps/web/src/components/settings/nav/settings-sidebar.tsx
new file mode 100644
index 000000000..14d9d4214
--- /dev/null
+++ b/apps/web/src/components/settings/nav/settings-sidebar.tsx
@@ -0,0 +1,48 @@
+import { useLocation } from "@tanstack/react-router";
+import { useEffect } from "react";
+import { normalizeSettingsPath } from "@/components/settings/nav/get-settings-breadcrumb";
+import { SettingsNavGroup } from "@/components/settings/nav/settings-nav-group";
+import { SettingsNavProjects } from "@/components/settings/nav/settings-nav-projects";
+import { SettingsSidebarHeader } from "@/components/settings/nav/settings-sidebar-header";
+import type { SettingsNav } from "@/components/settings/nav/types";
+import { Sidebar, SidebarContent, useSidebar } from "@/components/ui/sidebar";
+import { shortcuts } from "@/constants/shortcuts";
+import { useRegisterShortcuts } from "@/hooks/use-keyboard-shortcuts";
+
+type SettingsSidebarProps = {
+ nav: SettingsNav;
+ onLeave: (() => void) | undefined;
+};
+
+export function SettingsSidebar({ nav, onLeave }: SettingsSidebarProps) {
+ const pathname = useLocation({
+ select: (location) => normalizeSettingsPath(location.pathname),
+ });
+ const { setOpenMobile, toggleSidebar } = useSidebar();
+
+ useRegisterShortcuts({
+ modifierShortcuts: {
+ [shortcuts.sidebar.prefix]: {
+ [shortcuts.sidebar.toggle]: toggleSidebar,
+ },
+ },
+ });
+
+ useEffect(() => {
+ if (pathname) setOpenMobile(false);
+ }, [pathname, setOpenMobile]);
+
+ return (
+ <Sidebar collapsible="offcanvas" variant="inset" className="border-none">
+ <SettingsSidebarHeader onLeave={onLeave} />
+ <SidebarContent className="gap-0 pb-2">
+ <SettingsNavGroup group={nav.account} pathname={pathname} />
+ <SettingsNavGroup group={nav.workspace} pathname={pathname} />
+ <SettingsNavProjects projects={nav.projects} pathname={pathname} />
+ {nav.admin ? (
+ <SettingsNavGroup group={nav.admin} pathname={pathname} />
+ ) : null}
+ </SidebarContent>
+ </Sidebar>
+ );
+}
diff --git a/apps/web/src/components/settings/nav/should-leave-on-escape.test.ts b/apps/web/src/components/settings/nav/should-leave-on-escape.test.ts
new file mode 100644
index 000000000..fd8d32117
--- /dev/null
+++ b/apps/web/src/components/settings/nav/should-leave-on-escape.test.ts
@@ -0,0 +1,77 @@
+import { afterEach, describe, expect, it } from "vite-plus/test";
+import { shouldLeaveOnEscape } from "@/components/settings/nav/should-leave-on-escape";
+
+function escapeFrom(target: HTMLElement, init: KeyboardEventInit = {}) {
+ const event = new KeyboardEvent("keydown", {
+ key: "Escape",
+ bubbles: true,
+ cancelable: true,
+ ...init,
+ });
+ Object.defineProperty(event, "target", { value: target });
+ return event;
+}
+
+afterEach(() => {
+ document.body.innerHTML = "";
+});
+
+describe("shouldLeaveOnEscape", () => {
+ it("leaves on a bare Escape on the page", () => {
+ expect(shouldLeaveOnEscape(escapeFrom(document.body), document)).toBe(true);
+ });
+
+ it("ignores other keys and modified Escape", () => {
+ const enter = new KeyboardEvent("keydown", { key: "Enter" });
+ expect(shouldLeaveOnEscape(enter, document)).toBe(false);
+ expect(
+ shouldLeaveOnEscape(
+ escapeFrom(document.body, { metaKey: true }),
+ document,
+ ),
+ ).toBe(false);
+ });
+
+ it("leaves Escape to text fields", () => {
+ const input = document.createElement("input");
+ document.body.append(input);
+
+ expect(shouldLeaveOnEscape(escapeFrom(input), document)).toBe(false);
+ });
+
+ it("leaves Escape to open dialogs and popups", () => {
+ const dialog = document.createElement("div");
+ dialog.setAttribute("role", "dialog");
+ document.body.append(dialog);
+ expect(shouldLeaveOnEscape(escapeFrom(document.body), document)).toBe(
+ false,
+ );
+
+ dialog.remove();
+ const popup = document.createElement("div");
+ popup.dataset.slot = "select-popup";
+ document.body.append(popup);
+ expect(shouldLeaveOnEscape(escapeFrom(document.body), document)).toBe(
+ false,
+ );
+ });
+
+ it("ignores popups that stay mounted after closing", () => {
+ const positioner = document.createElement("div");
+ positioner.hidden = true;
+ const popup = document.createElement("div");
+ popup.dataset.slot = "select-popup";
+ popup.setAttribute("data-closed", "");
+ positioner.append(popup);
+ document.body.append(positioner);
+
+ expect(shouldLeaveOnEscape(escapeFrom(document.body), document)).toBe(true);
+ });
+
+ it("respects handlers that already consumed Escape", () => {
+ const event = escapeFrom(document.body);
+ event.preventDefault();
+
+ expect(shouldLeaveOnEscape(event, document)).toBe(false);
+ });
+});
diff --git a/apps/web/src/components/settings/nav/should-leave-on-escape.ts b/apps/web/src/components/settings/nav/should-leave-on-escape.ts
new file mode 100644
index 000000000..ccf787c82
--- /dev/null
+++ b/apps/web/src/components/settings/nav/should-leave-on-escape.ts
@@ -0,0 +1,39 @@
+// Escape belongs to whatever is open on top of the page (dialogs, menus,
+// selects, the mobile nav sheet) and to text fields; only a bare Escape on
+// the settings page itself leaves settings. Closed Base UI popups can stay
+// mounted (hidden, with data-closed), so only count the open ones.
+const OVERLAY_SELECTOR = [
+ '[role="dialog"]',
+ '[role="alertdialog"]',
+ '[role="menu"]',
+ '[data-slot$="-popup"]',
+].join(",");
+
+function hasOpenOverlay(root: ParentNode) {
+ for (const overlay of root.querySelectorAll(OVERLAY_SELECTOR)) {
+ if (overlay.hasAttribute("data-closed")) continue;
+ if (overlay.closest("[hidden]")) continue;
+ return true;
+ }
+ return false;
+}
+
+export function shouldLeaveOnEscape(event: KeyboardEvent, root: ParentNode) {
+ if (event.key !== "Escape" || event.defaultPrevented) return false;
+ if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) {
+ return false;
+ }
+
+ const target = event.target;
+ if (
+ target instanceof HTMLElement &&
+ (target.isContentEditable ||
+ target.tagName === "INPUT" ||
+ target.tagName === "TEXTAREA" ||
+ target.tagName === "SELECT")
+ ) {
+ return false;
+ }
+
+ return !hasOpenOverlay(root);
+}
diff --git a/apps/web/src/components/settings/nav/types.ts b/apps/web/src/components/settings/nav/types.ts
new file mode 100644
index 000000000..96299622a
--- /dev/null
+++ b/apps/web/src/components/settings/nav/types.ts
@@ -0,0 +1,31 @@
+import type { LucideIcon } from "lucide-react";
+
+export type SettingsNavSubLink = {
+ id: string;
+ label: string;
+ to: string;
+};
+
+export type SettingsNavLink = SettingsNavSubLink & {
+ icon: LucideIcon;
+};
+
+export type SettingsNavGroup = {
+ id: string;
+ label: string;
+ links: SettingsNavLink[];
+};
+
+export type SettingsNavProject = {
+ id: string;
+ name: string;
+ icon: LucideIcon;
+ links: SettingsNavSubLink[];
+};
+
+export type SettingsNav = {
+ account: SettingsNavGroup;
+ workspace: SettingsNavGroup;
+ projects: SettingsNavProject[];
+ admin: SettingsNavGroup | null;
+};
diff --git a/apps/web/src/components/settings/nav/use-leave-settings-on-escape.ts b/apps/web/src/components/settings/nav/use-leave-settings-on-escape.ts
new file mode 100644
index 000000000..7cb9b0b45
--- /dev/null
+++ b/apps/web/src/components/settings/nav/use-leave-settings-on-escape.ts
@@ -0,0 +1,16 @@
+import { useEffect } from "react";
+import { shouldLeaveOnEscape } from "@/components/settings/nav/should-leave-on-escape";
+
+export function useLeaveSettingsOnEscape(onLeave: (() => void) | undefined) {
+ useEffect(() => {
+ if (!onLeave) return;
+
+ const handleKeyDown = (event: KeyboardEvent) => {
+ if (shouldLeaveOnEscape(event, document)) onLeave();
+ };
+
+ // Capture runs before overlays handle Escape, while they are still open.
+ document.addEventListener("keydown", handleKeyDown, true);
+ return () => document.removeEventListener("keydown", handleKeyDown, true);
+ }, [onLeave]);
+}
diff --git a/apps/web/src/components/settings/nav/use-leave-settings.ts b/apps/web/src/components/settings/nav/use-leave-settings.ts
new file mode 100644
index 000000000..c3b363848
--- /dev/null
+++ b/apps/web/src/components/settings/nav/use-leave-settings.ts
@@ -0,0 +1,20 @@
+import { useNavigate } from "@tanstack/react-router";
+import { useCallback } from "react";
+import useActiveWorkspace from "@/hooks/queries/workspace/use-active-workspace";
+
+// Returns undefined until there is a workspace to go back to.
+export function useLeaveSettings() {
+ const navigate = useNavigate();
+ const { data: workspace } = useActiveWorkspace();
+ const workspaceId = workspace?.id;
+
+ const leave = useCallback(() => {
+ if (!workspaceId) return;
+ navigate({
+ to: "/dashboard/workspace/$workspaceId",
+ params: { workspaceId },
+ });
+ }, [navigate, workspaceId]);
+
+ return workspaceId ? leave : undefined;
+}
diff --git a/apps/web/src/components/settings/nav/use-settings-nav.ts b/apps/web/src/components/settings/nav/use-settings-nav.ts
new file mode 100644
index 000000000..ecf1cfd39
--- /dev/null
+++ b/apps/web/src/components/settings/nav/use-settings-nav.ts
@@ -0,0 +1,29 @@
+import { useMemo } from "react";
+import { useTranslation } from "react-i18next";
+import { buildSettingsNav } from "@/components/settings/nav/build-settings-nav";
+import useAdminAccess from "@/hooks/queries/admin/use-admin-access";
+import useGetConfig from "@/hooks/queries/config/use-get-config";
+import useGetProjects from "@/hooks/queries/project/use-get-projects";
+import useActiveWorkspace from "@/hooks/queries/workspace/use-active-workspace";
+
+export function useSettingsNav() {
+ const { t } = useTranslation();
+ const { data: workspace } = useActiveWorkspace();
+ const { data: projects } = useGetProjects({
+ workspaceId: workspace?.id ?? "",
+ });
+ const { data: config } = useGetConfig();
+ const { data: hasAdminAccess } = useAdminAccess();
+
+ return useMemo(
+ () =>
+ buildSettingsNav({
+ t,
+ workspaceName: workspace?.name,
+ billingEnabled: Boolean(config?.billingEnabled),
+ hasAdminAccess: Boolean(hasAdminAccess),
+ projects: projects ?? [],
+ }),
+ [t, workspace?.name, config?.billingEnabled, hasAdminAccess, projects],
+ );
+}
diff --git a/apps/web/src/components/settings/settings-header.tsx b/apps/web/src/components/settings/settings-header.tsx
new file mode 100644
index 000000000..c29b574d2
--- /dev/null
+++ b/apps/web/src/components/settings/settings-header.tsx
@@ -0,0 +1,66 @@
+import { useTranslation } from "react-i18next";
+import type { SettingsBreadcrumb } from "@/components/settings/nav/get-settings-breadcrumb";
+import {
+ Breadcrumb,
+ BreadcrumbItem,
+ BreadcrumbList,
+ BreadcrumbPage,
+ BreadcrumbSeparator,
+} from "@/components/ui/breadcrumb";
+import { KbdSequence } from "@/components/ui/kbd";
+import { SidebarTrigger } from "@/components/ui/sidebar";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
+import { shortcuts } from "@/constants/shortcuts";
+
+type SettingsHeaderProps = {
+ breadcrumb: SettingsBreadcrumb | null;
+};
+
+export function SettingsHeader({ breadcrumb }: SettingsHeaderProps) {
+ const { t } = useTranslation();
+
+ return (
+ <header className="flex h-10 shrink-0 items-center gap-1 border-b border-border bg-card p-2">
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <SidebarTrigger className="-ml-1 h-6 w-6" />
+ </TooltipTrigger>
+ <TooltipContent>
+ <p className="flex items-center gap-2 text-[10px]">
+ {t("navigation:settingsLayout.toggleSidebar")}
+ <KbdSequence
+ keys={[shortcuts.sidebar.prefix, shortcuts.sidebar.toggle]}
+ />
+ </p>
+ </TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+ <div className="mx-1.5 h-4 w-px shrink-0 bg-border/80" />
+ <Breadcrumb className="min-w-0 text-xs">
+ <BreadcrumbList className="flex-nowrap text-xs">
+ <BreadcrumbItem className="min-w-0">
+ <span className="truncate font-normal text-muted-foreground">
+ {breadcrumb?.section ?? t("navigation:page.settingsTitle")}
+ </span>
+ </BreadcrumbItem>
+ {breadcrumb ? (
+ <>
+ <BreadcrumbSeparator />
+ <BreadcrumbItem className="min-w-0">
+ <BreadcrumbPage className="truncate text-xs font-normal text-card-foreground">
+ {breadcrumb.page}
+ </BreadcrumbPage>
+ </BreadcrumbItem>
+ </>
+ ) : null}
+ </BreadcrumbList>
+ </Breadcrumb>
+ </header>
+ );
+}
diff --git a/apps/web/src/components/settings/settings-page.tsx b/apps/web/src/components/settings/settings-page.tsx
new file mode 100644
index 000000000..3e8f769b5
--- /dev/null
+++ b/apps/web/src/components/settings/settings-page.tsx
@@ -0,0 +1,38 @@
+import type { ReactNode } from "react";
+import { cn } from "@/lib/cn";
+
+type SettingsPageProps = {
+ title: ReactNode;
+ description?: ReactNode;
+ actions?: ReactNode;
+ children?: ReactNode;
+ className?: string;
+};
+
+export function SettingsPage({
+ title,
+ description,
+ actions,
+ children,
+ className,
+}: SettingsPageProps) {
+ return (
+ <div
+ className={cn(
+ "mx-auto w-full max-w-3xl space-y-10 px-4 py-8 sm:px-8 sm:py-10",
+ className,
+ )}
+ >
+ <header className="flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between sm:gap-6">
+ <div className="min-w-0 space-y-1.5">
+ <h1 className="text-xl font-semibold tracking-tight">{title}</h1>
+ {description ? (
+ <p className="text-sm text-muted-foreground">{description}</p>
+ ) : null}
+ </div>
+ {actions ? <div className="shrink-0">{actions}</div> : null}
+ </header>
+ {children}
+ </div>
+ );
+}
diff --git a/apps/web/src/components/settings/settings-section-header.tsx b/apps/web/src/components/settings/settings-section-header.tsx
new file mode 100644
index 000000000..6c8ece3f0
--- /dev/null
+++ b/apps/web/src/components/settings/settings-section-header.tsx
@@ -0,0 +1,25 @@
+import type { ReactNode } from "react";
+
+type SettingsSectionHeaderProps = {
+ title: ReactNode;
+ description?: ReactNode;
+ action?: ReactNode;
+};
+
+export function SettingsSectionHeader({
+ title,
+ description,
+ action,
+}: SettingsSectionHeaderProps) {
+ return (
+ <div className="flex flex-col items-start gap-2 sm:flex-row sm:items-end sm:justify-between sm:gap-4">
+ <div className="space-y-0.5">
+ <h2 className="text-sm font-medium">{title}</h2>
+ {description ? (
+ <p className="text-xs text-muted-foreground">{description}</p>
+ ) : null}
+ </div>
+ {action}
+ </div>
+ );
+}
diff --git a/apps/web/src/components/settings/settings-shell.tsx b/apps/web/src/components/settings/settings-shell.tsx
new file mode 100644
index 000000000..2a401ede8
--- /dev/null
+++ b/apps/web/src/components/settings/settings-shell.tsx
@@ -0,0 +1,45 @@
+import { useLocation } from "@tanstack/react-router";
+import type { CSSProperties, ReactNode } from "react";
+import { getSettingsBreadcrumb } from "@/components/settings/nav/get-settings-breadcrumb";
+import { SettingsSidebar } from "@/components/settings/nav/settings-sidebar";
+import { useLeaveSettings } from "@/components/settings/nav/use-leave-settings";
+import { useLeaveSettingsOnEscape } from "@/components/settings/nav/use-leave-settings-on-escape";
+import { useSettingsNav } from "@/components/settings/nav/use-settings-nav";
+import { SettingsHeader } from "@/components/settings/settings-header";
+import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
+import { useUserPreferencesStore } from "@/store/user-preferences";
+
+type SettingsShellProps = {
+ children: ReactNode;
+};
+
+// Settings swap the app sidebar for their own, but keep the app's frame
+// (sidebar width, inset panel, header height) so moving between the two
+// doesn't shift anything on screen.
+export function SettingsShell({ children }: SettingsShellProps) {
+ const { sidebarDefaultOpen } = useUserPreferencesStore();
+ const nav = useSettingsNav();
+ const pathname = useLocation({ select: (location) => location.pathname });
+ const leave = useLeaveSettings();
+
+ useLeaveSettingsOnEscape(leave);
+
+ return (
+ <div className="flex w-full bg-background">
+ <SidebarProvider
+ defaultOpen={sidebarDefaultOpen}
+ style={
+ {
+ "--sidebar-width": "calc(var(--spacing) * 60)",
+ } as CSSProperties
+ }
+ >
+ <SettingsSidebar nav={nav} onLeave={leave} />
+ <SidebarInset className="m-2 flex flex-1 flex-col overflow-hidden rounded-xl border border-border/80 bg-background shadow-sm/5 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:border-0">
+ <SettingsHeader breadcrumb={getSettingsBreadcrumb(nav, pathname)} />
+ <div className="min-h-0 flex-1 overflow-y-auto">{children}</div>
+ </SidebarInset>
+ </SidebarProvider>
+ </div>
+ );
+}
diff --git a/apps/web/src/hooks/queries/discord-integration/use-get-discord-integration.ts b/apps/web/src/hooks/queries/discord-integration/use-get-discord-integration.ts
index bd064a6d8..568c18ea1 100644
--- a/apps/web/src/hooks/queries/discord-integration/use-get-discord-integration.ts
+++ b/apps/web/src/hooks/queries/discord-integration/use-get-discord-integration.ts
@@ -1,11 +1,14 @@
import { useQuery } from "@tanstack/react-query";
import getDiscordIntegration from "@/fetchers/discord-integration/get-discord-integration";
-function useGetDiscordIntegration(projectId: string) {
+function useGetDiscordIntegration(
+ projectId: string,
+ { enabled = true }: { enabled?: boolean } = {},
+) {
return useQuery({
queryKey: ["discord-integration", projectId],
queryFn: () => getDiscordIntegration(projectId),
- enabled: Boolean(projectId),
+ enabled: enabled && Boolean(projectId),
});
}
diff --git a/apps/web/src/hooks/queries/generic-webhook-integration/use-get-generic-webhook-integration.ts b/apps/web/src/hooks/queries/generic-webhook-integration/use-get-generic-webhook-integration.ts
index 146c184da..0b0e52126 100644
--- a/apps/web/src/hooks/queries/generic-webhook-integration/use-get-generic-webhook-integration.ts
+++ b/apps/web/src/hooks/queries/generic-webhook-integration/use-get-generic-webhook-integration.ts
@@ -1,11 +1,14 @@
import { useQuery } from "@tanstack/react-query";
import getGenericWebhookIntegration from "@/fetchers/generic-webhook-integration/get-generic-webhook-integration";
-function useGetGenericWebhookIntegration(projectId: string) {
+function useGetGenericWebhookIntegration(
+ projectId: string,
+ { enabled = true }: { enabled?: boolean } = {},
+) {
return useQuery({
queryKey: ["generic-webhook-integration", projectId],
queryFn: () => getGenericWebhookIntegration(projectId),
- enabled: Boolean(projectId),
+ enabled: enabled && Boolean(projectId),
});
}
diff --git a/apps/web/src/hooks/queries/gitea-integration/use-get-gitea-integration.ts b/apps/web/src/hooks/queries/gitea-integration/use-get-gitea-integration.ts
index 5bf5bd608..db8e82413 100644
--- a/apps/web/src/hooks/queries/gitea-integration/use-get-gitea-integration.ts
+++ b/apps/web/src/hooks/queries/gitea-integration/use-get-gitea-integration.ts
@@ -1,11 +1,14 @@
import { useQuery } from "@tanstack/react-query";
import getGiteaIntegration from "@/fetchers/gitea-integration/get-gitea-integration";
-function useGetGiteaIntegration(projectId: string) {
+function useGetGiteaIntegration(
+ projectId: string,
+ { enabled = true }: { enabled?: boolean } = {},
+) {
return useQuery({
queryKey: ["gitea-integration", projectId],
queryFn: () => getGiteaIntegration(projectId),
- enabled: !!projectId,
+ enabled: enabled && Boolean(projectId),
});
}
diff --git a/apps/web/src/hooks/queries/github-integration/use-get-github-integration.ts b/apps/web/src/hooks/queries/github-integration/use-get-github-integration.ts
index 19e49fced..ef45ae115 100644
--- a/apps/web/src/hooks/queries/github-integration/use-get-github-integration.ts
+++ b/apps/web/src/hooks/queries/github-integration/use-get-github-integration.ts
@@ -1,11 +1,14 @@
import { useQuery } from "@tanstack/react-query";
import getGithubIntegration from "@/fetchers/github-integration/get-github-integration";
-function useGetGithubIntegration(projectId: string) {
+function useGetGithubIntegration(
+ projectId: string,
+ { enabled = true }: { enabled?: boolean } = {},
+) {
return useQuery({
queryKey: ["github-integration", projectId],
queryFn: () => getGithubIntegration(projectId),
- enabled: !!projectId,
+ enabled: enabled && Boolean(projectId),
});
}
diff --git a/apps/web/src/hooks/queries/gitlab-integration/use-get-gitlab-integration.ts b/apps/web/src/hooks/queries/gitlab-integration/use-get-gitlab-integration.ts
index 26401556c..33ffafa75 100644
--- a/apps/web/src/hooks/queries/gitlab-integration/use-get-gitlab-integration.ts
+++ b/apps/web/src/hooks/queries/gitlab-integration/use-get-gitlab-integration.ts
@@ -1,11 +1,14 @@
import { useQuery } from "@tanstack/react-query";
import getGitlabIntegration from "@/fetchers/gitlab-integration/get-gitlab-integration";
-function useGetGitlabIntegration(projectId: string) {
+function useGetGitlabIntegration(
+ projectId: string,
+ { enabled = true }: { enabled?: boolean } = {},
+) {
return useQuery({
queryKey: ["gitlab-integration", projectId],
queryFn: () => getGitlabIntegration(projectId),
- enabled: !!projectId,
+ enabled: enabled && Boolean(projectId),
});
}
diff --git a/apps/web/src/hooks/queries/mattermost-integration/use-get-mattermost-integration.ts b/apps/web/src/hooks/queries/mattermost-integration/use-get-mattermost-integration.ts
index b9c396759..296935ff4 100644
--- a/apps/web/src/hooks/queries/mattermost-integration/use-get-mattermost-integration.ts
+++ b/apps/web/src/hooks/queries/mattermost-integration/use-get-mattermost-integration.ts
@@ -1,11 +1,14 @@
import { useQuery } from "@tanstack/react-query";
import getMattermostIntegration from "@/fetchers/mattermost-integration/get-mattermost-integration";
-function useGetMattermostIntegration(projectId: string) {
+function useGetMattermostIntegration(
+ projectId: string,
+ { enabled = true }: { enabled?: boolean } = {},
+) {
return useQuery({
queryKey: ["mattermost-integration", projectId],
queryFn: () => getMattermostIntegration(projectId),
- enabled: Boolean(projectId),
+ enabled: enabled && Boolean(projectId),
});
}
diff --git a/apps/web/src/hooks/queries/slack-integration/use-get-slack-integration.ts b/apps/web/src/hooks/queries/slack-integration/use-get-slack-integration.ts
index 594a5b32a..22e9e15b2 100644
--- a/apps/web/src/hooks/queries/slack-integration/use-get-slack-integration.ts
+++ b/apps/web/src/hooks/queries/slack-integration/use-get-slack-integration.ts
@@ -1,11 +1,14 @@
import { useQuery } from "@tanstack/react-query";
import getSlackIntegration from "@/fetchers/slack-integration/get-slack-integration";
-function useGetSlackIntegration(projectId: string) {
+function useGetSlackIntegration(
+ projectId: string,
+ { enabled = true }: { enabled?: boolean } = {},
+) {
return useQuery({
queryKey: ["slack-integration", projectId],
queryFn: () => getSlackIntegration(projectId),
- enabled: Boolean(projectId),
+ enabled: enabled && Boolean(projectId),
});
}
diff --git a/apps/web/src/hooks/queries/telegram-integration/use-get-telegram-integration.ts b/apps/web/src/hooks/queries/telegram-integration/use-get-telegram-integration.ts
index ff9616646..17086f430 100644
--- a/apps/web/src/hooks/queries/telegram-integration/use-get-telegram-integration.ts
+++ b/apps/web/src/hooks/queries/telegram-integration/use-get-telegram-integration.ts
@@ -1,11 +1,14 @@
import { useQuery } from "@tanstack/react-query";
import getTelegramIntegration from "@/fetchers/telegram-integration/get-telegram-integration";
-function useGetTelegramIntegration(projectId: string) {
+function useGetTelegramIntegration(
+ projectId: string,
+ { enabled = true }: { enabled?: boolean } = {},
+) {
return useQuery({
queryKey: ["telegram-integration", projectId],
queryFn: () => getTelegramIntegration(projectId),
- enabled: Boolean(projectId),
+ enabled: enabled && Boolean(projectId),
});
}
diff --git a/apps/web/src/hooks/use-workspace-permission.ts b/apps/web/src/hooks/use-workspace-permission.ts
index 6ed68fc1c..32e08bf0e 100644
--- a/apps/web/src/hooks/use-workspace-permission.ts
+++ b/apps/web/src/hooks/use-workspace-permission.ts
@@ -26,6 +26,7 @@ const CAPABILITIES = {
updateLabels: { label: ["update"] },
deleteLabels: { label: ["delete"] },
manageWorkspace: { workspace: ["update", "manage_settings"] },
+ manageSettings: { workspace: ["manage_settings"] },
deleteWorkspace: { workspace: ["delete"] },
inviteUsers: { invitation: ["create"] },
manageTeam: { member: ["update", "delete"] },
@@ -105,6 +106,7 @@ export function useWorkspacePermission() {
canUpdateLabels: () => can.updateLabels,
canDeleteLabels: () => can.deleteLabels,
canManageWorkspace: () => can.manageWorkspace,
+ canManageSettings: () => can.manageSettings,
canDeleteWorkspace: () => can.deleteWorkspace,
canInviteUsers: () => can.inviteUsers,
canManageTeam: () => can.manageTeam,
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings.tsx
index 9c496202e..499f76064 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings.tsx
@@ -1,20 +1,7 @@
-import {
- createFileRoute,
- Outlet,
- useLocation,
- useNavigate,
-} from "@tanstack/react-router";
-import { ChevronLeft, PanelLeftIcon } from "lucide-react";
-import { useEffect, useLayoutEffect, useState } from "react";
+import { createFileRoute, Outlet } from "@tanstack/react-router";
import { useTranslation } from "react-i18next";
import PageTitle from "@/components/page-title";
-import { SettingsSidebarProvider } from "@/components/SettingsSidebar";
-import { Button } from "@/components/ui/button";
-import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
-import useAdminAccess from "@/hooks/queries/admin/use-admin-access";
-import useGetProjects from "@/hooks/queries/project/use-get-projects";
-import useActiveWorkspace from "@/hooks/queries/workspace/use-active-workspace";
-import { useIsMobile } from "@/hooks/use-mobile";
+import { SettingsShell } from "@/components/settings/settings-shell";
export const Route = createFileRoute(
"/_layout/_authenticated/dashboard/settings",
@@ -24,163 +11,13 @@ export const Route = createFileRoute(
function SettingsLayout() {
const { t } = useTranslation();
- const navigate = useNavigate();
- const location = useLocation();
- const isMobile = useIsMobile();
- const [settingsMenuOpen, setSettingsMenuOpen] = useState(false);
- const { data: workspace } = useActiveWorkspace();
- const { data: projects } = useGetProjects({
- workspaceId: workspace?.id ?? "",
- });
- const { data: hasAdminAccess } = useAdminAccess();
-
- const getActiveTab = () => {
- const pathname = location.pathname;
- if (pathname.includes("/dashboard/settings/account")) {
- return "account";
- }
- if (pathname.includes("/dashboard/settings/workspace")) {
- return "workspace";
- }
- if (pathname.includes("/dashboard/settings/projects")) {
- return "project";
- }
- if (pathname.includes("/dashboard/settings/admin")) {
- return "admin";
- }
- return "account";
- };
-
- const activeTab = getActiveTab();
-
- useEffect(() => {
- if (location.pathname) {
- setSettingsMenuOpen(false);
- }
- }, [location.pathname]);
-
- useLayoutEffect(() => {
- if (!isMobile) {
- setSettingsMenuOpen(false);
- }
- }, [isMobile]);
return (
<>
<PageTitle title={t("navigation:page.settingsTitle")} />
-
- <div className="flex h-full w-full flex-col bg-sidebar p-2 sm:p-4">
- <div className="relative flex h-full min-h-0 flex-col gap-6 overflow-hidden rounded-md border border-border bg-card p-3 md:gap-4 sm:p-4">
- <div className="shrink-0">
- <div className="flex items-center">
- <Button
- type="button"
- variant="ghost"
- size="icon-sm"
- className="shrink-0 md:hidden"
- aria-label="Open settings menu"
- title="Open settings menu"
- onClick={() => setSettingsMenuOpen(true)}
- >
- <PanelLeftIcon className="size-4" />
- </Button>
-
- <div className="flex items-center gap-1 md:hidden">
- <ChevronLeft className="size-4 text-muted-foreground" />
- <span className="text-lg font-semibold">
- {t("navigation:page.settingsTitle")}
- </span>
- </div>
-
- <Button
- variant="ghost"
- size="sm"
- disabled={!workspace?.id}
- className="hidden md:inline-flex"
- onClick={() => {
- if (!workspace?.id) return;
-
- navigate({
- to: "/dashboard/workspace/$workspaceId",
- params: { workspaceId: workspace.id },
- });
- }}
- >
- <ChevronLeft />
-
- {t("navigation:page.backToWorkspace")}
- </Button>
- </div>
-
- <h1 className="mt-4 hidden pl-1 text-2xl font-semibold md:block">
- {t("navigation:page.settingsTitle")}
- </h1>
-
- <Tabs
- value={activeTab}
- className="w-full max-w-full pt-4 md:w-fit md:pt-2"
- >
- <TabsList className="bg-sidebar gap-2">
- <TabsTrigger
- value="account"
- className="[&[data-state=active]]:rounded-md [&[data-state=active]]:border [&[data-state=active]]:border-border [&[data-state=active]]:bg-card"
- onClick={() =>
- navigate({
- to: "/dashboard/settings/account/information",
- })
- }
- >
- {t("settings:account")}
- </TabsTrigger>
- <TabsTrigger
- value="workspace"
- className="[&[data-state=active]]:rounded-md [&[data-state=active]]:border [&[data-state=active]]:border-border [&[data-state=active]]:bg-card"
- onClick={() =>
- navigate({
- to: "/dashboard/settings/workspace/general",
- })
- }
- >
- {t("navigation:page.settingsWorkspaceTab")}
- </TabsTrigger>
- <TabsTrigger
- disabled={projects?.length === 0}
- value="project"
- className="[&[data-state=active]]:rounded-md [&[data-state=active]]:border [&[data-state=active]]:border-border [&[data-state=active]]:bg-card"
- onClick={() =>
- navigate({
- to: "/dashboard/settings/projects",
- })
- }
- >
- {t("navigation:sidebar.projects")}
- </TabsTrigger>
- {hasAdminAccess ? (
- <TabsTrigger
- value="admin"
- className="[&[data-state=active]]:border [&[data-state=active]]:border-border [&[data-state=active]]:rounded-md [&[data-state=active]]:bg-card"
- onClick={() =>
- navigate({ to: "/dashboard/settings/admin/users" })
- }
- >
- {t("settings:administration")}
- </TabsTrigger>
- ) : null}
- </TabsList>
- </Tabs>
- </div>
-
- <div className="min-h-0 flex-1 overflow-y-auto">
- <SettingsSidebarProvider
- workspaceId={workspace?.id}
- menuOpen={settingsMenuOpen}
- setMenuOpen={setSettingsMenuOpen}
- >
- <Outlet />
- </SettingsSidebarProvider>
- </div>
- </div>
- </div>
+ <SettingsShell>
+ <Outlet />
+ </SettingsShell>
</>
);
}
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account.tsx
index a736b7e22..e73377744 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account.tsx
@@ -1,137 +1,7 @@
-import {
- createFileRoute,
- Link,
- Outlet,
- useLocation,
-} from "@tanstack/react-router";
-import { Bell, Code, KeyRound, Settings, User } from "lucide-react";
-import { useTranslation } from "react-i18next";
-import useAuth from "@/components/providers/auth-provider/hooks/use-auth";
-import SettingsSidebar from "@/components/SettingsSidebar";
-import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
-import { Button } from "@/components/ui/button";
-import {
- SidebarGroup,
- SidebarGroupContent,
- SidebarGroupLabel,
- SidebarMenu,
- SidebarMenuItem,
-} from "@/components/ui/sidebar";
-import { cn } from "@/lib/cn";
-import { getInitials } from "@/lib/get-initials";
+import { createFileRoute, Outlet } from "@tanstack/react-router";
export const Route = createFileRoute(
"/_layout/_authenticated/dashboard/settings/account",
)({
- component: RouteComponent,
+ component: Outlet,
});
-
-function RouteComponent() {
- const { t } = useTranslation();
- const { user } = useAuth();
- const location = useLocation();
- const isActivePath = (path: string) => location.pathname === path;
- const menuItems = [
- {
- title: t("settings:information"),
- url: "/dashboard/settings/account/information",
- icon: User,
- },
- {
- title: t("settings:notifications"),
- url: "/dashboard/settings/account/notifications",
- icon: Bell,
- },
- {
- title: t("settings:preferences"),
- url: "/dashboard/settings/account/preferences",
- icon: Settings,
- },
- {
- title: t("settings:security"),
- url: "/dashboard/settings/account/security",
- icon: KeyRound,
- },
- ];
-
- return (
- <div className="flex gap-6 h-full">
- <SettingsSidebar>
- <div className="p-2">
- <div className="mb-1 flex items-center gap-3 rounded-md px-2 py-2">
- <Avatar className="h-9 w-9">
- <AvatarImage src={user?.image ?? ""} alt={user?.name || ""} />
- <AvatarFallback className="text-xs font-medium border border-border/30">
- {getInitials(user?.name)}
- </AvatarFallback>
- </Avatar>
- <div className="flex min-w-0 flex-col md:min-w-fit">
- <p className="truncate text-sm md:overflow-visible md:text-clip md:whitespace-normal">
- {user?.name}
- </p>
- <p className="truncate text-xs text-sidebar-foreground/70 md:overflow-visible md:text-clip md:whitespace-normal">
- {user?.email}
- </p>
- </div>
- </div>
-
- <SidebarGroup className="gap-1 p-1">
- <SidebarGroupLabel className="h-7 px-2 text-xs uppercase tracking-wide text-sidebar-foreground/70">
- {t("settings:account")}
- </SidebarGroupLabel>
- <SidebarGroupContent>
- <SidebarMenu className="gap-0.5">
- {menuItems.map((item) => (
- <SidebarMenuItem key={item.title}>
- <Button
- render={<Link to={item.url} />}
- variant="ghost"
- size="sm"
- className={cn(
- "h-8 w-full justify-start gap-2 rounded-lg px-2 text-sm font-normal text-sidebar-foreground/80",
- isActivePath(item.url) &&
- "bg-sidebar-accent text-sidebar-accent-foreground",
- )}
- >
- <item.icon className="h-4 w-4" />
- <span>{item.title}</span>
- </Button>
- </SidebarMenuItem>
- ))}
- </SidebarMenu>
- </SidebarGroupContent>
- </SidebarGroup>
-
- <SidebarGroup className="gap-1 p-1">
- <SidebarGroupLabel className="h-7 px-2 text-xs uppercase tracking-wide text-sidebar-foreground/70">
- {t("settings:developer")}
- </SidebarGroupLabel>
- <SidebarGroupContent>
- <SidebarMenu className="gap-0.5">
- <SidebarMenuItem>
- <Button
- render={<Link to="/dashboard/settings/account/developer" />}
- variant="ghost"
- size="sm"
- className={cn(
- "h-8 w-full justify-start gap-2 rounded-lg px-2 text-sm font-normal text-sidebar-foreground/80",
- isActivePath("/dashboard/settings/account/developer") &&
- "bg-sidebar-accent text-sidebar-accent-foreground",
- )}
- >
- <Code className="h-4 w-4" />
- <span>{t("settings:apiKeys")}</span>
- </Button>
- </SidebarMenuItem>
- </SidebarMenu>
- </SidebarGroupContent>
- </SidebarGroup>
- </div>
- </SettingsSidebar>
-
- <div className="flex-1 min-w-0 overflow-y-auto">
- <Outlet />
- </div>
- </div>
- );
-}
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/developer.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/developer.tsx
index c8a7ae5a0..3e61abed4 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/developer.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/developer.tsx
@@ -18,6 +18,7 @@ import {
} from "@/components/ui/card";
import useGetApiKeys from "@/hooks/queries/use-get-api-keys";
import type { CreateApiKeyResponse } from "@/types/api-key";
+import { SettingsPage } from "@/components/settings/settings-page";
export const Route = createFileRoute(
"/_layout/_authenticated/dashboard/settings/account/developer",
@@ -48,16 +49,10 @@ function RouteComponent() {
return (
<>
<PageTitle title={t("settings:developerPage.pageTitle")} />
- <div className="max-w-4xl mx-auto space-y-8">
- <div className="space-y-2">
- <h1 className="text-2xl font-semibold">
- {t("settings:developerPage.title")}
- </h1>
- <p className="text-muted-foreground">
- {t("settings:developerPage.subtitle")}
- </p>
- </div>
-
+ <SettingsPage
+ title={t("settings:developerPage.title")}
+ description={t("settings:developerPage.subtitle")}
+ >
<CardFrame>
<Card className="!rounded-none !border-t-0">
<CardHeader>
@@ -86,7 +81,7 @@ function RouteComponent() {
</CardPanel>
</Card>
</CardFrame>
- </div>
+ </SettingsPage>
<CreateApiKeyDialog
open={createDialogOpen}
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/information.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/information.tsx
index a24717064..aeea4ddb4 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/information.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/information.tsx
@@ -45,6 +45,8 @@ import useUpdateUserProfile from "@/hooks/mutations/use-update-user-profile";
import { getInitials } from "@/lib/get-initials";
import { ACCEPTED_AVATAR_TYPES } from "@/lib/prepare-avatar-image";
import { toast } from "@/lib/toast";
+import { SettingsPage } from "@/components/settings/settings-page";
+import { SettingsSectionHeader } from "@/components/settings/settings-section-header";
export const Route = createFileRoute(
"/_layout/_authenticated/dashboard/settings/account/information",
@@ -262,27 +264,17 @@ function RouteComponent() {
return (
<>
<PageTitle title={t("settings:informationPage.pageTitle")} />
- <div className="max-w-4xl mx-auto space-y-8">
- <div className="space-y-2">
- <h1 className="text-2xl font-semibold">
- {t("settings:informationPage.title")}
- </h1>
- <p className="text-muted-foreground">
- {t("settings:informationPage.subtitle")}
- </p>
- </div>
-
- <div className="space-y-6">
- <div className="space-y-1">
- <h2 className="text-md font-medium">
- {t("settings:informationPage.sectionTitle")}
- </h2>
- <p className="text-xs text-muted-foreground">
- {t("settings:informationPage.sectionSubtitle")}
- </p>
- </div>
-
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <SettingsPage
+ title={t("settings:informationPage.title")}
+ description={t("settings:informationPage.subtitle")}
+ >
+ <div className="space-y-3">
+ <SettingsSectionHeader
+ title={t("settings:informationPage.sectionTitle")}
+ description={t("settings:informationPage.sectionSubtitle")}
+ />
+
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between sm:gap-4">
<div className="space-y-0.5">
<p className="text-sm font-medium">
@@ -410,17 +402,15 @@ function RouteComponent() {
</div>
</div>
- <div className="space-y-6">
- <div className="space-y-1">
- <h2 className="text-md font-medium">
- {t("settings:informationPage.deleteAccount.sectionTitle")}
- </h2>
- <p className="text-xs text-muted-foreground">
- {t("settings:informationPage.deleteAccount.sectionSubtitle")}
- </p>
- </div>
+ <div className="space-y-3">
+ <SettingsSectionHeader
+ title={t("settings:informationPage.deleteAccount.sectionTitle")}
+ description={t(
+ "settings:informationPage.deleteAccount.sectionSubtitle",
+ )}
+ />
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex flex-col items-start gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-4">
<div className="space-y-0.5">
<p className="text-sm font-medium">
@@ -504,7 +494,7 @@ function RouteComponent() {
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
- </div>
+ </SettingsPage>
</>
);
}
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/notifications.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/notifications.tsx
index de23fe3c2..af4fcf2ad 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/notifications.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/notifications.tsx
@@ -2,6 +2,7 @@ import { createFileRoute } from "@tanstack/react-router";
import { useTranslation } from "react-i18next";
import { NotificationPreferencesSettings } from "@/components/account/notification-preferences-settings";
import PageTitle from "@/components/page-title";
+import { SettingsPage } from "@/components/settings/settings-page";
export const Route = createFileRoute(
"/_layout/_authenticated/dashboard/settings/account/notifications",
@@ -15,18 +16,12 @@ function RouteComponent() {
return (
<>
<PageTitle title={t("settings:notificationsPage.pageTitle")} />
- <div className="max-w-4xl mx-auto space-y-8">
- <div className="space-y-2">
- <h1 className="text-2xl font-semibold">
- {t("settings:notificationsPage.title")}
- </h1>
- <p className="text-muted-foreground">
- {t("settings:notificationsPage.subtitle")}
- </p>
- </div>
-
+ <SettingsPage
+ title={t("settings:notificationsPage.title")}
+ description={t("settings:notificationsPage.subtitle")}
+ >
<NotificationPreferencesSettings />
- </div>
+ </SettingsPage>
</>
);
}
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/preferences.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/preferences.tsx
index e6de0b44c..061ab9c5f 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/preferences.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/preferences.tsx
@@ -4,8 +4,9 @@ import {
supportedLocales,
} from "@i18n/resources";
import { createFileRoute } from "@tanstack/react-router";
-import { RotateCcw } from "lucide-react";
+import { List, RotateCcw, SquareKanban } from "lucide-react";
import { useTranslation } from "react-i18next";
+import { ThemePicker } from "@/components/account/theme-picker";
import { Button } from "@/components/ui/button";
import { Label } from "@/components/ui/label";
import {
@@ -17,6 +18,7 @@ import {
} from "@/components/ui/select";
import { Separator } from "@/components/ui/separator";
import { Switch } from "@/components/ui/switch";
+import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
import { useLocale } from "@/hooks/use-locale";
import {
isWeekStartDay,
@@ -24,6 +26,8 @@ import {
WEEK_START_DAYS,
type WeekStartDay,
} from "@/store/user-preferences";
+import { SettingsPage } from "@/components/settings/settings-page";
+import { SettingsSectionHeader } from "@/components/settings/settings-section-header";
export const Route = createFileRoute(
"/_layout/_authenticated/dashboard/settings/account/preferences",
@@ -70,16 +74,6 @@ function RouteComponent() {
setSidebarDefaultOpen,
} = useUserPreferencesStore();
- const themeLabels: Record<string, string> = {
- light: t("settings:preferencesPage.themeLight"),
- dark: t("settings:preferencesPage.themeDark"),
- system: t("settings:preferencesPage.themeSystem"),
- };
-
- const viewLabels: Record<string, string> = {
- board: t("settings:preferencesPage.board"),
- list: t("settings:preferencesPage.list"),
- };
const weekStartLabels: Record<WeekStartDay, string> = {
0: t("settings:preferencesPage.weekStartsOnSunday"),
1: t("settings:preferencesPage.weekStartsOnMonday"),
@@ -89,63 +83,25 @@ function RouteComponent() {
const selectedLocale: AppLocale = locale ?? defaultLocale;
return (
- <div className="max-w-4xl mx-auto space-y-8">
- <div className="space-y-2">
- <h1 className="text-2xl font-semibold">
- {t("settings:preferencesPage.title")}
- </h1>
- <p className="text-muted-foreground">
- {t("settings:preferencesPage.subtitle")}
- </p>
+ <SettingsPage
+ title={t("settings:preferencesPage.title")}
+ description={t("settings:preferencesPage.subtitle")}
+ >
+ <div className="space-y-3">
+ <SettingsSectionHeader
+ title={t("settings:preferencesPage.theme")}
+ description={t("settings:preferencesPage.themeDescription")}
+ />
+ <ThemePicker value={theme} onChange={setTheme} />
</div>
- <div className="space-y-6">
- <div className="space-y-1">
- <h2 className="text-md font-medium">
- {t("settings:preferencesPage.appearanceTitle")}
- </h2>
- <p className="text-xs text-muted-foreground">
- {t("settings:preferencesPage.appearanceSubtitle")}
- </p>
- </div>
-
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
- <div className="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-4">
- <div className="space-y-0.5">
- <Label className="text-sm font-medium">
- {t("settings:preferencesPage.theme")}
- </Label>
- <p className="text-xs text-muted-foreground">
- {t("settings:preferencesPage.themeDescription")}
- </p>
- </div>
- <Select
- value={theme}
- onValueChange={(value) => value && setTheme(value)}
- >
- <SelectTrigger size="sm" className="w-full sm:w-40">
- <SelectValue
- placeholder={t("settings:preferencesPage.selectTheme")}
- >
- {themeLabels[theme]}
- </SelectValue>
- </SelectTrigger>
- <SelectContent>
- <SelectItem value="light">
- {t("settings:preferencesPage.themeLight")}
- </SelectItem>
- <SelectItem value="dark">
- {t("settings:preferencesPage.themeDark")}
- </SelectItem>
- <SelectItem value="system">
- {t("settings:preferencesPage.themeSystem")}
- </SelectItem>
- </SelectContent>
- </Select>
- </div>
-
- <Separator />
+ <div className="space-y-3">
+ <SettingsSectionHeader
+ title={t("settings:preferencesPage.appearanceTitle")}
+ description={t("settings:preferencesPage.appearanceSubtitle")}
+ />
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-4">
<div className="space-y-0.5">
<Label className="text-sm font-medium">
@@ -235,26 +191,25 @@ function RouteComponent() {
{t("settings:preferencesPage.defaultViewDescription")}
</p>
</div>
- <Select
- value={viewMode}
- onValueChange={(value) => value && setViewMode(value)}
+ <ToggleGroup
+ value={[viewMode]}
+ onValueChange={(values) => {
+ const next = values[0];
+ if (next === "board" || next === "list") setViewMode(next);
+ }}
+ variant="outline"
+ size="sm"
+ aria-label={t("settings:preferencesPage.defaultView")}
>
- <SelectTrigger size="sm" className="w-full sm:w-40">
- <SelectValue
- placeholder={t("settings:preferencesPage.selectViewMode")}
- >
- {viewLabels[viewMode]}
- </SelectValue>
- </SelectTrigger>
- <SelectContent>
- <SelectItem value="board">
- {t("settings:preferencesPage.board")}
- </SelectItem>
- <SelectItem value="list">
- {t("settings:preferencesPage.list")}
- </SelectItem>
- </SelectContent>
- </Select>
+ <ToggleGroupItem value="board" className="gap-1.5 px-2.5">
+ <SquareKanban aria-hidden="true" />
+ {t("settings:preferencesPage.board")}
+ </ToggleGroupItem>
+ <ToggleGroupItem value="list" className="gap-1.5 px-2.5">
+ <List aria-hidden="true" />
+ {t("settings:preferencesPage.list")}
+ </ToggleGroupItem>
+ </ToggleGroup>
</div>
<Separator />
@@ -303,14 +258,12 @@ function RouteComponent() {
<div className="space-y-6">
<div className="flex flex-col items-start gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-4">
- <div className="space-y-1">
- <h2 className="text-md font-medium">
- {t("settings:preferencesPage.displayOptions")}
- </h2>
- <p className="text-xs text-muted-foreground">
- {t("settings:preferencesPage.displayOptionsDescription")}
- </p>
- </div>
+ <SettingsSectionHeader
+ title={t("settings:preferencesPage.displayOptions")}
+ description={t(
+ "settings:preferencesPage.displayOptionsDescription",
+ )}
+ />
<Button
variant="outline"
size="xs"
@@ -322,7 +275,7 @@ function RouteComponent() {
</Button>
</div>
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex items-center justify-between">
<div className="space-y-0.5">
<Label
@@ -415,6 +368,6 @@ function RouteComponent() {
</div>
</div>
</div>
- </div>
+ </SettingsPage>
);
}
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/security.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/security.tsx
index 6563d3e3e..c05dbe60e 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/security.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/security.tsx
@@ -2,6 +2,7 @@ import { createFileRoute } from "@tanstack/react-router";
import { useTranslation } from "react-i18next";
import { ChangePasswordSettings } from "@/components/account/change-password-settings";
import PageTitle from "@/components/page-title";
+import { SettingsPage } from "@/components/settings/settings-page";
export const Route = createFileRoute(
"/_layout/_authenticated/dashboard/settings/account/security",
@@ -15,18 +16,12 @@ function RouteComponent() {
return (
<>
<PageTitle title={t("settings:securityPage.pageTitle")} />
- <div className="max-w-4xl mx-auto space-y-8">
- <div className="space-y-2">
- <h1 className="text-2xl font-semibold">
- {t("settings:securityPage.title")}
- </h1>
- <p className="text-muted-foreground">
- {t("settings:securityPage.subtitle")}
- </p>
- </div>
-
+ <SettingsPage
+ title={t("settings:securityPage.title")}
+ description={t("settings:securityPage.subtitle")}
+ >
<ChangePasswordSettings />
- </div>
+ </SettingsPage>
</>
);
}
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects.tsx
index 78cf4f23b..4e2d6fcdd 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects.tsx
@@ -1,33 +1,14 @@
import {
createFileRoute,
- Link,
Outlet,
useLocation,
useNavigate,
} from "@tanstack/react-router";
-import { CalendarDays, Eye, GitBranch, Plug, Settings } from "lucide-react";
import { useEffect } from "react";
import { useTranslation } from "react-i18next";
-import SettingsSidebar from "@/components/SettingsSidebar";
-import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
-import { Button } from "@/components/ui/button";
-import {
- Select,
- SelectContent,
- SelectItem,
- SelectTrigger,
-} from "@/components/ui/select";
-import {
- SidebarGroup,
- SidebarGroupContent,
- SidebarGroupLabel,
- SidebarMenu,
- SidebarMenuItem,
-} from "@/components/ui/sidebar";
+import { SettingsPage } from "@/components/settings/settings-page";
import useGetProjects from "@/hooks/queries/project/use-get-projects";
-import { useWorkspacePermission } from "@/hooks/use-workspace-permission";
-import { cn } from "@/lib/cn";
-import { getInitials } from "@/lib/get-initials";
+import useActiveWorkspace from "@/hooks/queries/workspace/use-active-workspace";
export const Route = createFileRoute(
"/_layout/_authenticated/dashboard/settings/projects",
@@ -37,184 +18,33 @@ export const Route = createFileRoute(
function RouteComponent() {
const { t } = useTranslation();
- const { workspace, role } = useWorkspacePermission();
+ const { data: workspace } = useActiveWorkspace();
const location = useLocation();
const navigate = useNavigate();
- const menuItems = [
- {
- title: t("settings:projectGeneral.title"),
- icon: Settings,
- segment: "general",
- },
- {
- title: t("settings:projectVisibility.title"),
- icon: Eye,
- segment: "visibility",
- },
- {
- title: t("settings:calendarFeeds.title"),
- icon: CalendarDays,
- segment: "calendar",
- },
- {
- title: t("settings:projectIntegrations.title"),
- icon: Plug,
- segment: "integrations",
- },
- {
- title: t("settings:projectWorkflow.title"),
- icon: GitBranch,
- segment: "workflow",
- },
- ];
const { data: projects } = useGetProjects({
- workspaceId: workspace?.id || "",
+ workspaceId: workspace?.id ?? "",
});
-
- const workspaceInitials = getInitials(workspace?.name, "WS");
-
- const selectedProjectMatch = location.pathname.match(
- /^\/dashboard\/settings\/projects\/([^/]+)\//,
- );
- const selectedProjectId = selectedProjectMatch?.[1] || "";
- const selectedSegment =
- location.pathname.match(
- /^\/dashboard\/settings\/projects\/[^/]+\/([^/]+)/,
- )?.[1] || "general";
+ const isProjectsRoot =
+ location.pathname.replace(/\/+$/, "") === "/dashboard/settings/projects";
useEffect(() => {
- const isProjectsRoot =
- location.pathname === "/dashboard/settings/projects" ||
- location.pathname === "/dashboard/settings/projects/";
-
- if (!isProjectsRoot || !projects || projects.length === 0) {
- return;
- }
+ if (!isProjectsRoot || !projects?.length) return;
void navigate({
to: "/dashboard/settings/projects/$projectId/general",
params: { projectId: projects[0].id },
replace: true,
});
- }, [location.pathname, navigate, projects]);
-
- const selectedProject = projects?.find(
- (project) => project.id === selectedProjectId,
- );
-
- return (
- <div className="flex gap-6 h-full">
- <SettingsSidebar>
- <div className="p-2">
- <div className="mb-1 flex items-center gap-3 rounded-md px-2 py-2">
- <Avatar className="h-8 w-8">
- <AvatarImage
- src={workspace?.logo ?? ""}
- alt={workspace?.name || ""}
- />
- <AvatarFallback className="border border-sidebar-border/70 bg-sidebar-accent/70 text-xs font-medium text-sidebar-accent-foreground">
- {workspaceInitials}
- </AvatarFallback>
- </Avatar>
- <div className="flex min-w-0 flex-col md:min-w-fit">
- <p className="truncate text-sm md:overflow-visible md:text-clip md:whitespace-normal">
- {workspace?.name}
- </p>
- <p className="truncate text-xs text-sidebar-foreground/60 capitalize md:overflow-visible md:text-clip md:whitespace-normal">
- {t(`team:roles.${role}`, { defaultValue: role })}
- </p>
- </div>
- </div>
-
- <SidebarGroup className="gap-1 p-1">
- <SidebarGroupLabel className="h-7 px-2 text-xs uppercase tracking-wide text-sidebar-foreground/70">
- {t("navigation:projectSettings.projectLabel")}
- </SidebarGroupLabel>
- <SidebarGroupContent>
- <Select
- value={selectedProjectId}
- onValueChange={(projectId) => {
- const nextSegment = menuItems.some(
- (item) => item.segment === selectedSegment,
- )
- ? selectedSegment
- : "general";
-
- void navigate({
- to: `/dashboard/settings/projects/${projectId}/${nextSegment}`,
- });
- }}
- >
- <SelectTrigger
- className="h-8 text-sm font-normal text-foreground"
- size="sm"
- >
- <span className="truncate font-normal text-foreground">
- {selectedProject?.name ||
- (projects?.length
- ? t("settings:projectSwitcher.selectProject")
- : t("settings:projectSwitcher.noProjects"))}
- </span>
- </SelectTrigger>
- <SelectContent
- side="bottom"
- align="start"
- sideOffset={6}
- alignItemWithTrigger={false}
- className="w-(--anchor-width)"
- >
- {projects?.map((project) => (
- <SelectItem key={project.id} value={project.id}>
- <span className="font-normal text-foreground">
- {project.name}
- </span>
- </SelectItem>
- ))}
- </SelectContent>
- </Select>
- </SidebarGroupContent>
- </SidebarGroup>
-
- <SidebarGroup className="gap-1 p-1">
- <SidebarGroupLabel className="h-7 px-2 text-xs uppercase tracking-wide text-sidebar-foreground/70">
- {t("navigation:page.settingsTitle")}
- </SidebarGroupLabel>
- <SidebarGroupContent>
- <SidebarMenu className="gap-0.5">
- {menuItems.map((item) => {
- const toUrl = selectedProject
- ? `/dashboard/settings/projects/${selectedProject.id}/${item.segment}`
- : "/dashboard/settings/projects";
- const isActive = selectedSegment === item.segment;
-
- return (
- <SidebarMenuItem key={item.title}>
- <Button
- render={<Link to={toUrl} />}
- variant="ghost"
- size="sm"
- disabled={!selectedProject}
- className={cn(
- "h-8 w-full justify-start gap-2 rounded-lg px-2 text-sm font-normal text-sidebar-foreground/80",
- isActive &&
- "bg-sidebar-accent text-sidebar-accent-foreground",
- )}
- >
- <item.icon className="h-3.5 w-3.5" />
- <span>{item.title}</span>
- </Button>
- </SidebarMenuItem>
- );
- })}
- </SidebarMenu>
- </SidebarGroupContent>
- </SidebarGroup>
- </div>
- </SettingsSidebar>
-
- <div className="flex-1 min-w-0 overflow-y-auto">
- <Outlet />
- </div>
- </div>
- );
+ }, [isProjectsRoot, navigate, projects]);
+
+ if (isProjectsRoot && projects?.length === 0) {
+ return (
+ <SettingsPage
+ title={t("navigation:sidebar.projects")}
+ description={t("settings:projectSwitcher.noProjects")}
+ />
+ );
+ }
+
+ return <Outlet />;
}
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/calendar.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/calendar.tsx
index 5a4735390..c824a76be 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/calendar.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/calendar.tsx
@@ -2,6 +2,7 @@ import { createFileRoute } from "@tanstack/react-router";
import { useTranslation } from "react-i18next";
import PageTitle from "@/components/page-title";
import { CalendarFeedSettings } from "@/components/project/calendar-feed-settings";
+import { SettingsPage } from "@/components/settings/settings-page";
export const Route = createFileRoute(
"/_layout/_authenticated/dashboard/settings/projects/$projectId/calendar",
@@ -13,17 +14,12 @@ function CalendarSettings() {
return (
<>
<PageTitle title={t("settings:calendarFeeds.title")} />
- <div className="max-w-4xl mx-auto space-y-8">
- <div className="space-y-2">
- <h1 className="text-2xl font-semibold">
- {t("settings:calendarFeeds.title")}
- </h1>
- <p className="text-muted-foreground">
- {t("settings:calendarFeeds.subtitle")}
- </p>
- </div>
+ <SettingsPage
+ title={t("settings:calendarFeeds.title")}
+ description={t("settings:calendarFeeds.subtitle")}
+ >
<CalendarFeedSettings key={projectId} projectId={projectId} />
- </div>
+ </SettingsPage>
</>
);
}
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/general.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/general.tsx
index f95f4d7b5..a7b2329af 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/general.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/general.tsx
@@ -66,6 +66,8 @@ import { useWorkspacePermission } from "@/hooks/use-workspace-permission";
import { cn } from "@/lib/cn";
import { toast } from "@/lib/toast";
import useProjectStore from "@/store/project.ts";
+import { SettingsPage } from "@/components/settings/settings-page";
+import { SettingsSectionHeader } from "@/components/settings/settings-section-header";
export const Route = createFileRoute(
"/_layout/_authenticated/dashboard/settings/projects/$projectId/general",
@@ -518,27 +520,17 @@ function RouteComponent() {
return (
<>
<PageTitle title={t("settings:projectGeneral.pageTitle")} />
- <div className="max-w-4xl mx-auto space-y-8">
- <div className="space-y-2">
- <h1 className="text-2xl font-semibold">
- {t("settings:projectGeneral.title")}
- </h1>
- <p className="text-muted-foreground">
- {t("settings:projectGeneral.subtitle")}
- </p>
- </div>
-
- <div className="space-y-6">
- <div className="space-y-1">
- <h2 className="text-md font-medium">
- {t("settings:projectGeneral.projectInfoTitle")}
- </h2>
- <p className="text-xs text-muted-foreground">
- {t("settings:projectGeneral.projectInfoSubtitle")}
- </p>
- </div>
-
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <SettingsPage
+ title={t("settings:projectGeneral.title")}
+ description={t("settings:projectGeneral.subtitle")}
+ >
+ <div className="space-y-3">
+ <SettingsSectionHeader
+ title={t("settings:projectGeneral.projectInfoTitle")}
+ description={t("settings:projectGeneral.projectInfoSubtitle")}
+ />
+
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-4">
<div className="space-y-0.5">
<p className="text-sm font-medium">
@@ -864,17 +856,13 @@ function RouteComponent() {
</div>
{canDelete && (
- <div className="space-y-6">
- <div className="space-y-1">
- <h2 className="text-md font-medium">
- {t("settings:projectGeneral.dangerZone")}
- </h2>
- <p className="text-xs text-muted-foreground">
- {t("settings:projectGeneral.dangerZoneSubtitle")}
- </p>
- </div>
+ <div className="space-y-3">
+ <SettingsSectionHeader
+ title={t("settings:projectGeneral.dangerZone")}
+ description={t("settings:projectGeneral.dangerZoneSubtitle")}
+ />
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex flex-col items-start gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-4">
<div className="space-y-0.5">
<p className="text-sm font-medium">
@@ -969,7 +957,7 @@ function RouteComponent() {
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
- </div>
+ </SettingsPage>
</>
);
}
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/integrations.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/integrations.tsx
index d211b80f6..98500b6e9 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/integrations.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/integrations.tsx
@@ -1,31 +1,11 @@
import { createFileRoute } from "@tanstack/react-router";
-import {
- ChevronDown,
- FolderGit,
- MessageCircle,
- Radio,
- Send,
- Server,
- Webhook,
-} from "lucide-react";
-import type { ReactNode } from "react";
import { useTranslation } from "react-i18next";
-import { GithubIcon } from "@/components/icons/github-icon";
-import { GitlabIcon } from "@/components/icons/gitlab-icon";
import PageTitle from "@/components/page-title";
-import { DiscordIntegrationSettings } from "@/components/project/discord-integration-settings";
-import { GenericWebhookIntegrationSettings } from "@/components/project/generic-webhook-integration-settings";
-import { GiteaIntegrationSettings } from "@/components/project/gitea-integration-settings";
-import { GitHubIntegrationSettings } from "@/components/project/github-integration-settings";
-import { GitlabIntegrationSettings } from "@/components/project/gitlab-integration-settings";
-import { MattermostIntegrationSettings } from "@/components/project/mattermost-integration-settings";
-import { SlackIntegrationSettings } from "@/components/project/slack-integration-settings";
-import { TelegramIntegrationSettings } from "@/components/project/telegram-integration-settings";
-import {
- Collapsible,
- CollapsibleContent,
- CollapsibleTrigger,
-} from "@/components/ui/collapsible";
+import { INTEGRATIONS } from "@/components/project/integrations/integration-definitions";
+import { IntegrationsGroup } from "@/components/project/integrations/integrations-group";
+import { useIntegrationStatuses } from "@/components/project/integrations/use-integration-statuses";
+import { SettingsPage } from "@/components/settings/settings-page";
+import { useWorkspacePermission } from "@/hooks/use-workspace-permission";
export const Route = createFileRoute(
"/_layout/_authenticated/dashboard/settings/projects/$projectId/integrations",
@@ -36,127 +16,33 @@ export const Route = createFileRoute(
function RouteComponent() {
const { t } = useTranslation();
const { projectId } = Route.useParams();
+ const { canManageSettings } = useWorkspacePermission();
+ const statuses = useIntegrationStatuses(projectId, canManageSettings());
return (
<>
<PageTitle title={t("settings:projectIntegrations.pageTitle")} />
- <div className="max-w-4xl mx-auto space-y-8">
- <div className="space-y-2">
- <h1 className="text-2xl font-semibold">
- {t("settings:projectIntegrations.title")}
- </h1>
- <p className="text-muted-foreground">
- {t("settings:projectIntegrations.subtitle")}
- </p>
- </div>
-
- <div className="space-y-6">
- <IntegrationSection
- icon={<GithubIcon className="size-4" />}
- subtitle={t("settings:projectIntegrations.githubSectionSubtitle")}
- title={t("settings:projectIntegrations.githubSectionTitle")}
- >
- <GitHubIntegrationSettings projectId={projectId} />
- </IntegrationSection>
-
- <IntegrationSection
- icon={<FolderGit className="size-4" />}
- subtitle={t("settings:projectIntegrations.giteaSectionSubtitle")}
- title={t("settings:projectIntegrations.giteaSectionTitle")}
- >
- <GiteaIntegrationSettings projectId={projectId} />
- </IntegrationSection>
-
- <IntegrationSection
- icon={<GitlabIcon className="size-4" />}
- subtitle={t("settings:projectIntegrations.gitlabSectionSubtitle")}
- title={t("settings:projectIntegrations.gitlabSectionTitle")}
- >
- <GitlabIntegrationSettings projectId={projectId} />
- </IntegrationSection>
-
- <IntegrationSection
- icon={<MessageCircle className="size-4" />}
- subtitle={t("settings:projectIntegrations.discordSectionSubtitle")}
- title={t("settings:projectIntegrations.discordSectionTitle")}
- >
- <DiscordIntegrationSettings projectId={projectId} />
- </IntegrationSection>
-
- <IntegrationSection
- icon={<Radio className="size-4" />}
- subtitle={t(
- "settings:projectIntegrations.genericWebhookSectionSubtitle",
- )}
- title={t("settings:projectIntegrations.genericWebhookSectionTitle")}
- >
- <GenericWebhookIntegrationSettings projectId={projectId} />
- </IntegrationSection>
-
- <IntegrationSection
- icon={<Webhook className="size-4" />}
- subtitle={t("settings:projectIntegrations.slackSectionSubtitle")}
- title={t("settings:projectIntegrations.slackSectionTitle")}
- >
- <SlackIntegrationSettings projectId={projectId} />
- </IntegrationSection>
-
- <IntegrationSection
- icon={<Server className="size-4" />}
- subtitle={t(
- "settings:projectIntegrations.mattermostSectionSubtitle",
- )}
- title={t("settings:projectIntegrations.mattermostSectionTitle")}
- >
- <MattermostIntegrationSettings projectId={projectId} />
- </IntegrationSection>
-
- <IntegrationSection
- icon={<Send className="size-4" />}
- subtitle={t("settings:projectIntegrations.telegramSectionSubtitle")}
- title={t("settings:projectIntegrations.telegramSectionTitle")}
- >
- <TelegramIntegrationSettings projectId={projectId} />
- </IntegrationSection>
- </div>
- </div>
+ <SettingsPage
+ title={t("settings:projectIntegrations.title")}
+ description={t("settings:projectIntegrations.subtitle")}
+ >
+ <IntegrationsGroup
+ title={t("settings:projectIntegrations.codeHostingTitle")}
+ integrations={INTEGRATIONS.filter(
+ (integration) => integration.category === "code",
+ )}
+ projectId={projectId}
+ statuses={statuses}
+ />
+ <IntegrationsGroup
+ title={t("settings:projectIntegrations.chatTitle")}
+ integrations={INTEGRATIONS.filter(
+ (integration) => integration.category === "chat",
+ )}
+ projectId={projectId}
+ statuses={statuses}
+ />
+ </SettingsPage>
</>
);
}
-
-function IntegrationSection({
- title,
- subtitle,
- icon,
- defaultOpen = false,
- children,
-}: {
- title: string;
- subtitle: string;
- icon: ReactNode;
- defaultOpen?: boolean;
- children: ReactNode;
-}) {
- return (
- <Collapsible
- className="rounded-xl border border-border bg-background"
- defaultOpen={defaultOpen}
- >
- <CollapsibleTrigger className="group flex w-full items-center justify-between gap-4 px-4 py-4 text-left">
- <div className="flex min-w-0 items-start gap-3">
- <div className="mt-0.5 text-muted-foreground">{icon}</div>
- <div className="min-w-0">
- <h2 className="text-md font-medium">{title}</h2>
- <p className="text-xs text-muted-foreground">{subtitle}</p>
- </div>
- </div>
-
- <ChevronDown className="size-4 shrink-0 text-muted-foreground transition-transform duration-200 group-data-[panel-open]:rotate-180" />
- </CollapsibleTrigger>
-
- <CollapsibleContent>
- <div className="border-t border-border p-4">{children}</div>
- </CollapsibleContent>
- </Collapsible>
- );
-}
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/visibility.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/visibility.tsx
index 246998893..52457a03a 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/visibility.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/visibility.tsx
@@ -13,6 +13,8 @@ import useGetProject from "@/hooks/queries/project/use-get-project";
import useActiveWorkspace from "@/hooks/queries/workspace/use-active-workspace";
import { useWorkspacePermission } from "@/hooks/use-workspace-permission";
import { toast } from "@/lib/toast";
+import { SettingsPage } from "@/components/settings/settings-page";
+import { SettingsSectionHeader } from "@/components/settings/settings-section-header";
export const Route = createFileRoute(
"/_layout/_authenticated/dashboard/settings/projects/$projectId/visibility",
@@ -88,27 +90,17 @@ function RouteComponent() {
return (
<>
<PageTitle title={t("settings:projectVisibility.pageTitle")} />
- <div className="max-w-4xl mx-auto space-y-8">
- <div className="space-y-2">
- <h1 className="text-2xl font-semibold">
- {t("settings:projectVisibility.title")}
- </h1>
- <p className="text-muted-foreground">
- {t("settings:projectVisibility.subtitle")}
- </p>
- </div>
-
- <div className="space-y-6">
- <div className="space-y-1">
- <h2 className="text-md font-medium">
- {t("settings:projectVisibility.sectionTitle")}
- </h2>
- <p className="text-xs text-muted-foreground">
- {t("settings:projectVisibility.sectionSubtitle")}
- </p>
- </div>
+ <SettingsPage
+ title={t("settings:projectVisibility.title")}
+ description={t("settings:projectVisibility.subtitle")}
+ >
+ <div className="space-y-3">
+ <SettingsSectionHeader
+ title={t("settings:projectVisibility.sectionTitle")}
+ description={t("settings:projectVisibility.sectionSubtitle")}
+ />
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex items-center justify-between">
<div className="space-y-0.5">
<Label className="text-sm font-medium">
@@ -157,7 +149,7 @@ function RouteComponent() {
</div>
</div>
</div>
- </div>
+ </SettingsPage>
</>
);
}
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/workflow.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/workflow.tsx
index 5cfc5f4b7..22c74faae 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/workflow.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/workflow.tsx
@@ -4,6 +4,8 @@ import PageTitle from "@/components/page-title";
import ColumnEditor from "@/components/project/column-editor";
import CustomFieldEditor from "@/components/project/custom-field-editor";
import WorkflowEditor from "@/components/project/workflow-editor";
+import { SettingsPage } from "@/components/settings/settings-page";
+import { SettingsSectionHeader } from "@/components/settings/settings-section-header";
export const Route = createFileRoute(
"/_layout/_authenticated/dashboard/settings/projects/$projectId/workflow",
@@ -18,52 +20,34 @@ function RouteComponent() {
return (
<>
<PageTitle title={t("settings:projectWorkflow.pageTitle")} />
- <div className="max-w-4xl mx-auto space-y-8">
- <div className="space-y-2">
- <h1 className="text-2xl font-semibold">
- {t("settings:projectWorkflow.title")}
- </h1>
- <p className="text-muted-foreground">
- {t("settings:projectWorkflow.subtitle")}
- </p>
- </div>
-
- <div className="space-y-6">
- <div className="space-y-1">
- <h2 className="text-md font-medium">
- {t("settings:projectWorkflow.columnsTitle")}
- </h2>
- <p className="text-xs text-muted-foreground">
- {t("settings:projectWorkflow.columnsDescription")}
- </p>
- </div>
+ <SettingsPage
+ title={t("settings:projectWorkflow.title")}
+ description={t("settings:projectWorkflow.subtitle")}
+ >
+ <div className="space-y-3">
+ <SettingsSectionHeader
+ title={t("settings:projectWorkflow.columnsTitle")}
+ description={t("settings:projectWorkflow.columnsDescription")}
+ />
<ColumnEditor projectId={projectId} />
</div>
- <div className="space-y-6">
- <div className="space-y-1">
- <h2 className="text-md font-medium">
- {t("settings:projectWorkflow.customFieldsTitle")}
- </h2>
- <p className="text-xs text-muted-foreground">
- {t("settings:projectWorkflow.customFieldsDescription")}
- </p>
- </div>
+ <div className="space-y-3">
+ <SettingsSectionHeader
+ title={t("settings:projectWorkflow.customFieldsTitle")}
+ description={t("settings:projectWorkflow.customFieldsDescription")}
+ />
<CustomFieldEditor projectId={projectId} />
</div>
- <div className="space-y-6">
- <div className="space-y-1">
- <h2 className="text-md font-medium">
- {t("settings:projectWorkflow.automationTitle")}
- </h2>
- <p className="text-xs text-muted-foreground">
- {t("settings:projectWorkflow.automationDescription")}
- </p>
- </div>
+ <div className="space-y-3">
+ <SettingsSectionHeader
+ title={t("settings:projectWorkflow.automationTitle")}
+ description={t("settings:projectWorkflow.automationDescription")}
+ />
<WorkflowEditor projectId={projectId} />
</div>
- </div>
+ </SettingsPage>
</>
);
}
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace.tsx
index 2c9f7b242..945ddcc12 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace.tsx
@@ -1,28 +1,6 @@
-import {
- createFileRoute,
- Link,
- Outlet,
- redirect,
- useLocation,
-} from "@tanstack/react-router";
-import { CreditCard, Settings, Shield, Tag } from "lucide-react";
-import { useTranslation } from "react-i18next";
-import SettingsSidebar from "@/components/SettingsSidebar";
-import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
-import { Button } from "@/components/ui/button";
-import {
- SidebarGroup,
- SidebarGroupContent,
- SidebarGroupLabel,
- SidebarMenu,
- SidebarMenuItem,
-} from "@/components/ui/sidebar";
+import { createFileRoute, Outlet, redirect } from "@tanstack/react-router";
import getWorkspaces from "@/fetchers/workspace/get-workspaces";
-import useGetConfig from "@/hooks/queries/config/use-get-config";
-import { useWorkspacePermission } from "@/hooks/use-workspace-permission";
import { authClient } from "@/lib/auth-client";
-import { cn } from "@/lib/cn";
-import { getInitials } from "@/lib/get-initials";
import type Workspace from "@/types/workspace";
export const Route = createFileRoute(
@@ -61,99 +39,5 @@ export const Route = createFileRoute(
organizationId: workspaces[0].id,
});
},
- component: RouteComponent,
+ component: Outlet,
});
-
-function RouteComponent() {
- const { t } = useTranslation();
- const { workspace, role } = useWorkspacePermission();
- const { data: config } = useGetConfig();
- const location = useLocation();
- const menuItems = [
- {
- title: t("settings:workspaceGeneral.title"),
- url: "/dashboard/settings/workspace/general",
- icon: Settings,
- },
- {
- title: t("settings:workspaceRoles.title", { defaultValue: "Roles" }),
- url: "/dashboard/settings/workspace/roles",
- icon: Shield,
- },
- {
- title: t("settings:workspaceLabels.title", { defaultValue: "Labels" }),
- url: "/dashboard/settings/workspace/labels",
- icon: Tag,
- },
- ...(config?.billingEnabled
- ? [
- {
- title: "Billing",
- url: "/dashboard/settings/workspace/billing",
- icon: CreditCard,
- },
- ]
- : []),
- ];
- const isActivePath = (path: string) => location.pathname === path;
- const workspaceInitials = getInitials(workspace?.name, "WS");
-
- return (
- <div className="flex gap-6 h-full">
- <SettingsSidebar>
- <div className="p-2">
- <div className="mb-1 flex items-center gap-3 rounded-md px-2 py-2">
- <Avatar className="h-8 w-8">
- <AvatarImage
- src={workspace?.logo ?? ""}
- alt={workspace?.name || ""}
- />
- <AvatarFallback className="border border-sidebar-border/70 bg-sidebar-accent/70 text-xs font-medium text-sidebar-accent-foreground">
- {workspaceInitials}
- </AvatarFallback>
- </Avatar>
- <div className="flex min-w-0 flex-col md:min-w-fit">
- <p className="truncate text-sm md:overflow-visible md:text-clip md:whitespace-normal">
- {workspace?.name}
- </p>
- <p className="truncate text-xs text-sidebar-foreground/60 capitalize md:overflow-visible md:text-clip md:whitespace-normal">
- {t(`team:roles.${role}`, { defaultValue: role })}
- </p>
- </div>
- </div>
-
- <SidebarGroup className="gap-1 p-1">
- <SidebarGroupLabel className="h-7 px-2 text-xs uppercase tracking-wide text-sidebar-foreground/70">
- {t("navigation:page.settingsWorkspaceTab")}
- </SidebarGroupLabel>
- <SidebarGroupContent>
- <SidebarMenu className="gap-0.5">
- {menuItems.map((item) => (
- <SidebarMenuItem key={item.title}>
- <Button
- render={<Link to={item.url} />}
- variant="ghost"
- size="sm"
- className={cn(
- "h-8 w-full justify-start gap-2 rounded-lg px-2 text-sm font-normal text-sidebar-foreground/80",
- isActivePath(item.url) &&
- "bg-sidebar-accent text-sidebar-accent-foreground",
- )}
- >
- <item.icon className="h-4 w-4" />
- <span>{item.title}</span>
- </Button>
- </SidebarMenuItem>
- ))}
- </SidebarMenu>
- </SidebarGroupContent>
- </SidebarGroup>
- </div>
- </SettingsSidebar>
-
- <div className="flex-1 min-w-0 overflow-y-auto">
- <Outlet />
- </div>
- </div>
- );
-}
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/billing.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/billing.tsx
index ff296c762..ad59e0003 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/billing.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/billing.tsx
@@ -1,6 +1,5 @@
import { createFileRoute } from "@tanstack/react-router";
import { useTranslation } from "react-i18next";
-import { BillingSectionHeader } from "@/components/billing/billing-section-header";
import { FoundingFreeCard } from "@/components/billing/founding-free-card";
import { PlanPicker } from "@/components/billing/plan-picker";
import { SubscriptionCard } from "@/components/billing/subscription-card";
@@ -10,6 +9,8 @@ import { Spinner } from "@/components/ui/spinner";
import { useGetBilling } from "@/hooks/queries/billing/use-get-billing";
import { useTrackSubscription } from "@/hooks/use-track-subscription";
import { useWorkspacePermission } from "@/hooks/use-workspace-permission";
+import { SettingsPage } from "@/components/settings/settings-page";
+import { SettingsSectionHeader } from "@/components/settings/settings-section-header";
export const Route = createFileRoute(
"/_layout/_authenticated/dashboard/settings/workspace/billing",
@@ -40,14 +41,10 @@ function RouteComponent() {
return (
<>
<PageTitle title={t("settings:billing.pageTitle")} />
- <div className="mx-auto max-w-4xl space-y-2">
- <h1 className="font-semibold text-2xl">
- {t("settings:billing.pageTitle")}
- </h1>
- <p className="text-muted-foreground text-sm">
- {t("settings:billing.disabled")}
- </p>
- </div>
+ <SettingsPage
+ title={t("settings:billing.pageTitle")}
+ description={t("settings:billing.disabled")}
+ />
</>
);
}
@@ -57,20 +54,14 @@ function RouteComponent() {
return (
<>
<PageTitle title={t("settings:billing.pageTitle")} />
- <div className="mx-auto max-w-4xl space-y-8">
- <div className="space-y-2">
- <h1 className="font-semibold text-2xl">
- {t("settings:billing.pageTitle")}
- </h1>
- <p className="text-muted-foreground">
- {t("settings:billing.subtitle")}
- </p>
- </div>
-
- <div className="space-y-6">
- <BillingSectionHeader
+ <SettingsPage
+ title={t("settings:billing.pageTitle")}
+ description={t("settings:billing.subtitle")}
+ >
+ <div className="space-y-3">
+ <SettingsSectionHeader
title={t("settings:billing.currentPlan.title")}
- subtitle={t("settings:billing.currentPlan.subtitle")}
+ description={t("settings:billing.currentPlan.subtitle")}
/>
{billing.foundingFree ? (
<FoundingFreeCard />
@@ -86,15 +77,15 @@ function RouteComponent() {
</div>
{!billing.foundingFree && !hasSubscription ? (
- <div className="space-y-6">
- <BillingSectionHeader
+ <div className="space-y-3">
+ <SettingsSectionHeader
title={t("settings:billing.choosePlan.title")}
- subtitle={t("settings:billing.choosePlan.subtitle")}
+ description={t("settings:billing.choosePlan.subtitle")}
/>
<PlanPicker workspaceId={workspaceId} canManage={isAdmin} />
</div>
) : null}
- </div>
+ </SettingsPage>
</>
);
}
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/general.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/general.tsx
index 2dfe1f54b..917e36b52 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/general.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/general.tsx
@@ -41,6 +41,8 @@ import useActiveWorkspace from "@/hooks/queries/workspace/use-active-workspace";
import useGetFullWorkspace from "@/hooks/queries/workspace/use-get-full-workspace";
import { useWorkspacePermission } from "@/hooks/use-workspace-permission";
import { toast } from "@/lib/toast";
+import { SettingsPage } from "@/components/settings/settings-page";
+import { SettingsSectionHeader } from "@/components/settings/settings-section-header";
export const Route = createFileRoute(
"/_layout/_authenticated/dashboard/settings/workspace/general",
@@ -314,27 +316,17 @@ function RouteComponent() {
return (
<>
<PageTitle title={t("settings:workspaceGeneral.pageTitle")} />
- <div className="max-w-4xl mx-auto space-y-8">
- <div className="space-y-2">
- <h1 className="text-2xl font-semibold">
- {t("settings:workspaceGeneral.title")}
- </h1>
- <p className="text-muted-foreground">
- {t("settings:workspaceGeneral.subtitle")}
- </p>
- </div>
-
- <div className="space-y-6">
- <div className="space-y-1">
- <h2 className="text-md font-medium">
- {t("settings:workspaceGeneral.workspaceInfoTitle")}
- </h2>
- <p className="text-xs text-muted-foreground">
- {t("settings:workspaceGeneral.workspaceInfoSubtitle")}
- </p>
- </div>
-
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <SettingsPage
+ title={t("settings:workspaceGeneral.title")}
+ description={t("settings:workspaceGeneral.subtitle")}
+ >
+ <div className="space-y-3">
+ <SettingsSectionHeader
+ title={t("settings:workspaceGeneral.workspaceInfoTitle")}
+ description={t("settings:workspaceGeneral.workspaceInfoSubtitle")}
+ />
+
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<Form {...workspaceForm}>
<form className="space-y-4">
<FormField
@@ -404,22 +396,15 @@ function RouteComponent() {
</div>
{isOwner ? (
- <div className="space-y-6">
- <div className="space-y-1">
- <h2 className="text-md font-medium">
- {t("settings:workspaceGeneral.transferOwnership.title", {
- defaultValue: "Transfer ownership",
- })}
- </h2>
- <p className="text-xs text-muted-foreground">
- {t("settings:workspaceGeneral.transferOwnership.subtitle", {
- defaultValue:
- "Hand this workspace over to another member. You'll be demoted to admin and lose owner-only abilities.",
- })}
- </p>
- </div>
-
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <div className="space-y-3">
+ <SettingsSectionHeader
+ title={t("settings:workspaceGeneral.transferOwnership.title")}
+ description={t(
+ "settings:workspaceGeneral.transferOwnership.subtitle",
+ )}
+ />
+
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-4">
<div className="space-y-0.5 min-w-0">
<p className="text-sm font-medium">
@@ -495,17 +480,13 @@ function RouteComponent() {
) : null}
{canDelete && (
- <div className="space-y-6">
- <div className="space-y-1">
- <h2 className="text-md font-medium">
- {t("settings:workspaceGeneral.dangerZone")}
- </h2>
- <p className="text-xs text-muted-foreground">
- {t("settings:workspaceGeneral.dangerZoneSubtitle")}
- </p>
- </div>
+ <div className="space-y-3">
+ <SettingsSectionHeader
+ title={t("settings:workspaceGeneral.dangerZone")}
+ description={t("settings:workspaceGeneral.dangerZoneSubtitle")}
+ />
- <div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
+ <div className="space-y-4 rounded-xl border border-border bg-card p-4">
<div className="flex flex-col items-start gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-4">
<div className="space-y-0.5">
<p className="text-sm font-medium">
@@ -625,7 +606,7 @@ function RouteComponent() {
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
- </div>
+ </SettingsPage>
</>
);
}
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/labels.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/labels.tsx
index 8a075aa23..554983415 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/labels.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/labels.tsx
@@ -47,6 +47,7 @@ import { useWorkspacePermission } from "@/hooks/use-workspace-permission";
import { cn } from "@/lib/cn";
import { resolveLabelColor } from "@/lib/label-color";
import { toast } from "@/lib/toast";
+import { SettingsPage } from "@/components/settings/settings-page";
export const Route = createFileRoute(
"/_layout/_authenticated/dashboard/settings/workspace/labels",
@@ -222,18 +223,10 @@ function RouteComponent() {
return (
<>
<PageTitle title={t("settings:workspaceLabels.pageTitle")} />
- <div className="max-w-4xl mx-auto space-y-8">
- <div className="space-y-2">
- <h1 className="text-2xl font-semibold">
- {t("settings:workspaceLabels.title", { defaultValue: "Labels" })}
- </h1>
- <p className="text-muted-foreground">
- {t("settings:workspaceLabels.subtitle", {
- defaultValue: "Create, edit, and delete workspace-level labels.",
- })}
- </p>
- </div>
-
+ <SettingsPage
+ title={t("settings:workspaceLabels.title")}
+ description={t("settings:workspaceLabels.subtitle")}
+ >
<CardFrame>
<Card className="!rounded-none !border-t-0">
<CardHeader>
@@ -358,7 +351,7 @@ function RouteComponent() {
</CardPanel>
</Card>
</CardFrame>
- </div>
+ </SettingsPage>
{/* Create Dialog */}
<Dialog
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/roles.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/roles.tsx
index 746aa4abd..c6e3eb4e3 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/roles.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/roles.tsx
@@ -39,6 +39,8 @@ import useWorkspaceRoles, {
} from "@/hooks/queries/workspace/use-workspace-roles";
import { useWorkspacePermission } from "@/hooks/use-workspace-permission";
import { toast } from "@/lib/toast";
+import { SettingsPage } from "@/components/settings/settings-page";
+import { SettingsSectionHeader } from "@/components/settings/settings-section-header";
export const Route = createFileRoute(
"/_layout/_authenticated/dashboard/settings/workspace/roles",
@@ -273,16 +275,10 @@ function RouteComponent() {
return (
<>
<PageTitle title={t("settings:workspaceRoles.pageTitle")} />
- <div className="max-w-4xl mx-auto space-y-8">
- <div className="space-y-2">
- <h1 className="text-2xl font-semibold">
- {t("settings:workspaceRoles.title")}
- </h1>
- <p className="text-muted-foreground">
- {t("settings:workspaceRoles.noAccess")}
- </p>
- </div>
- </div>
+ <SettingsPage
+ title={t("settings:workspaceRoles.title")}
+ description={t("settings:workspaceRoles.noAccess")}
+ />
</>
);
}
@@ -290,29 +286,19 @@ function RouteComponent() {
return (
<>
<PageTitle title={t("settings:workspaceRoles.pageTitle")} />
- <div className="max-w-4xl mx-auto space-y-8">
- <div className="space-y-2">
- <h1 className="text-2xl font-semibold">
- {t("settings:workspaceRoles.title")}
- </h1>
- <p className="text-muted-foreground">
- {t("settings:workspaceRoles.subtitle", {
- workspaceName:
- workspace?.name ?? t("settings:workspaceRoles.thisWorkspace"),
- })}
- </p>
- </div>
-
+ <SettingsPage
+ title={t("settings:workspaceRoles.title")}
+ description={t("settings:workspaceRoles.subtitle", {
+ workspaceName:
+ workspace?.name ?? t("settings:workspaceRoles.thisWorkspace"),
+ })}
+ >
<div className="space-y-6">
<div className="flex items-start justify-between gap-4">
- <div className="space-y-1">
- <h2 className="text-md font-medium">
- {t("settings:workspaceRoles.sectionTitle")}
- </h2>
- <p className="text-xs text-muted-foreground">
- {t("settings:workspaceRoles.sectionSubtitle")}
- </p>
- </div>
+ <SettingsSectionHeader
+ title={t("settings:workspaceRoles.sectionTitle")}
+ description={t("settings:workspaceRoles.sectionSubtitle")}
+ />
<Button
size="sm"
className="gap-1.5"
@@ -328,7 +314,7 @@ function RouteComponent() {
{t("settings:workspaceRoles.newRole")}
</Button>
</div>
- <div className="border border-border rounded-md bg-sidebar">
+ <div className="overflow-hidden rounded-xl border border-border bg-card">
{isLoading && !draftActive ? (
<p className="text-xs text-muted-foreground px-4 py-6">
{t("settings:workspaceRoles.loading")}
@@ -469,7 +455,7 @@ function RouteComponent() {
)}
</div>
</div>
- </div>
+ </SettingsPage>
<AlertDialog
open={!!roleToDelete}
diff --git a/i18n/az-AZ.json b/i18n/az-AZ.json
index 423fd11a0..316761891 100644
--- a/i18n/az-AZ.json
+++ b/i18n/az-AZ.json
@@ -1039,7 +1039,14 @@
"telegramSectionTitle": "Telegram inteqrasiyası",
"telegramSectionSubtitle": "Layihənin tapşırıq yeniləmələrini bot ilə Telegram söhbətinə və ya mövzusuna göndərin.",
"gitlabSectionSubtitle": "Synchronize tasks with GitLab.com or a self-managed instance (issues, merge requests, webhooks).",
- "gitlabSectionTitle": "GitLab Integration"
+ "gitlabSectionTitle": "GitLab Integration",
+ "codeHostingTitle": "Kod hostinqi",
+ "chatTitle": "Çat və vebhuklar",
+ "statusConnected": "Qoşulub",
+ "statusPaused": "Dayandırılıb",
+ "connect": "Qoş",
+ "configure": "Tənzimlə",
+ "done": "Hazır"
},
"projectVisibility": {
"pageTitle": "Layihənin görünürlüğü",
diff --git a/i18n/de-DE.json b/i18n/de-DE.json
index 13cac6db0..954ef0f14 100644
--- a/i18n/de-DE.json
+++ b/i18n/de-DE.json
@@ -884,7 +884,14 @@
"mattermostSectionSubtitle": "Send project task updates into a Mattermost channel with an incoming webhook.",
"mattermostSectionTitle": "Mattermost Integration",
"gitlabSectionSubtitle": "Synchronize tasks with GitLab.com or a self-managed instance (issues, merge requests, webhooks).",
- "gitlabSectionTitle": "GitLab Integration"
+ "gitlabSectionTitle": "GitLab Integration",
+ "codeHostingTitle": "Code-Hosting",
+ "chatTitle": "Chat & Webhooks",
+ "statusConnected": "Verbunden",
+ "statusPaused": "Pausiert",
+ "connect": "Verbinden",
+ "configure": "Konfigurieren",
+ "done": "Fertig"
},
"projectVisibility": {
"pageTitle": "Projektsichtbarkeit",
diff --git a/i18n/el-GR.json b/i18n/el-GR.json
index 0e6f6b8ff..9a8e37117 100644
--- a/i18n/el-GR.json
+++ b/i18n/el-GR.json
@@ -804,7 +804,14 @@
"mattermostSectionSubtitle": "Send project task updates into a Mattermost channel with an incoming webhook.",
"mattermostSectionTitle": "Mattermost Integration",
"gitlabSectionSubtitle": "Synchronize tasks with GitLab.com or a self-managed instance (issues, merge requests, webhooks).",
- "gitlabSectionTitle": "GitLab Integration"
+ "gitlabSectionTitle": "GitLab Integration",
+ "codeHostingTitle": "Φιλοξενία κώδικα",
+ "chatTitle": "Συνομιλία & webhooks",
+ "statusConnected": "Συνδεδεμένο",
+ "statusPaused": "Σε παύση",
+ "connect": "Σύνδεση",
+ "configure": "Ρύθμιση",
+ "done": "Τέλος"
},
"projectVisibility": {
"pageTitle": "Ορατότητα έργου",
diff --git a/i18n/en-US.json b/i18n/en-US.json
index dc8417f47..1dff327db 100644
--- a/i18n/en-US.json
+++ b/i18n/en-US.json
@@ -1119,7 +1119,14 @@
"mattermostSectionTitle": "Mattermost Integration",
"mattermostSectionSubtitle": "Send project task updates into a Mattermost channel with an incoming webhook.",
"telegramSectionTitle": "Telegram Integration",
- "telegramSectionSubtitle": "Send project task updates into a Telegram chat or topic with a bot."
+ "telegramSectionSubtitle": "Send project task updates into a Telegram chat or topic with a bot.",
+ "codeHostingTitle": "Code hosting",
+ "chatTitle": "Chat & webhooks",
+ "statusConnected": "Connected",
+ "statusPaused": "Paused",
+ "connect": "Connect",
+ "configure": "Configure",
+ "done": "Done"
},
"projectVisibility": {
"pageTitle": "Project Visibility",
diff --git a/i18n/es-ES.json b/i18n/es-ES.json
index c7aeaa6fb..494cad928 100644
--- a/i18n/es-ES.json
+++ b/i18n/es-ES.json
@@ -701,7 +701,14 @@
"mattermostSectionSubtitle": "Send project task updates into a Mattermost channel with an incoming webhook.",
"mattermostSectionTitle": "Mattermost Integration",
"gitlabSectionSubtitle": "Synchronize tasks with GitLab.com or a self-managed instance (issues, merge requests, webhooks).",
- "gitlabSectionTitle": "GitLab Integration"
+ "gitlabSectionTitle": "GitLab Integration",
+ "codeHostingTitle": "Alojamiento de código",
+ "chatTitle": "Chat y webhooks",
+ "statusConnected": "Conectado",
+ "statusPaused": "En pausa",
+ "connect": "Conectar",
+ "configure": "Configurar",
+ "done": "Listo"
},
"projectVisibility": {
"pageTitle": "Visibilidad del Proyecto",
diff --git a/i18n/fr-FR.json b/i18n/fr-FR.json
index 2c33dd897..cfa6dc9af 100644
--- a/i18n/fr-FR.json
+++ b/i18n/fr-FR.json
@@ -805,7 +805,14 @@
"mattermostSectionSubtitle": "Send project task updates into a Mattermost channel with an incoming webhook.",
"mattermostSectionTitle": "Mattermost Integration",
"gitlabSectionSubtitle": "Synchronize tasks with GitLab.com or a self-managed instance (issues, merge requests, webhooks).",
- "gitlabSectionTitle": "GitLab Integration"
+ "gitlabSectionTitle": "GitLab Integration",
+ "codeHostingTitle": "Hébergement de code",
+ "chatTitle": "Chat et webhooks",
+ "statusConnected": "Connecté",
+ "statusPaused": "En pause",
+ "connect": "Connecter",
+ "configure": "Configurer",
+ "done": "Terminé"
},
"projectVisibility": {
"pageTitle": "Visibilité du projet",
diff --git a/i18n/hi-IN.json b/i18n/hi-IN.json
index ce1c2c721..1bb9eca02 100644
--- a/i18n/hi-IN.json
+++ b/i18n/hi-IN.json
@@ -1039,7 +1039,14 @@
"mattermostSectionSubtitle": "Send project task updates into a Mattermost channel with an incoming webhook.",
"mattermostSectionTitle": "Mattermost Integration",
"gitlabSectionSubtitle": "Synchronize tasks with GitLab.com or a self-managed instance (issues, merge requests, webhooks).",
- "gitlabSectionTitle": "GitLab Integration"
+ "gitlabSectionTitle": "GitLab Integration",
+ "codeHostingTitle": "कोड होस्टिंग",
+ "chatTitle": "चैट और वेबहुक",
+ "statusConnected": "कनेक्टेड",
+ "statusPaused": "रोका गया",
+ "connect": "कनेक्ट करें",
+ "configure": "कॉन्फ़िगर करें",
+ "done": "हो गया"
},
"projectVisibility": {
"pageTitle": "प्रोजेक्ट दृश्यता",
diff --git a/i18n/id-ID.json b/i18n/id-ID.json
index 10f5a6c5a..5d0cd4f99 100644
--- a/i18n/id-ID.json
+++ b/i18n/id-ID.json
@@ -803,7 +803,14 @@
"mattermostSectionSubtitle": "Send project task updates into a Mattermost channel with an incoming webhook.",
"mattermostSectionTitle": "Mattermost Integration",
"gitlabSectionSubtitle": "Synchronize tasks with GitLab.com or a self-managed instance (issues, merge requests, webhooks).",
- "gitlabSectionTitle": "GitLab Integration"
+ "gitlabSectionTitle": "GitLab Integration",
+ "codeHostingTitle": "Hosting kode",
+ "chatTitle": "Chat & webhook",
+ "statusConnected": "Terhubung",
+ "statusPaused": "Dijeda",
+ "connect": "Hubungkan",
+ "configure": "Konfigurasi",
+ "done": "Selesai"
},
"projectVisibility": {
"pageTitle": "Visibilitas Proyek",
diff --git a/i18n/it-IT.json b/i18n/it-IT.json
index 21e678fbd..75840cefe 100644
--- a/i18n/it-IT.json
+++ b/i18n/it-IT.json
@@ -1041,7 +1041,14 @@
"mattermostSectionSubtitle": "Send project task updates into a Mattermost channel with an incoming webhook.",
"mattermostSectionTitle": "Mattermost Integration",
"gitlabSectionSubtitle": "Synchronize tasks with GitLab.com or a self-managed instance (issues, merge requests, webhooks).",
- "gitlabSectionTitle": "GitLab Integration"
+ "gitlabSectionTitle": "GitLab Integration",
+ "codeHostingTitle": "Hosting del codice",
+ "chatTitle": "Chat e webhook",
+ "statusConnected": "Connesso",
+ "statusPaused": "In pausa",
+ "connect": "Connetti",
+ "configure": "Configura",
+ "done": "Fatto"
},
"projectVisibility": {
"pageTitle": "Visibilità Progetto",
diff --git a/i18n/ja-JP.json b/i18n/ja-JP.json
index 1c8b70a6e..8332cf0a7 100644
--- a/i18n/ja-JP.json
+++ b/i18n/ja-JP.json
@@ -1037,7 +1037,14 @@
"mattermostSectionSubtitle": "Send project task updates into a Mattermost channel with an incoming webhook.",
"mattermostSectionTitle": "Mattermost Integration",
"gitlabSectionSubtitle": "Synchronize tasks with GitLab.com or a self-managed instance (issues, merge requests, webhooks).",
- "gitlabSectionTitle": "GitLab Integration"
+ "gitlabSectionTitle": "GitLab Integration",
+ "codeHostingTitle": "コードホスティング",
+ "chatTitle": "チャットと Webhook",
+ "statusConnected": "接続済み",
+ "statusPaused": "一時停止中",
+ "connect": "接続",
+ "configure": "設定",
+ "done": "完了"
},
"projectVisibility": {
"pageTitle": "プロジェクトの公開設定",
diff --git a/i18n/ko-KR.json b/i18n/ko-KR.json
index eb1b98339..aaedd4990 100644
--- a/i18n/ko-KR.json
+++ b/i18n/ko-KR.json
@@ -803,7 +803,14 @@
"mattermostSectionSubtitle": "Send project task updates into a Mattermost channel with an incoming webhook.",
"mattermostSectionTitle": "Mattermost Integration",
"gitlabSectionSubtitle": "Synchronize tasks with GitLab.com or a self-managed instance (issues, merge requests, webhooks).",
- "gitlabSectionTitle": "GitLab Integration"
+ "gitlabSectionTitle": "GitLab Integration",
+ "codeHostingTitle": "코드 호스팅",
+ "chatTitle": "채팅 및 웹훅",
+ "statusConnected": "연결됨",
+ "statusPaused": "일시 중지됨",
+ "connect": "연결",
+ "configure": "구성",
+ "done": "완료"
},
"projectVisibility": {
"pageTitle": "프로젝트 공개 설정",
diff --git a/i18n/mk-MK.json b/i18n/mk-MK.json
index 020ffdf7a..ccdbac066 100644
--- a/i18n/mk-MK.json
+++ b/i18n/mk-MK.json
@@ -804,7 +804,14 @@
"mattermostSectionSubtitle": "Send project task updates into a Mattermost channel with an incoming webhook.",
"mattermostSectionTitle": "Mattermost Integration",
"gitlabSectionSubtitle": "Synchronize tasks with GitLab.com or a self-managed instance (issues, merge requests, webhooks).",
- "gitlabSectionTitle": "GitLab Integration"
+ "gitlabSectionTitle": "GitLab Integration",
+ "codeHostingTitle": "Хостирање код",
+ "chatTitle": "Разговор и webhooks",
+ "statusConnected": "Поврзано",
+ "statusPaused": "Паузирано",
+ "connect": "Поврзи",
+ "configure": "Конфигурирај",
+ "done": "Готово"
},
"projectVisibility": {
"pageTitle": "Видливост на проект",
diff --git a/i18n/nl-NL.json b/i18n/nl-NL.json
index f22c0a329..8714d152d 100644
--- a/i18n/nl-NL.json
+++ b/i18n/nl-NL.json
@@ -700,7 +700,14 @@
"mattermostSectionSubtitle": "Send project task updates into a Mattermost channel with an incoming webhook.",
"mattermostSectionTitle": "Mattermost Integration",
"gitlabSectionSubtitle": "Synchronize tasks with GitLab.com or a self-managed instance (issues, merge requests, webhooks).",
- "gitlabSectionTitle": "GitLab Integration"
+ "gitlabSectionTitle": "GitLab Integration",
+ "codeHostingTitle": "Codehosting",
+ "chatTitle": "Chat & webhooks",
+ "statusConnected": "Verbonden",
+ "statusPaused": "Gepauzeerd",
+ "connect": "Verbinden",
+ "configure": "Configureren",
+ "done": "Klaar"
},
"projectVisibility": {
"pageTitle": "Projectzichtbaarheid",
diff --git a/i18n/pl-PL.json b/i18n/pl-PL.json
index 0eacdc6ab..a56b94c7e 100644
--- a/i18n/pl-PL.json
+++ b/i18n/pl-PL.json
@@ -1584,7 +1584,14 @@
"mattermostSectionSubtitle": "Send project task updates into a Mattermost channel with an incoming webhook.",
"mattermostSectionTitle": "Mattermost Integration",
"gitlabSectionSubtitle": "Synchronize tasks with GitLab.com or a self-managed instance (issues, merge requests, webhooks).",
- "gitlabSectionTitle": "GitLab Integration"
+ "gitlabSectionTitle": "GitLab Integration",
+ "codeHostingTitle": "Hosting kodu",
+ "chatTitle": "Czat i webhooki",
+ "statusConnected": "Połączono",
+ "statusPaused": "Wstrzymano",
+ "connect": "Połącz",
+ "configure": "Konfiguruj",
+ "done": "Gotowe"
},
"projectSwitcher": {
"noProjects": "Brak projektów",
diff --git a/i18n/pt-BR.json b/i18n/pt-BR.json
index 1d031bcfe..496238e1b 100644
--- a/i18n/pt-BR.json
+++ b/i18n/pt-BR.json
@@ -1041,7 +1041,14 @@
"mattermostSectionSubtitle": "Send project task updates into a Mattermost channel with an incoming webhook.",
"mattermostSectionTitle": "Mattermost Integration",
"gitlabSectionSubtitle": "Synchronize tasks with GitLab.com or a self-managed instance (issues, merge requests, webhooks).",
- "gitlabSectionTitle": "GitLab Integration"
+ "gitlabSectionTitle": "GitLab Integration",
+ "codeHostingTitle": "Hospedagem de código",
+ "chatTitle": "Chat e webhooks",
+ "statusConnected": "Conectado",
+ "statusPaused": "Pausado",
+ "connect": "Conectar",
+ "configure": "Configurar",
+ "done": "Concluído"
},
"projectVisibility": {
"pageTitle": "Visibilidade do projeto",
diff --git a/i18n/ru-RU.json b/i18n/ru-RU.json
index 532f40c35..729ebfe18 100644
--- a/i18n/ru-RU.json
+++ b/i18n/ru-RU.json
@@ -806,7 +806,14 @@
"mattermostSectionSubtitle": "Send project task updates into a Mattermost channel with an incoming webhook.",
"mattermostSectionTitle": "Mattermost Integration",
"gitlabSectionSubtitle": "Синхронизация задач с GitLab.com или self-managed экземпляром (issues, merge requests, вебхуки).",
- "gitlabSectionTitle": "Интеграция с GitLab"
+ "gitlabSectionTitle": "Интеграция с GitLab",
+ "codeHostingTitle": "Хостинг кода",
+ "chatTitle": "Чаты и вебхуки",
+ "statusConnected": "Подключено",
+ "statusPaused": "Приостановлено",
+ "connect": "Подключить",
+ "configure": "Настроить",
+ "done": "Готово"
},
"projectVisibility": {
"pageTitle": "Видимость проекта",
diff --git a/i18n/schema.json b/i18n/schema.json
index 027753560..d62064603 100644
--- a/i18n/schema.json
+++ b/i18n/schema.json
@@ -4351,6 +4351,27 @@
},
"telegramSectionSubtitle": {
"type": "string"
+ },
+ "codeHostingTitle": {
+ "type": "string"
+ },
+ "chatTitle": {
+ "type": "string"
+ },
+ "statusConnected": {
+ "type": "string"
+ },
+ "statusPaused": {
+ "type": "string"
+ },
+ "connect": {
+ "type": "string"
+ },
+ "configure": {
+ "type": "string"
+ },
+ "done": {
+ "type": "string"
}
},
"required": [
@@ -4372,7 +4393,14 @@
"mattermostSectionTitle",
"mattermostSectionSubtitle",
"telegramSectionTitle",
- "telegramSectionSubtitle"
+ "telegramSectionSubtitle",
+ "codeHostingTitle",
+ "chatTitle",
+ "statusConnected",
+ "statusPaused",
+ "connect",
+ "configure",
+ "done"
]
},
"projectVisibility": {
diff --git a/i18n/tr-TR.json b/i18n/tr-TR.json
index bb4860b9d..51f7b73ae 100644
--- a/i18n/tr-TR.json
+++ b/i18n/tr-TR.json
@@ -804,7 +804,14 @@
"mattermostSectionSubtitle": "Send project task updates into a Mattermost channel with an incoming webhook.",
"mattermostSectionTitle": "Mattermost Integration",
"gitlabSectionSubtitle": "Synchronize tasks with GitLab.com or a self-managed instance (issues, merge requests, webhooks).",
- "gitlabSectionTitle": "GitLab Integration"
+ "gitlabSectionTitle": "GitLab Integration",
+ "codeHostingTitle": "Kod barındırma",
+ "chatTitle": "Sohbet ve webhook'lar",
+ "statusConnected": "Bağlı",
+ "statusPaused": "Duraklatıldı",
+ "connect": "Bağla",
+ "configure": "Yapılandır",
+ "done": "Bitti"
},
"projectVisibility": {
"pageTitle": "Proje Görünürlüğü",
diff --git a/i18n/uk-UA.json b/i18n/uk-UA.json
index b2ce51ac6..628394764 100644
--- a/i18n/uk-UA.json
+++ b/i18n/uk-UA.json
@@ -806,7 +806,14 @@
"mattermostSectionSubtitle": "Send project task updates into a Mattermost channel with an incoming webhook.",
"mattermostSectionTitle": "Mattermost Integration",
"gitlabSectionSubtitle": "Synchronize tasks with GitLab.com or a self-managed instance (issues, merge requests, webhooks).",
- "gitlabSectionTitle": "GitLab Integration"
+ "gitlabSectionTitle": "GitLab Integration",
+ "codeHostingTitle": "Хостинг коду",
+ "chatTitle": "Чати та вебхуки",
+ "statusConnected": "Підключено",
+ "statusPaused": "Призупинено",
+ "connect": "Підключити",
+ "configure": "Налаштувати",
+ "done": "Готово"
},
"projectVisibility": {
"pageTitle": "Видимість проєкту",
diff --git a/i18n/vi-VN.json b/i18n/vi-VN.json
index bce19fcc7..07fe05feb 100644
--- a/i18n/vi-VN.json
+++ b/i18n/vi-VN.json
@@ -1037,7 +1037,14 @@
"mattermostSectionSubtitle": "Send project task updates into a Mattermost channel with an incoming webhook.",
"mattermostSectionTitle": "Mattermost Integration",
"gitlabSectionSubtitle": "Synchronize tasks with GitLab.com or a self-managed instance (issues, merge requests, webhooks).",
- "gitlabSectionTitle": "GitLab Integration"
+ "gitlabSectionTitle": "GitLab Integration",
+ "codeHostingTitle": "Lưu trữ mã nguồn",
+ "chatTitle": "Trò chuyện & webhook",
+ "statusConnected": "Đã kết nối",
+ "statusPaused": "Đã tạm dừng",
+ "connect": "Kết nối",
+ "configure": "Cấu hình",
+ "done": "Xong"
},
"projectVisibility": {
"pageTitle": "Chế độ hiển thị dự án",
diff --git a/i18n/zh-CN.json b/i18n/zh-CN.json
index e41cd7d6f..2c20a394e 100644
--- a/i18n/zh-CN.json
+++ b/i18n/zh-CN.json
@@ -1037,7 +1037,14 @@
"telegramSectionTitle": "Telegram 集成",
"telegramSectionSubtitle": "通过 Bot 将项目任务更新发送到 Telegram 聊天或话题。",
"gitlabSectionSubtitle": "Synchronize tasks with GitLab.com or a self-managed instance (issues, merge requests, webhooks).",
- "gitlabSectionTitle": "GitLab Integration"
+ "gitlabSectionTitle": "GitLab Integration",
+ "codeHostingTitle": "代码托管",
+ "chatTitle": "聊天与 Webhook",
+ "statusConnected": "已连接",
+ "statusPaused": "已暂停",
+ "connect": "连接",
+ "configure": "配置",
+ "done": "完成"
},
"projectVisibility": {
"pageTitle": "项目可见性",