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'), auth.user ? reportProject(project.id) : navigateTo('/auth/sign-in'),
color: 'red', color: 'red',
hoverOnly: true, hoverOnly: true,
shown: !currentMember,
}, },
{ id: 'copy-id', action: () => copyId() }, { id: 'copy-id', action: () => copyId() },
]" ]"

View File

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

View File

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

View File

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