mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Merge 41f739202b into 777515f754
This commit is contained in:
commit
47d4e030f6
2 changed files with 35 additions and 2 deletions
11
src/app/(main)/settings/websites/WebsitesTable.module.css
Normal file
11
src/app/(main)/settings/websites/WebsitesTable.module.css
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
.row {
|
||||
color: inherit;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.row:visited {
|
||||
color: inherit;
|
||||
}
|
||||
|
|
@ -2,6 +2,8 @@ import { ReactNode } from 'react';
|
|||
import { Text, Icon, Icons, GridTable, GridColumn } from 'react-basics';
|
||||
import { useMessages, useTeamUrl } from '@/components/hooks';
|
||||
import LinkButton from '@/components/common/LinkButton';
|
||||
import Link from 'next/link';
|
||||
import styles from './WebsitesTable.module.css';
|
||||
|
||||
export interface WebsitesTableProps {
|
||||
data: any[];
|
||||
|
|
@ -28,8 +30,28 @@ export function WebsitesTable({
|
|||
|
||||
return (
|
||||
<GridTable data={data}>
|
||||
<GridColumn name="name" label={formatMessage(labels.name)} />
|
||||
<GridColumn name="domain" label={formatMessage(labels.domain)} />
|
||||
<GridColumn name="name" label={formatMessage(labels.name)}>
|
||||
{row =>
|
||||
allowView ? (
|
||||
<Link href={renderTeamUrl(`/websites/${row.id}`)} className={styles.row}>
|
||||
{row.name}
|
||||
</Link>
|
||||
) : (
|
||||
row.name
|
||||
)
|
||||
}
|
||||
</GridColumn>
|
||||
<GridColumn name="domain" label={formatMessage(labels.domain)}>
|
||||
{row =>
|
||||
allowView ? (
|
||||
<Link href={renderTeamUrl(`/websites/${row.id}`)} className={styles.row}>
|
||||
{row.domain}
|
||||
</Link>
|
||||
) : (
|
||||
row.domain
|
||||
)
|
||||
}
|
||||
</GridColumn>
|
||||
{showActions && (
|
||||
<GridColumn name="action" label=" " alignment="end">
|
||||
{row => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue