Sign in verified accounts automatically and require eight-character passwords

This commit is contained in:
2026-10-13 16:33:52 +09:00
parent 9e0f493228
commit d6e60ecb3b
18 changed files with 538 additions and 63 deletions

View File

@@ -1,16 +1,17 @@
import { readDeviceInfo } from './deviceInfo';
import { PASSWORD_MIN_LENGTH } from '@hop/shared';
import { createRefreshQueue } from './refreshQueue';
import { ref } from 'vue';
import { io } from 'socket.io-client';
export const account = ref(null),
registrationOpen = ref(false),
passwordMinLength = ref(12);
export async function refreshAccount() {
passwordMinLength = ref(PASSWORD_MIN_LENGTH);
export const refreshAccount = createRefreshQueue(async () => {
const result = await api('/auth/me');
account.value = result.account;
registrationOpen.value = result.registrationOpen;
passwordMinLength.value = result.passwordMinLength ?? 12;
}
passwordMinLength.value = result.passwordMinLength ?? PASSWORD_MIN_LENGTH;
});
export function reconnect() {
connect();
}