From b3bba40ed80a2659f67a5e44b206e40857f862f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fork=CE=A8KILLET?= Date: Fri, 11 Jul 2025 17:45:29 +0800 Subject: [PATCH] fix(auth): make `showPassword` a in-session state --- plugins/auth/client/login-form.vue | 5 +++-- plugins/auth/client/utils.ts | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/auth/client/login-form.vue b/plugins/auth/client/login-form.vue index 1957f2d2..4725ca36 100644 --- a/plugins/auth/client/login-form.vue +++ b/plugins/auth/client/login-form.vue @@ -36,10 +36,10 @@ + :type="showPassword ? 'text' : 'password'">

{{ error }}

@@ -62,6 +62,7 @@ import { UserLogin } from '@koishijs/plugin-auth' const error = ref() const user = ref() +const showPassword = ref(false) let timestamp = 0 async function loginWithAccount() { diff --git a/plugins/auth/client/utils.ts b/plugins/auth/client/utils.ts index e7c62763..47a042e5 100644 --- a/plugins/auth/client/utils.ts +++ b/plugins/auth/client/utils.ts @@ -14,7 +14,6 @@ interface SharedConfig extends Partial { authType: 0 | 1 platform?: string userId?: string - showPass?: boolean password?: string }