fix: 移除所有权限身份显示,QR上传布局还原为initial commit样式
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 13s
Test / e2e-test (push) Failing after 1m19s

This commit is contained in:
2026-04-08 19:47:20 +00:00
committed by Hera Zhao
parent c8de1ad229
commit dcf516f2de
3 changed files with 22 additions and 75 deletions

View File

@@ -16,7 +16,6 @@
>
<template v-if="auth.isLoggedIn">
👤 {{ auth.user.display_name || auth.user.username }}
<span style="font-size:10px;background:rgba(255,255,255,0.2);padding:2px 7px;border-radius:8px;margin:0 3px;vertical-align:middle;font-weight:400;letter-spacing:0">{{ roleLabel }}</span>
</template>
<template v-else>
@@ -70,7 +69,7 @@
</template>
<script setup>
import { ref, computed, onMounted, watch } from 'vue'
import { ref, onMounted, watch } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { useAuthStore } from './stores/auth'
import { useOilsStore } from './stores/oils'
@@ -88,11 +87,6 @@ const router = useRouter()
const route = useRoute()
const showUserMenu = ref(false)
const roleLabel = computed(() => {
const map = { admin: '管理员', senior_editor: '高级编辑', editor: '编辑', viewer: '查看者' }
return map[auth.user.role] || '查看者'
})
// Sync ui.currentSection from route on load and navigation
const routeToSection = { '/': 'search', '/manage': 'manage', '/inventory': 'inventory', '/oils': 'oils', '/projects': 'projects', '/mydiary': 'mydiary', '/audit': 'audit', '/bugs': 'bugs', '/users': 'users' }
watch(() => route.path, (path) => {