feat(web): 记住密码/自动登录与版本更新放开到网页形态

- 登录页与首页移除 isDesktopRuntime 门控,网页浏览器同样显示记住密码/自动登录与更新版本入口
- 记住密码由 base64 明文改为 XOR+位移可逆加密存储(v1. 前缀),兼容解密历史值
- 网页形态进入登录页即回填凭据并尝试自动登录(登出/切号导航仍豁免)
- 版本更新在无桌面桥时降级为 OSS 直链下载安装包,桌面端维持自动安装
This commit is contained in:
2026-09-09 00:13:13 +08:00
parent 45fdd8a294
commit ffd8c718dd
3 changed files with 60 additions and 46 deletions
@@ -4,14 +4,12 @@
<span class="header-title">数富AI</span>
<div class="header-right">
<button
v-if="isDesktopRuntime"
type="button"
class="header-update-btn"
title="检测更新"
@click="toggleUpdatePanel"
></button>
<button
v-if="isDesktopRuntime"
type="button"
class="header-update-text"
@click="toggleUpdatePanel"
@@ -67,10 +65,9 @@
</template>
<script setup lang="ts">
import { computed, onMounted, ref, watch } from 'vue'
import { computed, onMounted, ref } from 'vue'
import { restoreLoginUser } from '@/shared/auth/ensure-auth'
import { getCurrentUserAppColumnRaw, type PermissionMenuItem } from '@/shared/api/permission'
import { isDesktopRuntime } from '@/shared/bridges/pywebview'
import { useVersionUpdate } from '@/shared/composables/useVersionUpdate'
import { resolvePageHref } from '@/shared/page-prefix'
@@ -176,16 +173,8 @@ function toggleUpdatePanel() {
onMounted(() => {
void loadCurrentUser()
void loadPermissions()
// 版本检测/更新仅桌面客户端:桌面桥注入后立即检测一次(逻辑见 useVersionUpdate
watch(
isDesktopRuntime,
(runtime) => {
if (runtime) {
void runCheck()
}
},
{ immediate: true },
)
// 版本检测/更新:桌面与网页形态统一挂载后检测一次(逻辑见 useVersionUpdate
void runCheck()
})
</script>