2025-12-17 16:49:16 +08:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import router from '@/router'
|
|
|
|
|
import { useUserStore } from '@/stores'
|
|
|
|
|
import defaultAvatar from '@/assets/images/default-avatar.svg'
|
|
|
|
|
|
|
|
|
|
const userStore = useUserStore()
|
|
|
|
|
const userInfo = computed(() => userStore.userInfo)
|
|
|
|
|
const isLogin = computed(() => !!userInfo.value.uid)
|
|
|
|
|
|
|
|
|
|
function login() {
|
|
|
|
|
if (isLogin.value)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
router.push({ name: 'Login', query: { redirect: 'Profile' } })
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<VanCellGroup :inset="true">
|
|
|
|
|
<van-cell center :is-link="!isLogin" @click="login">
|
|
|
|
|
<template #title>
|
|
|
|
|
<van-image :src="userInfo.avatar || defaultAvatar" round class="h-14 w-14" />
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template #value>
|
|
|
|
|
<span v-if="isLogin">{{ userInfo.name }}</span>
|
refactor: remove i18n dependency and hardcode strings in components
- Updated ChatInput.vue to remove i18n and handle model value updates directly.
- Refactored NavBar.vue to use a static title map instead of i18n.
- Simplified TabBar.vue by replacing i18n calls with hardcoded titles.
- Removed i18n usage in various pages (charts, counter, forgot-password, index, keepalive, llm-chat, login, mock, profile, register, scroll-cache, settings, unocss).
- Deleted localization files (en-US.json, zh-CN.json) and i18n utility functions.
- Updated constants to provide static app name and description.
- Adjusted page titles in set-page-title.ts to use static names.
- Cleaned up TypeScript types by removing unused i18n types.
2025-12-19 10:09:47 +08:00
|
|
|
<span v-else>Login</span>
|
2025-12-17 16:49:16 +08:00
|
|
|
</template>
|
|
|
|
|
</van-cell>
|
|
|
|
|
</VanCellGroup>
|
|
|
|
|
|
|
|
|
|
<VanCellGroup :inset="true" class="!mt-4">
|
refactor: remove i18n dependency and hardcode strings in components
- Updated ChatInput.vue to remove i18n and handle model value updates directly.
- Refactored NavBar.vue to use a static title map instead of i18n.
- Simplified TabBar.vue by replacing i18n calls with hardcoded titles.
- Removed i18n usage in various pages (charts, counter, forgot-password, index, keepalive, llm-chat, login, mock, profile, register, scroll-cache, settings, unocss).
- Deleted localization files (en-US.json, zh-CN.json) and i18n utility functions.
- Updated constants to provide static app name and description.
- Adjusted page titles in set-page-title.ts to use static names.
- Cleaned up TypeScript types by removing unused i18n types.
2025-12-19 10:09:47 +08:00
|
|
|
<van-cell title="Settings" icon="setting-o" is-link to="/settings">
|
2025-12-17 16:49:16 +08:00
|
|
|
<template #icon>
|
|
|
|
|
<div class="i-carbon:settings text-gray-400 mr-2 self-center" />
|
|
|
|
|
</template>
|
|
|
|
|
</van-cell>
|
refactor: remove i18n dependency and hardcode strings in components
- Updated ChatInput.vue to remove i18n and handle model value updates directly.
- Refactored NavBar.vue to use a static title map instead of i18n.
- Simplified TabBar.vue by replacing i18n calls with hardcoded titles.
- Removed i18n usage in various pages (charts, counter, forgot-password, index, keepalive, llm-chat, login, mock, profile, register, scroll-cache, settings, unocss).
- Deleted localization files (en-US.json, zh-CN.json) and i18n utility functions.
- Updated constants to provide static app name and description.
- Adjusted page titles in set-page-title.ts to use static names.
- Cleaned up TypeScript types by removing unused i18n types.
2025-12-19 10:09:47 +08:00
|
|
|
<van-cell title="Documentation" is-link url="https://vue-zone.github.io/docs/vue3-vant-mobile/">
|
2025-12-17 16:49:16 +08:00
|
|
|
<template #icon>
|
|
|
|
|
<div class="i-carbon:doc text-gray-400 mr-2 self-center" />
|
|
|
|
|
</template>
|
|
|
|
|
</van-cell>
|
|
|
|
|
</VanCellGroup>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<route lang="json5">
|
|
|
|
|
{
|
|
|
|
|
name: 'Profile'
|
|
|
|
|
}
|
|
|
|
|
</route>
|