mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -04:00
Merge branch 'blog-reaction-unlogged-feedback' into 'main'
show feedback to unlogged users when hovering over blog reaction buttons See merge request PronounsPage/PronounsPage!567
This commit is contained in:
commit
701c59c1ea
@ -1,4 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import Tooltip from '~/components/Tooltip.vue';
|
||||||
import type { BlogReactions } from '~/server/blog.ts';
|
import type { BlogReactions } from '~/server/blog.ts';
|
||||||
import { reactionOptions } from '~/src/blog/reactions.ts';
|
import { reactionOptions } from '~/src/blog/reactions.ts';
|
||||||
import { useMainStore } from '~/store/index.ts';
|
import { useMainStore } from '~/store/index.ts';
|
||||||
@ -41,15 +42,20 @@ const toggleReaction = async (emoji: string) => {
|
|||||||
<T>links.blogReact</T><T>quotation.colon</T>
|
<T>links.blogReact</T><T>quotation.colon</T>
|
||||||
</p>
|
</p>
|
||||||
</template>
|
</template>
|
||||||
<button
|
<component
|
||||||
|
:is="store.user ? 'span' : Tooltip"
|
||||||
v-for="emoji in reactionOptions"
|
v-for="emoji in reactionOptions"
|
||||||
:key="emoji"
|
:key="emoji"
|
||||||
type="button"
|
:text="$t('links.blogReactAuthRequired')"
|
||||||
:inert="!store.user"
|
|
||||||
:class="['btn', classForEmoji(emoji), 'm-1']"
|
|
||||||
@click="toggleReaction(emoji)"
|
|
||||||
>
|
>
|
||||||
{{ reactions?.total[emoji] ?? 0 }} {{ emoji }}
|
<button
|
||||||
</button>
|
type="button"
|
||||||
|
:inert="!store.user"
|
||||||
|
:class="['btn', classForEmoji(emoji), 'm-1']"
|
||||||
|
@click="toggleReaction(emoji)"
|
||||||
|
>
|
||||||
|
{{ reactions?.total[emoji] ?? 0 }} {{ emoji }}
|
||||||
|
</button>
|
||||||
|
</component>
|
||||||
</Loading>
|
</Loading>
|
||||||
</template>
|
</template>
|
||||||
|
@ -470,6 +470,7 @@ links:
|
|||||||
blogLatest: 'Latest blog entries'
|
blogLatest: 'Latest blog entries'
|
||||||
blogFeed: 'Feed'
|
blogFeed: 'Feed'
|
||||||
blogReact: 'React'
|
blogReact: 'React'
|
||||||
|
blogReactAuthRequired: 'You must log in to leave a reaction'
|
||||||
mediaShort: 'Media'
|
mediaShort: 'Media'
|
||||||
media: 'Pronouns.page in the media'
|
media: 'Pronouns.page in the media'
|
||||||
|
|
||||||
|
@ -651,6 +651,7 @@ links:
|
|||||||
blogLatest: 'Latest blog entries'
|
blogLatest: 'Latest blog entries'
|
||||||
blogFeed: 'Feed'
|
blogFeed: 'Feed'
|
||||||
blogReact: 'React'
|
blogReact: 'React'
|
||||||
|
blogReactAuthRequired: 'You must log in to leave a reaction'
|
||||||
mediaShort: 'Media'
|
mediaShort: 'Media'
|
||||||
media: 'Pronouns.page in the media'
|
media: 'Pronouns.page in the media'
|
||||||
|
|
||||||
|
@ -999,6 +999,7 @@ links:
|
|||||||
blog: 'Blog'
|
blog: 'Blog'
|
||||||
blogTOC: 'Spis treści'
|
blogTOC: 'Spis treści'
|
||||||
blogLatest: 'Najnowsze wpisy na naszym blogu'
|
blogLatest: 'Najnowsze wpisy na naszym blogu'
|
||||||
|
blogReactAuthRequired: 'Żeby zostawić reakcję, musisz się zalogować'
|
||||||
academic:
|
academic:
|
||||||
header: 'Nauka'
|
header: 'Nauka'
|
||||||
intro:
|
intro:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user