Let's edit src/types.ts to add 'loginForm' | 'signupForm' | 'authModal' to ComponentType:
Now let's update src/utils/builder.ts to include loginForm, signupForm, and authModal in createComponent, componentLabels, and generateComponentHTML.
Let's read src/utils/builder.ts around createComponent and componentLabels and generateComponentHTML:
Let's read componentLabels at line 630+ in src/utils/builder.ts:
Let's check generateComponentHTML in src/utils/builder.ts from line 520 to 560:
Let's add the definitions for loginForm, signupForm, and authModal to createComponent in src/utils/builder.ts.
Let's check what defaults in createComponent should have:
-
loginForm:
- Name: 'نموذج تسجيل الدخول'
- Props:
title: 'تسجيل الدخول'
subtitle: 'مرحباً بك مجدداً! يرجى إدخال بيانات حسابك'
emailLabel: 'البريد الإلكتروني'
emailPlaceholder: [EMAIL_ADDRESS_1]'
passwordLabel: 'كلمة المرور'
passwordPlaceholder: '••••••••'
showRememberMe: true
rememberMeText: 'تذكر بياناتي'
showForgotPassword: true
forgotPasswordText: 'نسيت كلمة المرور؟'
submitButtonText: 'تسجيل الدخول'
showSocialLogin: true
googleText: 'تسجيل عبر Google'
appleText: 'تسجيل عبر Apple'
targetPageSlug: ''
successMessage: 'تم تسجيل الدخول بنجاح!'
- Style:
backgroundColor: '#ffffff'
color: '#1e293b'
padding: '32px'
borderRadius: '16px'
boxShadow: '0 10px 25px -5px rgba(0, 0, 0, 0.1)'
maxWidth: '420px'
margin: '0 auto'
-
signupForm:
- Name: 'نموذج إنشاء حساب'
- Props:
title: 'إنشاء حساب جديد'
subtitle: 'انضم إلينا الآن واستمتع بكافة الخدمات والمميزات'
nameLabel: 'الاسم الكامل'
namePlaceholder: 'أحمد علي'
emailLabel: 'البريد الإلكتروني'
emailPlaceholder: [EMAIL_ADDRESS_1]'
passwordLabel: 'كلمة المرور'
passwordPlaceholder: '••••••••'
showPhone: false
phoneLabel: 'رقم الجوال'
phonePlaceholder: '05XXXXXXXX'
showTerms: true
termsText: 'أوافق على شروط الخدمة وسياسة الخصوصية'
submitButtonText: 'إنشاء حساب جديد'
showSocialLogin: true
googleText: 'إنشاء حساب عبر Google'
appleText: 'إنشاء حساب عبر Apple'
targetPageSlug: ''
successMessage: 'تم إنشاء الحساب بنجاح!'
- Style:
backgroundColor: '#ffffff'
color: '#1e293b'
padding: '32px'
borderRadius: '16px'
boxShadow: '0 10px 25px -5px rgba(0, 0, 0, 0.1)'
maxWidth: '450px'
margin: '0 auto'
-
authModal:
- Name: 'نافذة دخول منبثقة (Auth Modal)'
- Props:
buttonText: 'تسجيل الدخول / إنشاء حساب'
defaultTab: 'login'
- Style:
backgroundColor: '#3b82f6'
color: '#ffffff'
padding: '12px 24px'
borderRadius: '8px'
fontWeight: 'bold'
Let's edit src/utils/builder.ts to add these in createComponent, generateComponentHTML, and componentLabels:
Now let's update componentLabels in src/utils/builder.ts and generateComponentHTML.
Let's edit componentLabels:
Now let's update generateComponentHTML in src/utils/builder.ts to convert loginForm, signupForm, and authModal into clean HTML with CSS inline styles and javascript interactivity when exported.
Let's read generateComponentHTML around line 620 in src/utils/builder.ts:
Let's add cases for loginForm, signupForm, and authModal in generateComponentHTML:
Now let's check src/App.tsx and add UI components and customization controls for loginForm, signupForm, and authModal!
Let's check where component categories are defined in src/App.tsx:
Currently:
const componentCategories = [
{ name: 'البنية الأساسية', icon: '🏗', types: ['container', 'columns', 'divider', 'spacer'] as ComponentType[] },
{ name: 'النصوص', icon: '📝', types: ['heading', 'paragraph', 'list', 'listItem'] as ComponentType[] },
{ name: 'التفاعلية', icon: '⚡', types: ['button', 'form', 'input', 'textarea'] as ComponentType[] },
{ name: 'الوسائط', icon: '🎨', types: ['image', 'video', 'gallery', 'icon'] as ComponentType[] },
{ name: 'الأقسام الجاهزة', icon: '📐', types: ['navbar', 'hero', 'card', 'footer', 'badge'] as ComponentType[] },
];
Let's add a dedicated category:
{ name: 'تسجيل الدخول والأمان', icon: '🔐', types: ['loginForm', 'signupForm', 'authModal'] as ComponentType[] }
Let's also update ComponentRenderer in src/App.tsx to visually render loginForm, signupForm, and authModal interactively in the builder canvas!
Let's check how ComponentRenderer renders components in src/App.tsx. Let's read ComponentRenderer in src/App.tsx around line 740 to 860:
Let's read ComponentRenderer lines 810 to 880 in src/App.tsx:
Let's add rendering for loginForm, signupForm, and authModal inside ComponentRenderer:
For loginForm:
Renders title, subtitle, email label/input, password label/input, remember me / forgot password toggles, submit button, social login buttons. When user clicks submit in canvas, if targetPageSlug is configured, it navigates to that page!
For signupForm:
Renders title, subtitle, name, email, optional phone, password, terms checkbox, submit button, social login buttons. When user clicks submit in canvas, if targetPageSlug is configured, it navigates to that page!
For authModal:
Renders a button that when clicked in builder opens an interactive modal previewing the login/signup tabs!
Now let's check PropertiesPanel in src/App.tsx where users customize loginForm, signupForm, and authModal.
In PropertiesPanel:
When component.type === 'loginForm':
- Customization fields:
- العنوان الرئيسي (Title)
- العنوان الفرعي (Subtitle)
- تسمية حقل البريد الإلكتروني (Email Label)
- تسمية حقل كلمة المرور (Password Label)
- خيارات إضافية:
- checkbox: إظهار خيار "تذكرني" (Show Remember Me)
- checkbox: إظهار رابط "نسيت كلمة المرور" (Show Forgot Password)
- checkbox: إظهار أزرار التسجيل عبر التواصل الاجتماعي (Google, Apple)
- نص زر التقديم (Submit Button Text)
- الانتقال لصفحة بعد النجاح (Redirect Page on Success): Select box of all website pages!
- رسالة النجاح (Success Message)
When component.type === 'signupForm':
- Customization fields:
- العنوان الرئيسي (Title)
- العنوان الفرعي (Subtitle)
- تسمية حقل الاسم الكامل (Name Label)
- تسمية حقل البريد الإلكتروني (Email Label)
- تسمية حقل كلمة المرور (Password Label)
- خيارات إضافية:
- checkbox: إظهار حقل رقم الجوال (Show Phone)
- checkbox: إظهار خيار "الموافقة على الشروط" (Show Terms Checkbox)
- checkbox: إظهار أزرار التسجيل عبر التواصل الاجتماعي (Google, Apple)
- نص زر إنشاء الحساب (Submit Button Text)
- الانتقال لصفحة بعد النجاح (Redirect Page on Success): Select box of all website pages!
- رسالة النجاح (Success Message)
When component.type === 'authModal':
Let's read PropertiesPanel in src/App.tsx to see where to place these controls. Let's inspect lines 300 to 450 in src/App.tsx:
Let's edit src/App.tsx to add:
- Icons for key, lock, user, shield in
Icon.
- Customization panels for
loginForm, signupForm, and authModal inside PropertiesPanel.
- Interactive rendering for
loginForm, signupForm, and authModal inside ComponentRenderer.
- Adding the new Category
"تسجيل الدخول والأمان" (loginForm, signupForm, authModal) in componentCategories.
- Modal state for testing
authModal in canvas if clicked!
Let's check Icon definitions at the beginning of src/App.tsx:
Let's read lines 10 to 45 of src/App.tsx:
Let's add key, lock, user, shield icons to Icon:
Now let's check componentCategories in src/App.tsx and add the "تسجيل الدخول والأمان" category:
Let's read around line 1380 to 1420 of src/App.tsx:
Let's edit componentCategories in src/App.tsx:
Now let's update PropertiesPanel in src/App.tsx so users can customize every detail of loginForm, signupForm, and authModal:
- Form Title
- Form Subtitle
- Field Labels & Placeholders (Email, Password, Name, Phone)
- Toggles (Remember Me, Forgot Password, Phone Number, Terms & Conditions, Social Login buttons)
- Submit Button Label
- Target Page Slug / Redirect Page after successful submission!
- Custom Success Alert Message
Let's read PropertiesPanel in src/App.tsx to see where component.type === 'loginForm', component.type === 'signupForm', and component.type === 'authModal' panels should go. Let's read lines 370 to 450 in src/App.tsx:
Let's add the customization controls in PropertiesPanel for loginForm, signupForm, and authModal:
Now let's update ComponentRenderer in src/App.tsx to handle loginForm, signupForm, and authModal visually in the canvas with interactive buttons and form preview!
Let's read ComponentRenderer in src/App.tsx around line 850 to 890:
Let's read ComponentRenderer around lines 980 to 1020 in src/App.tsx:
Let's edit ComponentRenderer in src/App.tsx to render loginForm, signupForm, and authModal:
Now let's check src/components/TutorialModal.tsx and add a step or info about the login/signup authentication components and customization!
Let's read src/components/TutorialModal.tsx:
Let's edit src/components/TutorialModal.tsx to add details about authentication forms (login & signup customization):
Let's update totalSteps in src/components/TutorialModal.tsx to 7:
Let's run build_project now to verify if there are any build or TypeScript issues.
The project builds cleanly with 0 errors!
Let's review what was added for login & signup forms and customization:
-
New Authentication & Security Category (تسجيل الدخول والأمان):
- 🔑 نموذج تسجيل الدخول (
loginForm): نموذج جاهز كلياً لتسجيل الدخول.
- 👤 نموذج إنشاء حساب (
signupForm): نموذج لإنشاء حساب جديد مع ألوان وخيارات متقدمة.
- 🔐 زر نافذة دخول منبثقة (
authModal): زر لإطلاق خيار التسجيل.
-
Full Customization Options in Properties Panel (PropertiesPanel):
- العناوين والنصوص: تخصيص العنوان الرئيسي، العنوان الفرعي، ونص زر التسجيل.
- تسميات الحقول والخيارات: تسميات حقول الاسم، البريد، كلمة المرور، ورقم الجوال.
- مفاتيح التفعيل والتعطيل (Toggles):
- إظهار/إخفاء خيار "تذكرني".
- إظهار/إخفاء رابط "نسيت كلمة المرور؟".
- إظهار/إخفاء أزرار التسجيل عبر Google و Apple.
- إظهار/إخفاء حقل رقم الجوال.
- إظهار/إخفاء مربع الموافقة على الشروط والأحكام.
- التوجيه والربط مع صفحات الموقع: تحديد الصفحة التي ينتقل إليها المستخدم تلقائياً بمجرد إدخال البيانات والضغط على التسجيل (مثلاً الانتقال لصفحة "الرئيسية" أو "لوحة التحكم").
- رسائل النجاح والتنبيهات المخصصة.
-
Interactive Builder Canvas & Export:
- في واجهة الباني، تعمل حقول النماذج تفاعلياً وتسمح باختبار الانتقال المباشر بين الصفحات.
- عند تصدير كود الـ HTML، يتم تصدير نماذج تسجيل الدخول بأسلوب عالي الجودة متوافق مع كافة الأجهزة مع كود جافاسكربت للتفاعل والانتقال التلقائي بين الصفحات.
-
تحديث الجولة التعليمية: إضافة شرح وافٍ لكيفية إضافة وتخصيص نماذج تسجيل الدخول في الجولة التعليمية.
I am ready to summarize these changes to the user in Arabic.تم تطوير التطبيق وتحديثه بنجاح وإضافة قسم كامل ومخصص لـ تسجيل الدخول وإنشاء الحسابات بالأمان والتحكم الكامل! 🎉
🔑 أهم المزايا والإضافات الجديدة:
-
فئة جديدة في القائمة الجانبية: تسجيل الدخول والأمان 🔐:
- 🔑 نموذج تسجيل الدخول (
LoginForm): نموذج جاهز واحترافي لتسجيل دخول المستخدمين.
- 👤 نموذج إنشاء حساب جديد (
SignupForm): نموذج متكامل لإنشاء حساب جديد مع حقول الشروط ورقم الجوال.
- 🔐 زر دخول منبثق (
AuthModal): زر يفتح خيارات الدخول السريع.
-
⚙️ تخصيص كامل للنماذج من لوحة الخصائص (Properties Panel):
- تخصيص العناوين والنصوص: تغيير العنوان الرئيسي (Title) والعنوان الفرعي (Subtitle) للنموذج.
- تسميات الحقول: تخصيص تسميات حقول (البريد الإلكتروني، كلمة المرور، الاسم الكامل، رقم الجوال).
- مفاتيح التحكم والتفعيل/الإخفاء (Toggles):
- 🔘 إظهار أو إخفاء خيار "تذكر بياناتي".
- 🔘 إظهار أو إخفاء رابط "نسيت كلمة المرور؟".
- 🔘 إظهار أو إخفاء أزرار الدخول السريع عبر Google و Apple.
- 🔘 إظهار أو إخفاء حقل رقم الجوال.
- 🔘 إظهار أو إخفاء مربع الموافقة على الشروط والأحكام.
- نص زر الإرسال: تخصيص النص الظاهر على زر التسجيل ولونه.
-
🔄 التوجيه التلقائي والانتقال بين الصفحات عند التسجيل:
- يمكنك تحديد الصفحة التي ينتقل إليها الزائر تلقائياً بمجرد إدخال بياناته والضغط على تسجيل الدخول أو إنشاء حساب (مثل الانتقال إلى صفحة الرئيسية أو لوحة المستخدم).
- تحديد رسالة نجاح مخصصة عند اكتمال عملية الدخول.
-
💻 المعاينة والتصدير الكامل بـ HTML:
- تعمل جميع نماذج تسجيل الدخول تفاعلياً داخل باني المواقع وفي المعاينة المباشرة والتصدير.
- كود HTML المصدر يحتوي على استجابة كاملة وألوان جذابة وتفاعل فوري.
Files built: src/types.ts, src/utils/builder.ts, src/App.tsx, src/components/TutorialModal.tsx