fix: 🐛 Fix more authenticated user actions for logged out users

This commit is contained in:
Jesse Wierzbinski 2024-12-07 18:28:42 +01:00
parent b7d22fa905
commit 457021980f
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View file

@ -1,18 +1,18 @@
<template> <template>
<div class="flex flex-row w-full items-stretch justify-around text-sm *:max-w-28 *:w-full *:text-muted-foreground"> <div class="flex flex-row w-full items-stretch justify-around text-sm *:max-w-28 *:w-full *:text-muted-foreground">
<Button variant="ghost" @click="emit('reply')" title="Reply"> <Button variant="ghost" @click="emit('reply')" title="Reply" :disabled="!identity">
<Reply class="size-5 text-primary" /> <Reply class="size-5 text-primary" />
{{ numberFormat(replyCount) }} {{ numberFormat(replyCount) }}
</Button> </Button>
<Button variant="ghost" @click="liked ? unlike() : like()" :title="liked ? 'Unlike' : 'Like'"> <Button variant="ghost" @click="liked ? unlike() : like()" :title="liked ? 'Unlike' : 'Like'" :disabled="!identity">
<Heart class="size-5 text-primary" /> <Heart class="size-5 text-primary" />
{{ numberFormat(likeCount) }} {{ numberFormat(likeCount) }}
</Button> </Button>
<Button variant="ghost" @click="reblogged ? unreblog() : reblog()" :title="reblogged ? 'Unreblog' : 'Reblog'"> <Button variant="ghost" @click="reblogged ? unreblog() : reblog()" :title="reblogged ? 'Unreblog' : 'Reblog'" :disabled="!identity">
<Repeat class="size-5 text-primary" /> <Repeat class="size-5 text-primary" />
{{ numberFormat(reblogCount) }} {{ numberFormat(reblogCount) }}
</Button> </Button>
<Button variant="ghost" @click="emit('quote')" title="Quote"> <Button variant="ghost" @click="emit('quote')" title="Quote" :disabled="!identity">
<Quote class="size-5 text-primary" /> <Quote class="size-5 text-primary" />
</Button> </Button>
<Menu :api-note-string="apiNoteString" :url="url" :remote-url="remoteUrl" :is-remote="isRemote" :author-id="authorId" @edit="emit('edit')" :note-id="noteId" @delete="emit('delete')"> <Menu :api-note-string="apiNoteString" :url="url" :remote-url="remoteUrl" :is-remote="isRemote" :author-id="authorId" @edit="emit('edit')" :note-id="noteId" @delete="emit('delete')">

View file

@ -3,7 +3,7 @@
<ProfileHeader :header="account.header" :avatar="account.avatar" :display-name="account.display_name" /> <ProfileHeader :header="account.header" :avatar="account.avatar" :display-name="account.display_name" />
<CardContent class="pt-3 gap-4 flex flex-col"> <CardContent class="pt-3 gap-4 flex flex-col">
<div class="flex flex-row justify-end gap-2"> <div class="flex flex-row justify-end gap-2">
<Button variant="secondary" :disabled="isLoading || relationship?.requested" v-if="!isMe" <Button variant="secondary" :disabled="isLoading || relationship?.requested" v-if="!isMe && identity"
@click="relationship?.following ? unfollow() : follow()"> @click="relationship?.following ? unfollow() : follow()">
<Loader v-if="isLoading" class="animate-spin" /> <Loader v-if="isLoading" class="animate-spin" />
<span v-else> <span v-else>