Skip to content

Commit

Permalink
Move accept post to post footer
Browse files Browse the repository at this point in the history
  • Loading branch information
danon committed Nov 27, 2024
1 parent c6702ca commit 127fe49
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions resources/js/components/forum/post.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,17 +180,19 @@
<vue-icon name="postVoted" v-if="post.is_voted"/>
<vue-icon name="postVote" v-else/>
</a>
<a v-if="!hidden && post.permissions.accept"
:class="{'on': post.is_accepted}"
@click="accept(post)"
class="vote-accept"
href="javascript:"
title="Kliknij, aby ustawić tę odpowiedź jako zaakceptowaną">
<vue-icon name="postAccept"/>
</a>
<span v-else-if="post.is_accepted" class="vote-accept on">
<vue-icon name="postAccept"/>
</span>
<template v-if="is_mode_linear">
<a v-if="!hidden && post.permissions.accept"
:class="{'on': post.is_accepted}"
@click="accept(post)"
class="vote-accept"
href="javascript:"
title="Kliknij, aby ustawić tę odpowiedź jako zaakceptowaną">
<vue-icon name="postAccept"/>
</a>
<span v-else-if="post.is_accepted" class="vote-accept on">
<vue-icon name="postAccept"/>
</span>
</template>
</div>
<div class="post-content">
<div v-html="post.html"/>
Expand Down Expand Up @@ -304,6 +306,17 @@
<span class="d-none d-sm-inline ms-1">Udostępnij</span>
</button>

<button class="btn btn-sm" v-if="is_mode_tree && post.permissions.accept" @click="accept(post)">
<template v-if="post.is_accepted">
<vue-icon name="postAccept" class="text-primary"/>
<span class="d-none d-sm-inline ms-1">Zaakceptowano</span>
</template>
<template v-else>
<vue-icon name="postAccept"/>
<span class="d-none d-sm-inline ms-1">Zaakceptuj</span>
</template>
</button>

<template v-if="is_mode_linear">
<button v-if="!post.is_locked || post.permissions.write" @click="checkAuth(comment)" class="btn btn-sm">
<span v-if="isCommenting" class="text-primary">
Expand Down

0 comments on commit 127fe49

Please sign in to comment.