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.

fix(web): make settings rows responsive and align their typography

Andrej1099a1596c7d
diff --git a/apps/web/src/components/project/tasks-import-export.tsx b/apps/web/src/components/project/tasks-import-export.tsx
index 4aa71f786..3bb93ebd5 100644
--- a/apps/web/src/components/project/tasks-import-export.tsx
+++ b/apps/web/src/components/project/tasks-import-export.tsx
@@ -137,25 +137,21 @@ export function TasksImportExport({ project }: TasksImportExportProps) {
<div className="space-y-4">
<div className="flex items-center gap-2">
<Button
- className="flex items-center gap-1.5 bg-card hover:bg-accent text-foreground border border-border"
+ variant="outline"
size="sm"
onClick={handleExport}
disabled={isExporting}
>
- {isExporting ? (
- <Loader2 className="h-4 w-4 animate-spin" />
- ) : (
- <Download className="h-4 w-4" />
- )}
+ {isExporting ? <Loader2 className="animate-spin" /> : <Download />}
{t("settings:tasksImportExport.exportTasks")}
</Button>
<Button
- className="flex items-center gap-1.5 bg-card hover:bg-accent text-foreground border border-border"
+ variant="outline"
size="sm"
onClick={() => setIsImportOpen(true)}
>
- <Upload className="h-4 w-4" />
+ <Upload />
{t("settings:tasksImportExport.importTasks")}
</Button>
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 b0d97ec00..77babfa34 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account.tsx
@@ -71,7 +71,7 @@ function RouteComponent() {
</div>
<SidebarGroup className="gap-1 p-1">
- <SidebarGroupLabel className="h-7 px-2 text-[11px] uppercase tracking-wide text-sidebar-foreground/70">
+ <SidebarGroupLabel className="h-7 px-2 text-xs uppercase tracking-wide text-sidebar-foreground/70">
{t("settings:account")}
</SidebarGroupLabel>
<SidebarGroupContent>
@@ -83,7 +83,7 @@ function RouteComponent() {
variant="ghost"
size="sm"
className={cn(
- "h-8 w-full justify-start gap-2 rounded-lg px-2 text-[11px] font-normal text-sidebar-foreground/80",
+ "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",
)}
@@ -98,7 +98,7 @@ function RouteComponent() {
</SidebarGroup>
<SidebarGroup className="gap-1 p-1">
- <SidebarGroupLabel className="h-7 px-2 text-[11px] uppercase tracking-wide text-sidebar-foreground/70">
+ <SidebarGroupLabel className="h-7 px-2 text-xs uppercase tracking-wide text-sidebar-foreground/70">
{t("settings:developer")}
</SidebarGroupLabel>
<SidebarGroupContent>
@@ -109,7 +109,7 @@ function RouteComponent() {
variant="ghost"
size="sm"
className={cn(
- "h-8 w-full justify-start gap-2 rounded-lg px-2 text-[11px] font-normal text-sidebar-foreground/80",
+ "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",
)}
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 37453e8c1..5d9a11559 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
@@ -212,7 +212,7 @@ function RouteComponent() {
name="name"
render={({ field }) => (
<FormItem>
- <div className="flex items-center justify-between">
+ <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">
<FormLabel className="text-sm font-medium">
{t("settings:informationPage.fullName")}
@@ -220,7 +220,7 @@ function RouteComponent() {
</div>
<FormControl>
<Input
- className="w-48"
+ className="w-full sm:w-48"
placeholder={t(
"settings:informationPage.fullNamePlaceholder",
)}
@@ -240,7 +240,7 @@ function RouteComponent() {
name="email"
render={({ field }) => (
<FormItem>
- <div className="flex items-center justify-between">
+ <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">
<FormLabel className="text-sm font-medium">
{t("settings:informationPage.email")}
@@ -248,7 +248,7 @@ function RouteComponent() {
</div>
<FormControl>
<Input
- className="w-48"
+ className="w-full sm:w-48"
placeholder={t(
"settings:informationPage.emailPlaceholder",
)}
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 9e83a950e..0e3defd41 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
@@ -108,7 +108,7 @@ function RouteComponent() {
</div>
<div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
- <div className="flex items-center justify-between">
+ <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")}
@@ -121,7 +121,7 @@ function RouteComponent() {
value={theme}
onValueChange={(value) => value && setTheme(value)}
>
- <SelectTrigger size="sm" className="w-40">
+ <SelectTrigger size="sm" className="w-full sm:w-40">
<SelectValue
placeholder={t("settings:preferencesPage.selectTheme")}
>
@@ -144,7 +144,7 @@ function RouteComponent() {
<Separator />
- <div className="flex items-center justify-between">
+ <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.language")}
@@ -161,7 +161,7 @@ function RouteComponent() {
}
}}
>
- <SelectTrigger size="sm" className="w-40">
+ <SelectTrigger size="sm" className="w-full sm:w-40">
<SelectValue
placeholder={t("settings:preferencesPage.selectLanguage")}
>
@@ -180,7 +180,7 @@ function RouteComponent() {
<Separator />
- <div className="flex items-center justify-between">
+ <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.firstDayOfWeek")}
@@ -203,7 +203,7 @@ function RouteComponent() {
}
}}
>
- <SelectTrigger size="sm" className="w-40">
+ <SelectTrigger size="sm" className="w-full sm:w-40">
<SelectValue
placeholder={t(
"settings:preferencesPage.selectFirstDayOfWeek",
@@ -224,7 +224,7 @@ function RouteComponent() {
<Separator />
- <div className="flex items-center justify-between">
+ <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.defaultView")}
@@ -237,7 +237,7 @@ function RouteComponent() {
value={viewMode}
onValueChange={(value) => value && setViewMode(value)}
>
- <SelectTrigger size="sm" className="w-40">
+ <SelectTrigger size="sm" className="w-full sm:w-40">
<SelectValue
placeholder={t("settings:preferencesPage.selectViewMode")}
>
@@ -275,7 +275,7 @@ function RouteComponent() {
</div>
<div className="space-y-6">
- <div className="flex items-center justify-between">
+ <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")}
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 3376fdd60..3dea561bc 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects.tsx
@@ -107,7 +107,7 @@ function RouteComponent() {
src={workspace?.logo ?? ""}
alt={workspace?.name || ""}
/>
- <AvatarFallback className="border border-sidebar-border/70 bg-sidebar-accent/70 text-[11px] font-medium text-sidebar-accent-foreground">
+ <AvatarFallback className="border border-sidebar-border/70 bg-sidebar-accent/70 text-xs font-medium text-sidebar-accent-foreground">
{workspaceInitials}
</AvatarFallback>
</Avatar>
@@ -115,14 +115,14 @@ function RouteComponent() {
<p className="truncate text-sm md:overflow-visible md:text-clip md:whitespace-normal">
{workspace?.name}
</p>
- <p className="truncate text-[11px] text-sidebar-foreground/60 capitalize md:overflow-visible md:text-clip md:whitespace-normal">
+ <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-[11px] uppercase tracking-wide text-sidebar-foreground/70">
+ <SidebarGroupLabel className="h-7 px-2 text-xs uppercase tracking-wide text-sidebar-foreground/70">
{t("navigation:projectSettings.projectLabel")}
</SidebarGroupLabel>
<SidebarGroupContent>
@@ -141,7 +141,7 @@ function RouteComponent() {
}}
>
<SelectTrigger
- className="h-8 text-[11px] font-normal text-foreground"
+ className="h-8 text-sm font-normal text-foreground"
size="sm"
>
<span className="truncate font-normal text-foreground">
@@ -171,7 +171,7 @@ function RouteComponent() {
</SidebarGroup>
<SidebarGroup className="gap-1 p-1">
- <SidebarGroupLabel className="h-7 px-2 text-[11px] uppercase tracking-wide text-sidebar-foreground/70">
+ <SidebarGroupLabel className="h-7 px-2 text-xs uppercase tracking-wide text-sidebar-foreground/70">
{t("navigation:page.settingsTitle")}
</SidebarGroupLabel>
<SidebarGroupContent>
@@ -190,7 +190,7 @@ function RouteComponent() {
size="sm"
disabled={!selectedProject}
className={cn(
- "h-8 w-full justify-start gap-2 rounded-lg px-2 text-[11px] font-normal text-sidebar-foreground/80",
+ "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",
)}
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 0450fe6ed..a7d05dc51 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
@@ -344,7 +344,7 @@ function RouteComponent() {
</div>
<div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
- <div className="flex items-center justify-between">
+ <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">
{t("settings:projectGeneral.iconLabel")}
@@ -446,7 +446,7 @@ function RouteComponent() {
name="name"
render={({ field }) => (
<FormItem>
- <div className="flex items-center justify-between">
+ <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">
<FormLabel className="text-sm font-medium">
{t("settings:projectGeneral.projectNameLabel")}
@@ -457,7 +457,7 @@ function RouteComponent() {
</div>
<FormControl>
<Input
- className="w-64"
+ className="w-full sm:w-64"
placeholder={t(
"settings:projectGeneral.projectNamePlaceholder",
)}
@@ -478,7 +478,7 @@ function RouteComponent() {
name="slug"
render={({ field }) => (
<FormItem>
- <div className="flex items-center justify-between">
+ <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">
<FormLabel className="text-sm font-medium">
{t("settings:projectGeneral.keyLabel")}
@@ -491,7 +491,7 @@ function RouteComponent() {
</div>
<FormControl>
<Input
- className="w-64"
+ className="w-full sm:w-64"
placeholder={t(
"settings:projectGeneral.keyPlaceholder",
)}
@@ -512,7 +512,7 @@ function RouteComponent() {
name="description"
render={({ field }) => (
<FormItem>
- <div className="flex items-center justify-between">
+ <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">
<FormLabel className="text-sm font-medium">
{t("settings:projectGeneral.descriptionLabel")}
@@ -523,7 +523,7 @@ function RouteComponent() {
</div>
<FormControl>
<Input
- className="w-64"
+ className="w-full sm:w-64"
placeholder={t(
"settings:projectGeneral.descriptionPlaceholder",
)}
@@ -539,7 +539,7 @@ function RouteComponent() {
</form>
</Form>
<Separator />
- <div className="flex items-center justify-between">
+ <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">
{t("settings:projectGeneral.importExportTasks")}
@@ -565,7 +565,7 @@ function RouteComponent() {
</div>
<div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
- <div className="flex items-center justify-between">
+ <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">
{t("settings:projectGeneral.deleteProject")}
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 deaca6172..246998893 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
@@ -127,7 +127,7 @@ function RouteComponent() {
<Separator />
- <div className="flex items-center justify-between">
+ <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:projectVisibility.publicUrl")}
@@ -136,8 +136,8 @@ function RouteComponent() {
{t("settings:projectVisibility.publicUrlHint")}
</p>
</div>
- <div className="flex items-center gap-2">
- <Input readOnly value={publicUrl} className="w-96" />
+ <div className="flex w-full min-w-0 items-center gap-2 sm:w-auto">
+ <Input readOnly value={publicUrl} className="w-full sm:w-96" />
<Button
size="sm"
onClick={() => {
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 2faf47026..171e1b0e9 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace.tsx
@@ -93,7 +93,7 @@ function RouteComponent() {
src={workspace?.logo ?? ""}
alt={workspace?.name || ""}
/>
- <AvatarFallback className="border border-sidebar-border/70 bg-sidebar-accent/70 text-[11px] font-medium text-sidebar-accent-foreground">
+ <AvatarFallback className="border border-sidebar-border/70 bg-sidebar-accent/70 text-xs font-medium text-sidebar-accent-foreground">
{workspaceInitials}
</AvatarFallback>
</Avatar>
@@ -101,14 +101,14 @@ function RouteComponent() {
<p className="truncate text-sm md:overflow-visible md:text-clip md:whitespace-normal">
{workspace?.name}
</p>
- <p className="truncate text-[11px] text-sidebar-foreground/60 capitalize md:overflow-visible md:text-clip md:whitespace-normal">
+ <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-[11px] uppercase tracking-wide text-sidebar-foreground/70">
+ <SidebarGroupLabel className="h-7 px-2 text-xs uppercase tracking-wide text-sidebar-foreground/70">
{t("navigation:page.settingsWorkspaceTab")}
</SidebarGroupLabel>
<SidebarGroupContent>
@@ -120,7 +120,7 @@ function RouteComponent() {
variant="ghost"
size="sm"
className={cn(
- "h-8 w-full justify-start gap-2 rounded-lg px-2 text-[11px] font-normal text-sidebar-foreground/80",
+ "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",
)}
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 2294fe7f1..ba2641d1f 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
@@ -232,7 +232,7 @@ function RouteComponent() {
</div>
</div>
<Separator />
- <div className="flex items-center justify-between gap-3 px-5 py-3">
+ <div className="flex flex-col items-start gap-3 px-5 py-3 sm:flex-row sm:items-center sm:justify-between">
<p className="text-muted-foreground text-xs">
Update payment method, view invoices, or cancel anytime.
</p>
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 0d12b9352..8bfb67213 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
@@ -342,7 +342,7 @@ function RouteComponent() {
name="name"
render={({ field }) => (
<FormItem>
- <div className="flex items-center justify-between">
+ <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">
<FormLabel className="text-sm font-medium">
{t("settings:workspaceGeneral.nameLabel")}
@@ -353,7 +353,7 @@ function RouteComponent() {
</div>
<FormControl>
<Input
- className="w-64"
+ className="w-full sm:w-64"
placeholder={t(
"settings:workspaceGeneral.namePlaceholder",
)}
@@ -374,7 +374,7 @@ function RouteComponent() {
name="description"
render={({ field }) => (
<FormItem>
- <div className="flex items-center justify-between">
+ <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">
<FormLabel className="text-sm font-medium">
{t("settings:workspaceGeneral.descriptionLabel")}
@@ -385,7 +385,7 @@ function RouteComponent() {
</div>
<FormControl>
<Input
- className="w-64"
+ className="w-full sm:w-64"
placeholder={t(
"settings:workspaceGeneral.descriptionPlaceholder",
)}
@@ -420,7 +420,7 @@ function RouteComponent() {
</div>
<div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
- <div className="flex items-center justify-between gap-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">
{t(
@@ -446,7 +446,7 @@ function RouteComponent() {
)}
</p>
</div>
- <div className="flex items-center gap-2">
+ <div className="flex w-full items-center gap-2 sm:w-auto">
<Select
value={selectedNewOwnerId}
onValueChange={(value) => {
@@ -456,7 +456,7 @@ function RouteComponent() {
}}
disabled={eligibleNewOwners.length === 0}
>
- <SelectTrigger size="sm" className="w-56">
+ <SelectTrigger size="sm" className="w-full sm:w-56">
<SelectValue
placeholder={t(
"settings:workspaceGeneral.transferOwnership.pickerPlaceholder",
@@ -506,7 +506,7 @@ function RouteComponent() {
</div>
<div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
- <div className="flex items-center justify-between">
+ <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">
{t("settings:workspaceGeneral.deleteWorkspace")}
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 d99040e07..572d42054 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
@@ -602,7 +602,7 @@ function DraftEditor({
return (
<div>
<div className="border-t border-border">
- <div className="flex items-center justify-between gap-4 px-4 py-3">
+ <div className="flex flex-col gap-2 px-4 py-3 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:workspaceRoles.nameLabel")}
@@ -615,7 +615,7 @@ function DraftEditor({
value={name}
onChange={(e) => setName(e.target.value)}
placeholder={t("settings:workspaceRoles.namePlaceholder")}
- className="w-64"
+ className="w-full sm:w-64"
autoFocus
disabled={isPending}
/>