Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Layout fixes for DataTable.

Mike Caoa79183cd13f2
diff --git a/src/app/(main)/settings/layout.module.css b/src/app/(main)/settings/layout.module.css
index c56ec8bbd..19162ef5b 100644
--- a/src/app/(main)/settings/layout.module.css
+++ b/src/app/(main)/settings/layout.module.css
@@ -16,7 +16,11 @@
min-height: 50vh;
}
-@media only screen and (max-width: 768px) {
+@media only screen and (max-width: 992px) {
+ .layout {
+ grid-template-columns: 1fr;
+ }
+
.menu {
display: none;
}
diff --git a/src/app/(main)/settings/websites/WebsitesTable.js b/src/app/(main)/settings/websites/WebsitesTable.js
index 3c0cbc462..f8b12923e 100644
--- a/src/app/(main)/settings/websites/WebsitesTable.js
+++ b/src/app/(main)/settings/websites/WebsitesTable.js
@@ -28,39 +28,41 @@ export function WebsitesTable({
{row => row.user.username}
</GridColumn>
)}
- <GridColumn name="action" label=" " alignment="end">
- {row => {
- const {
- id,
- user: { id: ownerId },
- } = row;
+ {showActions && (
+ <GridColumn name="action" label=" " alignment="end">
+ {row => {
+ const {
+ id,
+ user: { id: ownerId },
+ } = row;
- return (
- <>
- {showActions && allowEdit && (!showTeam || ownerId === user.id) && (
- <Link href={`/settings/websites/${id}`}>
- <Button>
- <Icon>
- <Icons.Edit />
- </Icon>
- <Text>{formatMessage(labels.edit)}</Text>
- </Button>
- </Link>
- )}
- {showActions && allowView && (
- <Link href={`/websites/${id}`}>
- <Button>
- <Icon>
- <Icons.External />
- </Icon>
- <Text>{formatMessage(labels.view)}</Text>
- </Button>
- </Link>
- )}
- </>
- );
- }}
- </GridColumn>
+ return (
+ <>
+ {allowEdit && (!showTeam || ownerId === user.id) && (
+ <Link href={`/settings/websites/${id}`}>
+ <Button>
+ <Icon>
+ <Icons.Edit />
+ </Icon>
+ <Text>{formatMessage(labels.edit)}</Text>
+ </Button>
+ </Link>
+ )}
+ {allowView && (
+ <Link href={`/websites/${id}`}>
+ <Button>
+ <Icon>
+ <Icons.External />
+ </Icon>
+ <Text>{formatMessage(labels.view)}</Text>
+ </Button>
+ </Link>
+ )}
+ </>
+ );
+ }}
+ </GridColumn>
+ )}
{children}
</GridTable>
);
diff --git a/src/components/common/DataTable.module.css b/src/components/common/DataTable.module.css
index 4ca52b744..6e925bc0e 100644
--- a/src/components/common/DataTable.module.css
+++ b/src/components/common/DataTable.module.css
@@ -20,6 +20,7 @@
.body {
display: flex;
position: relative;
+ overflow-x: auto;
}
.body td {
@@ -27,6 +28,7 @@
gap: 10px;
min-height: 70px;
align-items: center;
+ min-width: min-content;
}
.pager {