fix: 姓名去識別化
This commit is contained in:
@@ -41,16 +41,19 @@
|
|||||||
<v-list-item v-if="store.isLoggedIn" class="py-4 bg-primary text-white">
|
<v-list-item v-if="store.isLoggedIn" class="py-4 bg-primary text-white">
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
<v-avatar color="accent" size="48">
|
<v-avatar color="accent" size="48">
|
||||||
<span class="text-white font-weight-bold text-h6">
|
<svg
|
||||||
{{ (store.userProfile.name || "姓名").substring(0, 1) }}
|
aria-hidden="true"
|
||||||
</span>
|
class="profile-avatar-icon"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M11.518,12.629l.559,.377c1.134-.847,6.754-4.326,7-8.706,0-2.371-1.794-4.3-4-4.3-1.193,0-2.267,.565-3,1.458-.733-.894-1.807-1.458-3-1.458-2.206,0-4,1.929-4,4.3,0,3.876,5.782,7.885,6.441,8.329ZM9.077,2c1.103,0,2,1.032,2,2.3h2c0-1.268,.897-2.3,2-2.3s2,1.032,2,2.3c0,1.948-2.864,4.71-4.998,6.275-1.732-1.286-5.002-4.147-5.002-6.275,0-1.268,.897-2.3,2-2.3Zm14.923,17h-1v3h-2V14h2v3h1v2Zm-6-7h2v12h-2v-5H6v5h-2V12h2v5h12v-5ZM1,14H3v8H1v-3H0v-2H1v-3Z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
</v-avatar>
|
</v-avatar>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<v-list-item-title class="font-weight-bold">
|
|
||||||
{{ displayUserName }}
|
|
||||||
</v-list-item-title>
|
|
||||||
|
|
||||||
<v-list-item-subtitle class="text-white-50">{{
|
<v-list-item-subtitle class="text-white-50">{{
|
||||||
store.userProfile.phone
|
store.userProfile.phone
|
||||||
}}</v-list-item-subtitle>
|
}}</v-list-item-subtitle>
|
||||||
@@ -100,14 +103,14 @@
|
|||||||
to="/"
|
to="/"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<v-list-item
|
<!-- <v-list-item
|
||||||
v-if="store.isLoggedIn"
|
v-if="store.isLoggedIn"
|
||||||
color="primary"
|
color="primary"
|
||||||
prepend-icon="mdi-account-edit"
|
prepend-icon="mdi-account-edit"
|
||||||
title="個人資料修改"
|
title="個人資料修改"
|
||||||
to="/profile"
|
to="/profile"
|
||||||
@click="drawer = false"
|
@click="drawer = false"
|
||||||
/>
|
/> -->
|
||||||
|
|
||||||
<v-list-item
|
<v-list-item
|
||||||
v-if="SELF_ASSESSMENT_ENABLED"
|
v-if="SELF_ASSESSMENT_ENABLED"
|
||||||
@@ -297,7 +300,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { useDisplayUserName } from "@/composables/useDisplayUserName";
|
|
||||||
import {
|
import {
|
||||||
APPOINTMENT_ENABLED,
|
APPOINTMENT_ENABLED,
|
||||||
BODY_COMPOSITION_ENABLED,
|
BODY_COMPOSITION_ENABLED,
|
||||||
@@ -312,7 +314,6 @@ const store = useAppStore();
|
|||||||
const courseStore = useCourseStore();
|
const courseStore = useCourseStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const displayUserName = useDisplayUserName(store.userProfile);
|
|
||||||
|
|
||||||
const drawer = ref(false);
|
const drawer = ref(false);
|
||||||
const activeTab = ref("home");
|
const activeTab = ref("home");
|
||||||
@@ -388,4 +389,11 @@ async function handleLogout() {
|
|||||||
.border-top {
|
.border-top {
|
||||||
border-top: 1px solid rgba(0, 0, 0, 0.08);
|
border-top: 1px solid rgba(0, 0, 0, 0.08);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.profile-avatar-icon {
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
color: white;
|
||||||
|
fill: currentcolor;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<v-row class="mt-4 pa-2" no-gutters>
|
<v-row class="mt-4 pa-2" no-gutters>
|
||||||
<v-col :cols="courseStore.groupMissing ? 8 : 12">
|
<v-col :cols="courseStore.groupMissing ? 8 : 12">
|
||||||
<v-card-title>
|
<v-card-title>
|
||||||
{{ displayUserName }}
|
{{ store.userProfile.phone }}
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-card-subtitle>
|
<v-card-subtitle>
|
||||||
資料更新於 {{ todayTimeString }}
|
資料更新於 {{ todayTimeString }}
|
||||||
@@ -383,7 +383,6 @@ import Layout from "@/components/layout/DefaultLayout.vue";
|
|||||||
import ModuleRouterCard from "@/components/ModuleRouterCard.vue";
|
import ModuleRouterCard from "@/components/ModuleRouterCard.vue";
|
||||||
import PlatformIntroduction from "@/components/PlatformIntroduction.vue";
|
import PlatformIntroduction from "@/components/PlatformIntroduction.vue";
|
||||||
import PhysicalFitnessSummary from "@/components/PhysicalFitnessSummary.vue";
|
import PhysicalFitnessSummary from "@/components/PhysicalFitnessSummary.vue";
|
||||||
import { useDisplayUserName } from "@/composables/useDisplayUserName";
|
|
||||||
import {
|
import {
|
||||||
APPOINTMENT_ENABLED,
|
APPOINTMENT_ENABLED,
|
||||||
BODY_COMPOSITION_ENABLED,
|
BODY_COMPOSITION_ENABLED,
|
||||||
@@ -409,7 +408,6 @@ const physicalFitnessReceivedAt = ref<string | null>(null);
|
|||||||
const physicalFitnessLoading = ref(false);
|
const physicalFitnessLoading = ref(false);
|
||||||
const physicalFitnessError = ref("");
|
const physicalFitnessError = ref("");
|
||||||
|
|
||||||
const displayUserName = useDisplayUserName(store.userProfile);
|
|
||||||
const physicalFitnessRadarData = computed(() =>
|
const physicalFitnessRadarData = computed(() =>
|
||||||
calculatePhysicalFitnessRadar(physicalFitnessItems.value),
|
calculatePhysicalFitnessRadar(physicalFitnessItems.value),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import CheckinDetail from "@/pages/checkinDetail.vue";
|
|||||||
import Course from "@/pages/course.vue";
|
import Course from "@/pages/course.vue";
|
||||||
import Index from "@/pages/index.vue";
|
import Index from "@/pages/index.vue";
|
||||||
import Login from "@/pages/login.vue";
|
import Login from "@/pages/login.vue";
|
||||||
import Profile from "@/pages/profile.vue";
|
|
||||||
import Register from "@/pages/register.vue";
|
import Register from "@/pages/register.vue";
|
||||||
import SelfAssessment from "@/pages/self-assessment.vue";
|
import SelfAssessment from "@/pages/self-assessment.vue";
|
||||||
import {
|
import {
|
||||||
@@ -55,9 +54,7 @@ const router = createRouter({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/profile",
|
path: "/profile",
|
||||||
name: "profile",
|
redirect: { name: "home" },
|
||||||
component: Profile,
|
|
||||||
meta: { requiresAuth: true, title: "個人資料修改|運動玩轉健康力" },
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/body-composition",
|
path: "/body-composition",
|
||||||
|
|||||||
Reference in New Issue
Block a user