Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
wpf500 committed Jan 7, 2025
1 parent 626b592 commit e647533
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,27 @@
<div v-if="responses.length > 1" class="mb-4 flex items-center gap-4">
<AppButtonGroup>
<AppButton
variant="primaryOutlined"
variant="link"
:icon="faArrowLeft"
:disabled="responseIndex === 0"
@click="changeResponse(-1)"
/>
<AppButton
variant="primaryOutlined"
variant="link"
:icon="faArrowRight"
:disabled="responseIndex === responses.length - 1"
@click="changeResponse(1)"
/>
</AppButtonGroup>

<i18n-t keypath="callout.responseOf" tag="span">
<template #number
><b>{{ n(responseIndex) }}</b></template
>
<template #count
><b>{{ n(responses.length) }}</b></template
>
</i18n-t>
<span> Response {{ responseIndex + 1 }} of {{ responses.length }} </span>
</div>
<CalloutResponse :callout="callout" :response="responses[responseIndex]" />
Expand All @@ -33,6 +42,7 @@ import {
import CalloutResponse from './CalloutResponse.vue';
import AppButton from '@components/button/AppButton.vue';
import AppButtonGroup from '@components/button/AppButtonGroup.vue';
import { useI18n } from 'vue-i18n';
const emit = defineEmits<{
(e: 'close'): void;
Expand All @@ -43,6 +53,8 @@ const props = defineProps<{
responses: GetCalloutResponseMapData[];
}>();
const { n } = useI18n();
const responseIndex = ref(0);
function changeResponse(inc: number) {
Expand Down

0 comments on commit e647533

Please sign in to comment.