style: index page
This commit is contained in:
@@ -21,18 +21,6 @@
|
||||
>
|
||||
<v-icon :color="isLargeText ? 'accent' : 'white'" icon="mdi-format-size" />
|
||||
</v-btn>
|
||||
|
||||
<v-avatar
|
||||
v-if="store.isLoggedIn"
|
||||
class="elevation-1 border-white"
|
||||
color="accent"
|
||||
size="36"
|
||||
@click="drawer = !drawer"
|
||||
>
|
||||
<span class="text-white font-weight-bold text-caption">{{
|
||||
store.userProfile.name.substring(1)
|
||||
}}</span>
|
||||
</v-avatar>
|
||||
</div>
|
||||
</template>
|
||||
</v-app-bar>
|
||||
@@ -189,7 +177,7 @@
|
||||
>
|
||||
<v-btn to="/" value="home">
|
||||
<v-icon :color="getBottomNavIconColor('home')">mdi-view-dashboard</v-icon>
|
||||
<span class="bottom-nav-text">主控台</span>
|
||||
<span class="bottom-nav-text">首頁</span>
|
||||
</v-btn>
|
||||
|
||||
<v-btn to="/self-assessment" value="self-assessment">
|
||||
@@ -197,17 +185,17 @@
|
||||
mdi-clipboard-text-search
|
||||
</v-icon>
|
||||
|
||||
<span class="bottom-nav-text">線上自評</span>
|
||||
<span class="bottom-nav-text">自評</span>
|
||||
</v-btn>
|
||||
|
||||
<v-btn v-if="store.isLoggedIn" to="/appointment" value="appointment">
|
||||
<v-icon :color="getBottomNavIconColor('appointment')">mdi-calendar-check</v-icon>
|
||||
<span class="bottom-nav-text">活動預約</span>
|
||||
<span class="bottom-nav-text">預約</span>
|
||||
</v-btn>
|
||||
|
||||
<v-btn v-if="store.isLoggedIn" to="/checkin" value="checkin">
|
||||
<v-icon :color="getBottomNavIconColor('checkin')">mdi-qrcode-scan</v-icon>
|
||||
<span class="bottom-nav-text">現場量測</span>
|
||||
<span class="bottom-nav-text">量測</span>
|
||||
</v-btn>
|
||||
</v-bottom-navigation>
|
||||
|
||||
@@ -307,27 +295,27 @@ const showEmergency = ref(false)
|
||||
// 無障礙狀態 (可持久化儲存於 localStorage)
|
||||
const isLargeText = ref(localStorage.getItem('mode-large-text') === 'true')
|
||||
|
||||
watch(isLargeText, newVal => {
|
||||
watch(isLargeText, (newVal) => {
|
||||
localStorage.setItem('mode-large-text', String(newVal))
|
||||
})
|
||||
|
||||
// 同步底部導航狀態與當前路由
|
||||
watch(
|
||||
() => route.path,
|
||||
path => {
|
||||
(path) => {
|
||||
if (path === '/') activeTab.value = 'home'
|
||||
else if (path.startsWith('/self-assessment')) activeTab.value = 'self-assessment'
|
||||
else if (path.startsWith('/appointment')) activeTab.value = 'appointment'
|
||||
else if (path.startsWith('/checkin')) activeTab.value = 'checkin'
|
||||
},
|
||||
{ immediate: true },
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
function getBottomNavIconColor (value: string) {
|
||||
function getBottomNavIconColor(value: string) {
|
||||
return activeTab.value === value ? 'secondary' : 'secondary-darken-1'
|
||||
}
|
||||
|
||||
function handleLogout () {
|
||||
function handleLogout() {
|
||||
store.logout()
|
||||
router.push('/login')
|
||||
drawer.value = false
|
||||
|
||||
Reference in New Issue
Block a user