update
This commit is contained in:
parent
a1a7e3f3b5
commit
f3fa5f9470
@ -5,7 +5,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
image: tradus-web:1.3.21
|
image: tradus-web:1.3.22
|
||||||
container_name: tradus-web
|
container_name: tradus-web
|
||||||
ports:
|
ports:
|
||||||
- '6000:80'
|
- '6000:80'
|
||||||
|
|||||||
32
src/App.vue
32
src/App.vue
@ -13,7 +13,7 @@ const themeStore = useThemeStore()
|
|||||||
const isAuthenticated = computed(() => userStore.isAuthenticated)
|
const isAuthenticated = computed(() => userStore.isAuthenticated)
|
||||||
const userInfo = computed(() => userStore.userInfo)
|
const userInfo = computed(() => userStore.userInfo)
|
||||||
const showMobileMenu = ref(false)
|
const showMobileMenu = ref(false)
|
||||||
const showUserMenu = ref(false)
|
// const showUserMenu = ref(false)
|
||||||
const showLoginModal = ref(false)
|
const showLoginModal = ref(false)
|
||||||
const showResetPasswordModal = ref(false)
|
const showResetPasswordModal = ref(false)
|
||||||
const showUserInfoModal = ref(false)
|
const showUserInfoModal = ref(false)
|
||||||
@ -356,7 +356,7 @@ const handleLogout = () => {
|
|||||||
window.location.href = '/'
|
window.location.href = '/'
|
||||||
}
|
}
|
||||||
showMobileMenu.value = false
|
showMobileMenu.value = false
|
||||||
showUserMenu.value = false
|
// showUserMenu.value = false
|
||||||
showUserInfoModal.value = false
|
showUserInfoModal.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -364,10 +364,10 @@ const toggleMobileMenu = () => {
|
|||||||
showMobileMenu.value = !showMobileMenu.value
|
showMobileMenu.value = !showMobileMenu.value
|
||||||
}
|
}
|
||||||
|
|
||||||
const toggleUserMenu = (event: Event) => {
|
// const toggleUserMenu = (event: Event) => {
|
||||||
event.stopPropagation()
|
// event.stopPropagation()
|
||||||
showUserMenu.value = !showUserMenu.value
|
// showUserMenu.value = !showUserMenu.value
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 点击其他地方关闭菜单
|
// 点击其他地方关闭菜单
|
||||||
const closeMenus = (event: MouseEvent) => {
|
const closeMenus = (event: MouseEvent) => {
|
||||||
@ -407,7 +407,7 @@ const openResetPasswordModal = () => {
|
|||||||
// 打开用户信息模态框
|
// 打开用户信息模态框
|
||||||
const openUserInfoModal = () => {
|
const openUserInfoModal = () => {
|
||||||
showUserInfoModal.value = true
|
showUserInfoModal.value = true
|
||||||
showUserMenu.value = false
|
// showUserMenu.value = false
|
||||||
showMobileMenu.value = false
|
showMobileMenu.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -417,9 +417,9 @@ const closeUserInfoModal = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 切换主题
|
// 切换主题
|
||||||
const toggleTheme = () => {
|
// const toggleTheme = () => {
|
||||||
themeStore.toggleTheme()
|
// themeStore.toggleTheme()
|
||||||
}
|
// }
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
document.addEventListener('click', closeMenus)
|
document.addEventListener('click', closeMenus)
|
||||||
@ -2162,14 +2162,14 @@ html {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.user-avatar-large {
|
.user-avatar-large {
|
||||||
width: 4rem;
|
width: 3.5rem;
|
||||||
height: 4rem;
|
height: 3.5rem;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: linear-gradient(135deg, var(--color-accent) 0%, rgba(51, 85, 255, 0.8) 100%);
|
background: linear-gradient(135deg, var(--color-accent) 0%, rgba(51, 85, 255, 0.8) 100%);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 1.8rem;
|
font-size: 1.5rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: white;
|
color: white;
|
||||||
box-shadow: 0 4px 12px rgba(51, 85, 255, 0.2);
|
box-shadow: 0 4px 12px rgba(51, 85, 255, 0.2);
|
||||||
@ -2180,7 +2180,7 @@ html {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.user-display-name {
|
.user-display-name {
|
||||||
font-size: 1.5rem;
|
font-size: 1.1rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--color-text-primary);
|
color: var(--color-text-primary);
|
||||||
@ -2311,7 +2311,7 @@ html {
|
|||||||
/* 响应式设计 */
|
/* 响应式设计 */
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.user-info-modal-container {
|
.user-info-modal-container {
|
||||||
width: 95%;
|
width: 85%;
|
||||||
max-width: none;
|
max-width: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2327,7 +2327,7 @@ html {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.user-display-name {
|
.user-display-name {
|
||||||
font-size: 1.3rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.settings-section {
|
.settings-section {
|
||||||
|
|||||||
@ -9,9 +9,9 @@ const applyThemeToDOM = (theme: ThemeMode) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const useThemeStore = defineStore('theme', () => {
|
export const useThemeStore = defineStore('theme', () => {
|
||||||
// 获取存储的主题或默认为深色
|
// 获取存储的主题或默认为浅色
|
||||||
const storedTheme = localStorage.getItem('theme') as ThemeMode | null
|
const storedTheme = localStorage.getItem('theme') as ThemeMode | null
|
||||||
const currentTheme = ref<ThemeMode>(storedTheme || 'dark')
|
const currentTheme = ref<ThemeMode>(storedTheme || 'light')
|
||||||
|
|
||||||
// 立即应用当前主题到DOM
|
// 立即应用当前主题到DOM
|
||||||
applyThemeToDOM(currentTheme.value)
|
applyThemeToDOM(currentTheme.value)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user