From 7401e55c6654089b4a4bde83d78fb6d242b27109 Mon Sep 17 00:00:00 2001 From: MoonTestUse1 Date: Mon, 23 Dec 2024 22:22:47 +0600 Subject: [PATCH] 000 --- src/components/ui/FormField.vue | 4 ++++ src/views/LoginView.vue | 16 +++++++++++----- src/views/admin/AdminLoginView.vue | 15 ++++++++++----- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/components/ui/FormField.vue b/src/components/ui/FormField.vue index c1674d8..c1a3ba8 100644 --- a/src/components/ui/FormField.vue +++ b/src/components/ui/FormField.vue @@ -46,7 +46,11 @@ defineProps<{ label: string; type?: string; required?: boolean; + disabled?: boolean; + placeholder?: string; + help?: string; icon?: Component; + size?: number | string; // Добавляем поддержку как числа, так и строки options?: Array<{ value: string; label: string }>; }>(); diff --git a/src/views/LoginView.vue b/src/views/LoginView.vue index 2bd79d4..dd76400 100644 --- a/src/views/LoginView.vue +++ b/src/views/LoginView.vue @@ -9,7 +9,7 @@
- +
- +
+ {{ isLoading ? 'Вход...' : 'Войти' }} @@ -63,7 +68,7 @@ import { ref } from 'vue'; import { useRouter } from 'vue-router'; import { useAuthStore } from '@/stores/auth'; -import { UserIcon, LockIcon } from 'lucide-vue-next'; +import { UserIcon, LockIcon, LogInIcon, LoaderIcon } from 'lucide-vue-next'; const router = useRouter(); const authStore = useAuthStore(); @@ -84,9 +89,10 @@ async function handleSubmit() { alert('Неверная фамилия или пароль'); } } catch (error) { + console.error('Error:', error); alert('Ошибка авторизации'); } finally { isLoading.value = false; } } - \ No newline at end of file + diff --git a/src/views/admin/AdminLoginView.vue b/src/views/admin/AdminLoginView.vue index e4c7a36..e7995c4 100644 --- a/src/views/admin/AdminLoginView.vue +++ b/src/views/admin/AdminLoginView.vue @@ -9,7 +9,7 @@
- +
- +
+ {{ isLoading ? 'Вход...' : 'Войти' }} @@ -63,7 +68,7 @@ import { ref } from 'vue'; import { useRouter } from 'vue-router'; import { useAuthStore } from '@/stores/auth'; -import { UserIcon, LockIcon } from 'lucide-vue-next'; +import { UserIcon, LockIcon, LogInIcon, LoaderIcon } from 'lucide-vue-next'; const router = useRouter(); const authStore = useAuthStore(); @@ -89,4 +94,4 @@ async function handleSubmit() { isLoading.value = false; } } - \ No newline at end of file +