fix(frontend): hide report button on own projects (#2905)

* fix(frontend): hide report button on own projects

Resolves #1381

* fix(frontend): hide report button on self
This commit is contained in:
Erb3 2024-11-11 06:15:37 +01:00 committed by GitHub
parent ac46026f99
commit 648b40a8f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 1 deletions

View File

@ -606,6 +606,7 @@
auth.user ? reportProject(project.id) : navigateTo('/auth/sign-in'),
color: 'red',
hoverOnly: true,
shown: !currentMember,
},
{ id: 'copy-id', action: () => copyId() },
]"

View File

@ -158,7 +158,7 @@
Report
</nuxt-link>
</ButtonStyled>
<ButtonStyled v-else>
<ButtonStyled v-else-if="!currentMember">
<button @click="() => reportVersion(version.id)">
<ReportIcon aria-hidden="true" />
Report

View File

@ -205,6 +205,7 @@
color: 'red',
hoverFilled: true,
action: () => reportVersion(version.id),
shown: !currentMember,
},
{ divider: true, shown: currentMember },
{

View File

@ -71,6 +71,7 @@
action: () => reportUser(user.id),
color: 'red',
hoverOnly: true,
shown: auth.user?.id !== user.id,
},
{ id: 'copy-id', action: () => copyId() },
]"