mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-09-23 02:53:32 +00:00
Translate search result tabs
- Translate sort options - Correct button size in ProfileEditView
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
<div class="max-w-5xl mx-auto p-6 min-h-screen">
|
||||
<Tabs :default-value="defaultTab" v-model="activeTab">
|
||||
<TabsList class="grid w-full mb-6" :class="tabsGridClass">
|
||||
<TabsTrigger v-for="(items, type) in results" :key="type" :value="type" class="capitalize">
|
||||
{{ type }} ({{ items.length }})
|
||||
<TabsTrigger v-for="(items, type) in results" :key="type" :value="type">
|
||||
{{ $t(tabLabelKeys[type], 2) }} ({{ items.length }})
|
||||
</TabsTrigger>
|
||||
</TabsList>
|
||||
|
||||
@@ -94,6 +94,11 @@ import { ChevronRightIcon, ClockIcon } from 'lucide-vue-next'
|
||||
import { format, parseISO } from 'date-fns'
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@shared-ui/components/ui/tabs'
|
||||
|
||||
const tabLabelKeys = {
|
||||
conversations: 'globals.terms.conversation',
|
||||
messages: 'globals.terms.message'
|
||||
}
|
||||
|
||||
const props = defineProps({
|
||||
results: {
|
||||
type: Object,
|
||||
|
||||
@@ -75,14 +75,14 @@ export const useConversationStore = defineStore('conversation', () => {
|
||||
}
|
||||
}
|
||||
|
||||
const sortFieldLabels = {
|
||||
oldest: 'Oldest activity',
|
||||
newest: 'Newest activity',
|
||||
started_first: 'Started first',
|
||||
started_last: 'Started last',
|
||||
waiting_longest: 'Waiting longest',
|
||||
next_sla_target: 'Next SLA target',
|
||||
priority_first: 'Priority first'
|
||||
const sortFieldI18nKeys = {
|
||||
oldest: 'conversation.sort.oldestActivity',
|
||||
newest: 'conversation.sort.newestActivity',
|
||||
started_first: 'conversation.sort.startedFirst',
|
||||
started_last: 'conversation.sort.startedLast',
|
||||
waiting_longest: 'conversation.sort.waitingLongest',
|
||||
next_sla_target: 'conversation.sort.nextSLATarget',
|
||||
priority_first: 'conversation.sort.priorityFirst'
|
||||
}
|
||||
|
||||
const conversations = reactive({
|
||||
@@ -141,7 +141,9 @@ export const useConversationStore = defineStore('conversation', () => {
|
||||
}
|
||||
|
||||
const getListSortField = computed(() => {
|
||||
return sortFieldLabels[conversations.sortField]
|
||||
const i18n = getI18n()
|
||||
const t = i18n?.global?.t || ((key) => key.split('.').pop())
|
||||
return t(sortFieldI18nKeys[conversations.sortField])
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
accept="image/jpg, image/jpeg, image/png"
|
||||
@change="selectFile"
|
||||
/>
|
||||
<Button class="w-28" @click="selectAvatar"> {{ $t('account.chooseAFile') }} </Button>
|
||||
<Button class="w-28" @click="removeAvatar" variant="destructive">
|
||||
<Button @click="selectAvatar"> {{ $t('account.chooseAFile') }} </Button>
|
||||
<Button @click="removeAvatar" variant="destructive">
|
||||
{{ $t('account.removeAvatar') }}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Button class="w-28" @click="saveUser" size="sm" :isLoading="isSaving">
|
||||
<Button class="self-start" @click="saveUser" :isLoading="isSaving">
|
||||
{{ $t('globals.messages.saveChanges') }}
|
||||
</Button>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user