You've already forked AstralRinth
forked from didirus/AstralRinth
fix(frontend): redirect report button to signin if needed (#2953)
Fixes #2951
This commit is contained in:
@@ -204,7 +204,8 @@
|
||||
id: 'report',
|
||||
color: 'red',
|
||||
hoverFilled: true,
|
||||
action: () => reportVersion(version.id),
|
||||
action: () =>
|
||||
auth.user ? reportVersion(version.id) : navigateTo('/auth/sign-in'),
|
||||
shown: !currentMember,
|
||||
},
|
||||
{ divider: true, shown: currentMember },
|
||||
@@ -339,6 +340,7 @@ const props = defineProps({
|
||||
const tags = useTags();
|
||||
const flags = useFeatureFlags();
|
||||
const formatRelativeTime = useRelativeTime();
|
||||
const auth = await useAuth();
|
||||
|
||||
const emits = defineEmits(["onDownload"]);
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
{ divider: true, shown: auth.user && auth.user.id === user.id },
|
||||
{
|
||||
id: 'report',
|
||||
action: () => reportUser(user.id),
|
||||
action: () => (auth.user ? reportUser(user.id) : navigateTo('/auth/sign-in')),
|
||||
color: 'red',
|
||||
hoverOnly: true,
|
||||
shown: auth.user?.id !== user.id,
|
||||
|
||||
Reference in New Issue
Block a user