fix: 个人库存页未登录时显示登录引导
All checks were successful
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 13s
Test / e2e-test (push) Successful in 51s
All checks were successful
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 13s
Test / e2e-test (push) Successful in 51s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
<template>
|
||||
<div class="inventory-page">
|
||||
<!-- Login prompt -->
|
||||
<div v-if="!auth.isLoggedIn" class="login-prompt">
|
||||
<p>登录后可管理个人库存、获取购油方案</p>
|
||||
<button class="btn-primary" @click="ui.openLogin()">登录 / 注册</button>
|
||||
</div>
|
||||
<template v-else>
|
||||
<!-- My Oil Plan -->
|
||||
<template v-if="auth.isLoggedIn">
|
||||
<!-- Active plan: show shopping list -->
|
||||
@@ -160,6 +166,7 @@
|
||||
<div v-else class="empty-hint">
|
||||
{{ ownedOils.length ? '暂无完全匹配的配方' : '添加精油后自动推荐配方' }}
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -664,6 +671,8 @@ onMounted(async () => {
|
||||
.overlay-header h3 { margin: 0; font-size: 16px; }
|
||||
.form-label { display: block; font-size: 13px; color: #6b6375; margin-bottom: 4px; font-weight: 500; }
|
||||
.form-textarea { width: 100%; border: 1.5px solid #e5e4e7; border-radius: 8px; padding: 8px; font-size: 13px; font-family: inherit; resize: vertical; box-sizing: border-box; }
|
||||
.login-prompt { text-align: center; padding: 60px 20px; color: #6b6375; }
|
||||
.login-prompt p { margin-bottom: 16px; font-size: 15px; }
|
||||
.plan-pending-hint { font-size: 11px; color: #b0aab5; margin-top: 4px; }
|
||||
.teacher-matched { color: #2e7d5a; font-size: 13px; margin-top: 4px; font-weight: 500; }
|
||||
.teacher-no-match { color: #c62828; font-size: 12px; margin-top: 4px; }
|
||||
|
||||
Reference in New Issue
Block a user