后端迁移到fastapi (#3)
Reviewed-on: #3
This commit was merged in pull request #3.
This commit is contained in:
@@ -13,7 +13,7 @@ const isMapRoute = computed(() => route.name === 'map')
|
||||
const headerHidden = ref(false)
|
||||
const headerPinnedOpen = ref(false)
|
||||
const accountCardOpen = ref(false)
|
||||
const activeNavClass = 'bg-teal-100 text-teal-800 ring-1 ring-teal-200'
|
||||
const activeNavClass = 'bg-teal-50 text-teal-800 ring-1 ring-teal-100'
|
||||
const inactiveNavClass = 'text-slate-600 hover:bg-teal-50 hover:text-teal-800'
|
||||
|
||||
const displayUsername = computed(() => authStore.profile?.username || authStore.user?.email || 'OpenCloud 用户')
|
||||
@@ -193,6 +193,7 @@ async function handleLogout() {
|
||||
画廊
|
||||
</RouterLink>
|
||||
<RouterLink
|
||||
v-if="authStore.isLoggedIn"
|
||||
to="/encyclopedia"
|
||||
class="px-3 py-2 text-sm font-medium tracking-[0.12em] uppercase transition-colors"
|
||||
:class="route.name === 'encyclopedia' || route.name === 'cloud-type' ? activeNavClass : inactiveNavClass"
|
||||
@@ -254,10 +255,10 @@ async function handleLogout() {
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-3 flex items-center gap-2 text-xs text-slate-500">
|
||||
<span class="border border-teal-100 bg-teal-50 px-2 py-1 text-teal-700">
|
||||
<!-- <span class="border border-teal-100 bg-teal-50 px-2 py-1 text-teal-700">
|
||||
{{ authStore.isAdmin ? '管理员' : '观测者' }}
|
||||
</span>
|
||||
<span>OpenCloud 账号</span>
|
||||
<span>OpenCloud 账号</span> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -312,7 +313,7 @@ async function handleLogout() {
|
||||
>
|
||||
<span
|
||||
class="inline-flex h-8 items-center border border-slate-200 bg-white/80 px-3 text-sm font-medium text-slate-700 shadow-[3px_3px_0_0_rgba(15,23,42,0.06)] transition-[background-color,color,transform,box-shadow,border-color] hover:-translate-x-px hover:-translate-y-px hover:border-teal-200 hover:bg-teal-50 hover:text-teal-800 hover:shadow-[4px_4px_0_0_rgba(15,23,42,0.08)] md:h-10 md:px-4"
|
||||
:class="route.name === 'login' ? 'bg-teal-50 ring-1 ring-teal-200 text-teal-800' : ''"
|
||||
:class="route.name === 'login' ? 'bg-teal-50 ring-0 ring-teal-100 text-teal-800' : ''"
|
||||
>
|
||||
登录
|
||||
</span>
|
||||
@@ -323,7 +324,7 @@ async function handleLogout() {
|
||||
>
|
||||
<span
|
||||
class="inline-flex h-8 items-center border border-sky-200 bg-sky-100 px-3 text-sm font-medium text-sky-800 shadow-[4px_4px_0_0_rgba(14,165,233,0.14)] transition-[background-color,color,transform,box-shadow] hover:-translate-x-px hover:-translate-y-px hover:bg-sky-50 hover:text-sky-900 hover:shadow-[5px_5px_0_0_rgba(14,165,233,0.18)] md:h-10 md:px-4"
|
||||
:class="route.name === 'register' ? 'ring-1 ring-sky-300' : ''"
|
||||
:class="route.name === 'register' ? 'ring-0 ring-sky-300' : ''"
|
||||
>
|
||||
注册
|
||||
</span>
|
||||
@@ -356,6 +357,7 @@ async function handleLogout() {
|
||||
画廊
|
||||
</RouterLink>
|
||||
<RouterLink
|
||||
v-if="authStore.isLoggedIn"
|
||||
to="/encyclopedia"
|
||||
class="shrink-0 px-3 py-2 text-sm font-medium tracking-[0.12em] uppercase transition-colors"
|
||||
:class="route.name === 'encyclopedia' || route.name === 'cloud-type' ? activeNavClass : inactiveNavClass"
|
||||
|
||||
Reference in New Issue
Block a user