From 05444c84ec909b9da23f1da1250a95719d4ac7e5 Mon Sep 17 00:00:00 2001 From: "smx.pusha" <139338836+smxpusha@users.noreply.github.com> Date: Mon, 17 Aug 2026 09:46:33 +0200 Subject: [PATCH] ENH - refine CrewLink layouts and authentication --- .../src/components/account/AppProfileAuth.vue | 320 +++++++++++++++++- frontend/src/stores/crewlink.test.ts | 23 ++ frontend/src/stores/crewlink.ts | 19 +- frontend/src/stores/phone.ts | 6 +- frontend/src/types/crewlink.ts | 1 + frontend/src/views/apps/CrewLinkApp.vue | 223 ++++++------ frontend/testserver/index.cjs | 78 +++-- frontend/testserver/smoke.cjs | 8 +- sky_phone/config/config.lua | 3 + sky_phone/config/locales/en.lua | 6 +- sky_phone/source/client/main.lua | 4 +- sky_phone/source/server/crewlink.lua | 173 ++++++++-- sky_phone/source/server/db_migrate.lua | 33 ++ sky_phone/source/server/testdata.lua | 13 + sky_phone/sql/install.sql | 21 ++ 15 files changed, 743 insertions(+), 188 deletions(-) diff --git a/frontend/src/components/account/AppProfileAuth.vue b/frontend/src/components/account/AppProfileAuth.vue index 3cac30a..fe7e387 100644 --- a/frontend/src/components/account/AppProfileAuth.vue +++ b/frontend/src/components/account/AppProfileAuth.vue @@ -32,17 +32,27 @@ const props = withDefaults( maxUsernameLength?: number minUsernameLength?: number mode: 'login' | 'register' + password?: string + passwordLabel?: string + passwordPlaceholder?: string pending: boolean registerLabel: string + requirePassword?: boolean title: string username: string usernameLabel: string usernamePlaceholder?: string + variant?: 'default' | 'centered' }>(), { maxUsernameLength: 40, minUsernameLength: 2, + password: '', + passwordLabel: 'Password', + passwordPlaceholder: '', + requirePassword: false, usernamePlaceholder: '', + variant: 'default', }, ) const emit = defineEmits<{ @@ -50,21 +60,30 @@ const emit = defineEmits<{ gallery: [] submit: [] 'update:mode': [value: 'login' | 'register'] + 'update:password': [value: string] 'update:username': [value: string] }>() const canSubmit = computed(() => { const length = props.username.trim().length + const validUsername = + length >= props.minUsernameLength && length <= props.maxUsernameLength return Boolean( props.email && - length >= props.minUsernameLength && - length <= props.maxUsernameLength, + (props.mode === 'login' && props.requirePassword + ? true + : validUsername) && + (!props.requirePassword || + (props.password.length >= 8 && props.password.length <= 72)), ) }) - - -