diff --git a/app/components/Table.tsx b/app/components/Table.tsx index d1b9c25e74..b92d3effa1 100644 --- a/app/components/Table.tsx +++ b/app/components/Table.tsx @@ -335,6 +335,7 @@ const TR = styled.div<{ $columns: string }>` grid-template-columns: ${({ $columns }) => `${$columns}`}; align-items: center; border-bottom: 1px solid ${s("divider")}; + overflow: hidden; &:last-child { border-bottom: 0; @@ -357,7 +358,8 @@ const TD = styled.span` padding: 10px 6px; font-size: 14px; text-wrap: wrap; - word-break: break-word; + overflow: hidden; + text-overflow: ellipsis; &:first-child { font-size: 15px; diff --git a/app/scenes/Settings/components/MembersTable.tsx b/app/scenes/Settings/components/MembersTable.tsx index 962eb8ca68..690360c430 100644 --- a/app/scenes/Settings/components/MembersTable.tsx +++ b/app/scenes/Settings/components/MembersTable.tsx @@ -2,6 +2,7 @@ import compact from "lodash/compact"; import * as React from "react"; import { useTranslation } from "react-i18next"; import styled from "styled-components"; +import Text from "@shared/components/Text"; import User from "~/models/User"; import { Avatar, AvatarSize } from "~/components/Avatar"; import Badge from "~/components/Badge"; @@ -14,6 +15,7 @@ import { import { type Column as TableColumn } from "~/components/Table"; import Time from "~/components/Time"; import useCurrentUser from "~/hooks/useCurrentUser"; +import useMobile from "~/hooks/useMobile"; import UserMenu from "~/menus/UserMenu"; import { FILTER_HEIGHT } from "./StickyFilters"; @@ -27,6 +29,7 @@ type Props = Omit, "columns" | "rowHeight"> & { export function MembersTable({ canManage, ...rest }: Props) { const { t } = useTranslation(); const currentUser = useCurrentUser(); + const isMobile = useMobile(); const columns = React.useMemo[]>( () => @@ -38,13 +41,20 @@ export function MembersTable({ canManage, ...rest }: Props) { accessor: (user) => user.name, component: (user) => ( - {user.name}{" "} - {currentUser.id === user.id && `(${t("You")})`} + {" "} + + + {user.name} {currentUser.id === user.id && `(${t("You")})`} + + {isMobile && canManage && ( + {user.email} + )} + ), width: "4fr", }, - canManage + canManage && !isMobile ? { type: "data", id: "email", @@ -54,17 +64,19 @@ export function MembersTable({ canManage, ...rest }: Props) { width: "4fr", } : undefined, - { - type: "data", - id: "lastActiveAt", - header: t("Last active"), - accessor: (user) => user.lastActiveAt, - component: (user) => - user.lastActiveAt ? ( -