mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 07:37:11 +01:00
Hide edit button cloudMode.
This commit is contained in:
parent
530fc5dcd1
commit
d3e175a31d
3 changed files with 21 additions and 4 deletions
|
|
@ -9,7 +9,14 @@ import useUser from 'hooks/useUser';
|
|||
import { ROLES } from 'lib/constants';
|
||||
import { Button, Icon, Icons, Modal, ModalTrigger, Text, useToasts } from 'react-basics';
|
||||
|
||||
export function WebsitesList({ showTeam, showHeader = true, includeTeams, onlyTeams, fetch }) {
|
||||
export function WebsitesList({
|
||||
showTeam,
|
||||
showEditButton = true,
|
||||
showHeader = true,
|
||||
includeTeams,
|
||||
onlyTeams,
|
||||
fetch,
|
||||
}) {
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
const { user } = useUser();
|
||||
|
||||
|
|
@ -59,6 +66,7 @@ export function WebsitesList({ showTeam, showHeader = true, includeTeams, onlyTe
|
|||
<WebsitesTable
|
||||
data={data}
|
||||
showTeam={showTeam}
|
||||
showEditButton={showEditButton}
|
||||
onFilterChange={handleFilterChange}
|
||||
onPageChange={handlePageChange}
|
||||
onPageSizeChange={handlePageSizeChange}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ export function WebsitesTable({
|
|||
onPageChange,
|
||||
onPageSizeChange,
|
||||
showTeam,
|
||||
showEditButton,
|
||||
}) {
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
const { openExternal } = useConfig();
|
||||
|
|
@ -58,7 +59,7 @@ export function WebsitesTable({
|
|||
|
||||
return (
|
||||
<>
|
||||
{(!showTeam || ownerId === user.id) && (
|
||||
{showEditButton && (!showTeam || ownerId === user.id) && (
|
||||
<Link href={`/settings/websites/${id}`}>
|
||||
<Button>
|
||||
<Icon>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue