Skip to content

Commit 151accb

Browse files
author
Lasim
committed
feat: Update table headers to improve styling and consistency across components
1 parent 655660d commit 151accb

File tree

4 files changed

+26
-25
lines changed

4 files changed

+26
-25
lines changed

services/frontend/src/components/credentials/CredentialsTable.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,23 @@ const getCreatedByDisplay = (createdBy: any) => {
3939
<div class="rounded-md border">
4040
<table class="w-full">
4141
<thead>
42-
<tr class="border-b">
43-
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground">
42+
<tr class="border-b bg-muted/50">
43+
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground text-sm">
4444
Name
4545
</th>
46-
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground">
46+
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground text-sm">
4747
Provider
4848
</th>
49-
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground">
49+
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground text-sm">
5050
Comment
5151
</th>
52-
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground">
52+
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground text-sm">
5353
Created By
5454
</th>
55-
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground">
55+
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground text-sm">
5656
Created
5757
</th>
58-
<th class="h-12 px-4 text-right align-middle font-medium text-muted-foreground">
58+
<th class="h-12 px-4 text-right align-middle font-medium text-muted-foreground text-sm">
5959
Manage
6060
</th>
6161
</tr>

services/frontend/src/components/ui/table/TableHead.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const props = defineProps<{
1010
<template>
1111
<th
1212
data-slot="table-head"
13-
:class="cn('text-muted-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]', props.class)"
13+
:class="cn('text-muted-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]', props.class)"
1414
>
1515
<slot />
1616
</th>

services/frontend/src/views/admin/Users.vue

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ async function fetchUsers(): Promise<User[]> {
5454
if (!apiUrl) {
5555
throw new Error('VITE_DEPLOYSTACK_BACKEND_URL is not configured.')
5656
}
57-
58-
const response = await fetch(`${apiUrl}/api/users`, {
59-
credentials: 'include'
57+
58+
const response = await fetch(`${apiUrl}/api/users`, {
59+
credentials: 'include'
6060
})
6161
6262
if (!response.ok) {
@@ -95,23 +95,23 @@ const table = useVueTable({
9595
return columns
9696
},
9797
onSortingChange: (updaterOrValue) => {
98-
sorting.value = typeof updaterOrValue === 'function'
99-
? updaterOrValue(sorting.value)
98+
sorting.value = typeof updaterOrValue === 'function'
99+
? updaterOrValue(sorting.value)
100100
: updaterOrValue
101101
},
102102
onColumnFiltersChange: (updaterOrValue) => {
103-
columnFilters.value = typeof updaterOrValue === 'function'
104-
? updaterOrValue(columnFilters.value)
103+
columnFilters.value = typeof updaterOrValue === 'function'
104+
? updaterOrValue(columnFilters.value)
105105
: updaterOrValue
106106
},
107107
onColumnVisibilityChange: (updaterOrValue) => {
108-
columnVisibility.value = typeof updaterOrValue === 'function'
109-
? updaterOrValue(columnVisibility.value)
108+
columnVisibility.value = typeof updaterOrValue === 'function'
109+
? updaterOrValue(columnVisibility.value)
110110
: updaterOrValue
111111
},
112112
onRowSelectionChange: (updaterOrValue) => {
113-
rowSelection.value = typeof updaterOrValue === 'function'
114-
? updaterOrValue(rowSelection.value)
113+
rowSelection.value = typeof updaterOrValue === 'function'
114+
? updaterOrValue(rowSelection.value)
115115
: updaterOrValue
116116
},
117117
getCoreRowModel: getCoreRowModel(),
@@ -177,6 +177,7 @@ const filterValue = computed({
177177
<TableRow
178178
v-for="headerGroup in table.getHeaderGroups()"
179179
:key="headerGroup.id"
180+
class="bg-muted/50"
180181
>
181182
<TableHead
182183
v-for="header in headerGroup.headers"

services/frontend/src/views/teams/TeamTableColumns.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,22 @@ const getRoleDisplay = (role: string) => {
4545
<table class="w-full">
4646
<thead>
4747
<tr class="border-b bg-muted/50">
48-
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground">
48+
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground text-sm">
4949
{{ t('teams.table.columns.name') }}
5050
</th>
51-
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground">
51+
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground text-sm">
5252
{{ t('teams.table.columns.description') }}
5353
</th>
54-
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground">
54+
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground text-sm">
5555
{{ t('teams.table.columns.role') }}
5656
</th>
57-
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground">
57+
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground text-sm">
5858
{{ t('teams.table.columns.created') }}
5959
</th>
60-
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground">
60+
<th class="h-12 px-4 text-left align-middle font-medium text-muted-foreground text-sm">
6161
{{ t('teams.table.columns.switch') }}
6262
</th>
63-
<th class="h-12 px-4 text-right align-middle font-medium text-muted-foreground">
63+
<th class="h-12 px-4 text-right align-middle font-medium text-muted-foreground text-sm">
6464
{{ t('teams.table.columns.actions') }}
6565
</th>
6666
</tr>

0 commit comments

Comments
 (0)