Implemented multi-language support for the application: - Added @nuxtjs/i18n plugin configuration - Created locale files for English (en-US) and Chinese (zh-CN) - Updated components to use translation keys - Added language switcher in header - Configured VSCode i18n-ally settings - Prepared translation infrastructure for future language expansions
32 lines
941 B
Vue
32 lines
941 B
Vue
<script setup>
|
|
import { LogOut } from 'lucide-vue-next'
|
|
|
|
function logOut() {
|
|
localStorage.removeItem('SinkSiteToken')
|
|
navigateTo('/dashboard/login')
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<AlertDialog>
|
|
<AlertDialogTrigger as-child>
|
|
<LogOut
|
|
class="w-4 h-4 cursor-pointer"
|
|
/>
|
|
</AlertDialogTrigger>
|
|
<AlertDialogContent class="max-w-[95svw] max-h-[95svh] md:max-w-lg grid-rows-[auto_minmax(0,1fr)_auto]">
|
|
<AlertDialogHeader>
|
|
<AlertDialogTitle>{{ $t('logout.title') }}</AlertDialogTitle>
|
|
<AlertDialogDescription>
|
|
{{ $t('logout.confirm') }}
|
|
</AlertDialogDescription>
|
|
</AlertDialogHeader>
|
|
<AlertDialogFooter>
|
|
<AlertDialogCancel>{{ $t('common.cancel') }}</AlertDialogCancel>
|
|
<AlertDialogAction @click="logOut">
|
|
{{ $t('logout.action') }}
|
|
</AlertDialogAction>
|
|
</AlertDialogFooter>
|
|
</AlertDialogContent>
|
|
</AlertDialog>
|
|
</template>
|