mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-22 09:57:00 +01:00
Merge branch 'dev' of https://github.com/umami-software/umami into analytics
This commit is contained in:
commit
c6f656e142
@ -12,16 +12,16 @@ export function TeamWebsitesPage({ teamId }: { teamId: string }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { user } = useLogin();
|
||||
|
||||
const canEdit = team?.teamUser?.find(
|
||||
({ userId, role }) => role !== ROLES.viewOnly && userId === user.id,
|
||||
const allowEdit = !!team?.teamUser?.find(
|
||||
({ userId, role }) => userId === user.id && role !== ROLES.teamViewOnly,
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<PageHeader title={formatMessage(labels.websites)}>
|
||||
{canEdit && <WebsiteAddButton teamId={teamId} />}
|
||||
{allowEdit && <WebsiteAddButton teamId={teamId} />}
|
||||
</PageHeader>
|
||||
<TeamWebsitesDataTable teamId={teamId} allowEdit={canEdit} />
|
||||
<TeamWebsitesDataTable teamId={teamId} allowEdit={allowEdit} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ export function UsersTable({
|
||||
)
|
||||
}
|
||||
</GridColumn>
|
||||
<GridColumn name="created" label={formatMessage(labels.created)} width={'120px'}>
|
||||
<GridColumn name="created" label={formatMessage(labels.created)} width={'150px'}>
|
||||
{row =>
|
||||
formatDistance(new Date(row.createdAt), new Date(), {
|
||||
addSuffix: true,
|
||||
|
Loading…
Reference in New Issue
Block a user