fix: email verified check is in a newline in users table (#1218)

This commit is contained in:
Meier Lukas
2024-10-02 12:00:42 +02:00
committed by GitHub
parent d63f6d270f
commit 8b5ea3c5d3
2 changed files with 8 additions and 6 deletions

View File

@@ -2,7 +2,7 @@
import { useMemo } from "react"; import { useMemo } from "react";
import Link from "next/link"; import Link from "next/link";
import { Anchor, Button, Group, Text, ThemeIcon, Title } from "@mantine/core"; import { Anchor, Button, Group, Text, Title, Tooltip } from "@mantine/core";
import { IconCheck } from "@tabler/icons-react"; import { IconCheck } from "@tabler/icons-react";
import type { MRT_ColumnDef } from "mantine-react-table"; import type { MRT_ColumnDef } from "mantine-react-table";
import { MantineReactTable } from "mantine-react-table"; import { MantineReactTable } from "mantine-react-table";
@@ -30,7 +30,7 @@ export const UserListComponent = ({ initialUserList, credentialsProviderEnabled
{ {
accessorKey: "name", accessorKey: "name",
header: t("user.field.username.label"), header: t("user.field.username.label"),
grow: 100, grow: 1,
Cell: ({ renderedCellValue, row }) => ( Cell: ({ renderedCellValue, row }) => (
<Group> <Group>
<UserAvatar size="sm" user={row.original} /> <UserAvatar size="sm" user={row.original} />
@@ -43,13 +43,14 @@ export const UserListComponent = ({ initialUserList, credentialsProviderEnabled
{ {
accessorKey: "email", accessorKey: "email",
header: t("user.field.email.label"), header: t("user.field.email.label"),
size: 300,
Cell: ({ renderedCellValue, row }) => ( Cell: ({ renderedCellValue, row }) => (
<Group> <Group wrap="nowrap" gap="sm">
{row.original.email ? renderedCellValue : <Text>-</Text>} {row.original.email ? renderedCellValue : <Text>-</Text>}
{row.original.emailVerified && ( {row.original.emailVerified && (
<ThemeIcon radius="xl" size="sm"> <Tooltip label={t("user.field.email.verified")} position="top">
<IconCheck size="1rem" /> <IconCheck color="var(--mantine-color-green-4)" size="1rem" />
</ThemeIcon> </Tooltip>
)} )}
</Group> </Group>
), ),

View File

@@ -24,6 +24,7 @@ export default {
field: { field: {
email: { email: {
label: "E-Mail", label: "E-Mail",
verified: "Verified",
}, },
username: { username: {
label: "Username", label: "Username",