feat: add current-device logout
ci / gitleaks (push) Successful in 7s
ci / docker (push) Successful in 3m40s

This commit is contained in:
2026-09-20 08:20:12 +08:00
parent 7f11d0ba78
commit 8ecc3e265f
5 changed files with 58 additions and 5 deletions
+10 -1
View File
@@ -455,6 +455,15 @@ async function bootstrap() {
authReady.value = true
}
}
function completeLogout() {
authenticated.value = false
password.value = ''
error.value = ''
mobileSidebar.value = false
mobileDetail.value = false
selectedTask.value = null
}
async function submitAuth() {
error.value = ''
try {
@@ -1588,7 +1597,7 @@ onUnmounted(() => {
<div v-if="!['today','tasks','upcoming','habits','settings'].includes(activeView)" class="topbar-title"><h1 :title="activeName">{{ activeName }}</h1></div>
</header>
<template v-if="['habits','settings'].includes(activeView)">
<MvpPanel ref="habitComposer" :key="activeView" :view="activeView as 'habits'|'settings'" :show-completed="showCompleted" @update:show-completed="showCompleted=$event" @changed="refreshAll" @notice="toast" />
<MvpPanel ref="habitComposer" :key="activeView" :view="activeView as 'habits'|'settings'" :show-completed="showCompleted" @update:show-completed="showCompleted=$event" @changed="refreshAll" @notice="toast" @logout="completeLogout" />
</template>
<MemoPanel v-else-if="activeView==='memos'" ref="memoPanel" :request="api" @scope="memoTrash=$event==='trash'" @detail="memoDetailOpen=$event" @notice="toast" />
<CountdownPanel ref="countdownComposer" v-else-if="activeView==='countdowns'" @notice="toast" />