feat: 註冊登入流程修改

This commit is contained in:
skytek_xinliang
2026-09-30 15:45:07 +08:00
parent d4f7c2c176
commit d3159f3271
15 changed files with 744 additions and 293 deletions
@@ -157,6 +157,14 @@
<v-divider class="my-2" />
<v-list density="compact" nav>
<v-list-item
v-if="store.requiresEmailCompletion"
color="warning"
prepend-icon="mdi-email-alert-outline"
title="補登 E-Mail"
:to="emailCompletionLocation"
@click="drawer = false"
/>
<v-list-item
color="primary"
prepend-icon="mdi-shield-check"
@@ -200,6 +208,35 @@
:class="{ 'pb-16': BOTTOM_NAVIGATION_ENABLED }"
>
<v-container class="px-4 py-2">
<v-alert
v-if="
store.isLoggedIn &&
store.requiresEmailCompletion &&
route.name !== 'complete-email'
"
class="mb-4"
color="warning"
icon="mdi-email-alert-outline"
variant="tonal"
>
<div class="d-flex flex-wrap align-center justify-space-between ga-2">
<span>
{{
EMAIL_COMPLETION_REQUIRED
? "請先補登 E-Mail,才能繼續使用平台。"
: "尚未設定 E-Mail,前往補登以接收重要通知。"
}}
</span>
<v-btn
color="warning"
size="small"
:to="emailCompletionLocation"
variant="flat"
>
前往補登
</v-btn>
</div>
</v-alert>
<slot name="main" />
</v-container>
</v-main>
@@ -276,10 +313,6 @@
<li>於活動現場合對您的身分。</li>
<li>在去識別化的安全機制下,作為高齡健康促進的政策分析參考。</li>
</ul>
<p class="text-caption text-grey">
授權狀態:{{ store.userProfile.consent ? "已同意授權" : "未授權" }}
</p>
</v-card-text>
<v-card-actions class="justify-end px-4 pb-4">
@@ -298,13 +331,14 @@
</template>
<script setup lang="ts">
import { ref, watch } from "vue";
import { computed, ref, watch } from "vue";
import { useRoute, useRouter } from "vue-router";
import {
APPOINTMENT_ENABLED,
BODY_COMPOSITION_ENABLED,
BOTTOM_NAVIGATION_ENABLED,
CHECKIN_ENABLED,
EMAIL_COMPLETION_REQUIRED,
SELF_ASSESSMENT_ENABLED,
} from "@/config/features";
import { useAppStore } from "@/stores/app";
@@ -318,6 +352,12 @@ const route = useRoute();
const drawer = ref(false);
const activeTab = ref("home");
const showPrivacy = ref(false);
const emailCompletionLocation = computed(() => ({
name: "complete-email",
query: {
redirect: route.name === "complete-email" ? "/" : route.fullPath,
},
}));
// 無障礙狀態 (可持久化儲存於 localStorage)
const isLargeText = ref(localStorage.getItem("mode-large-text") === "true");