fix(reactions): do not enable reaction picker when the current user does not have write access
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1558921f42
commit
95276ceebe
@ -16,9 +16,11 @@ import {useColorScheme} from '@/composables/useColorScheme'
|
||||
const {
|
||||
entityKind,
|
||||
entityId,
|
||||
disabled = false,
|
||||
} = defineProps<{
|
||||
entityKind: ReactionKind,
|
||||
entityId: number,
|
||||
disabled?: boolean,
|
||||
}>()
|
||||
|
||||
const authStore = useAuthStore()
|
||||
@ -143,11 +145,13 @@ async function toggleReaction(value: string) {
|
||||
v-tooltip="getReactionTooltip(users, value)"
|
||||
class="reaction-button"
|
||||
:class="{'current-user-has-reacted': hasCurrentUserReactedWithEmoji(value)}"
|
||||
:disabled
|
||||
@click="toggleReaction(value)"
|
||||
>
|
||||
{{ value }} {{ users.length }}
|
||||
</BaseButton>
|
||||
<BaseButton
|
||||
v-if="!disabled"
|
||||
ref="emojiPickerButtonRef"
|
||||
v-tooltip="$t('reaction.add')"
|
||||
class="reaction-button"
|
||||
|
@ -102,6 +102,7 @@
|
||||
class="mt-2"
|
||||
entity-kind="comments"
|
||||
:entity-id="c.id"
|
||||
:disabled="!canWrite"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -328,6 +328,7 @@
|
||||
entity-kind="tasks"
|
||||
:entity-id="task.id"
|
||||
class="details"
|
||||
:disabled="!canWrite"
|
||||
/>
|
||||
|
||||
<!-- Attachments -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user