- Modified Navbar.vue to enhance form validation logic by allowing access when `import.meta.server` is true, improving handling of form states in specific routes.
- Updated FormCleanings.vue to replace the icon name from "bi:stars" to "i-heroicons-sparkles-16-solid", ensuring consistency with the icon library used across the application.
These changes aim to improve the user experience and maintainability of the components by refining logic and standardizing UI elements.
- Simplified the constructor in StoreFormSubmissionJob for improved readability.
- Enhanced the storeFile method to handle null and empty values more robustly, ensuring better validation of file names.
- Updated StorageFileNameParser to return null for empty file names, improving error handling.
- Refactored OpenForm.vue to optimize form initialization and prevent unnecessary reinitializations, enhancing performance.
- Introduced new methods for managing field groups and preventing recursive updates in OpenForm.vue, improving the overall user experience.
- Enhanced FormEditorSidebar.vue to utilize Pinia store for better state management and clarity.
- Improved FormFieldEdit.vue to prevent page jumps during field editing, ensuring a smoother user experience.
- Added new getters in working_form.js for better page management and navigation within forms.
These changes aim to enhance the maintainability and performance of the form handling logic, providing a more efficient and user-friendly experience.
* Implement quick login/register flow with global event handling
- Add QuickRegister component with improved modal management
- Integrate quick login/register with app store state
- Implement custom event handling for login/registration flow
- Update OAuth callback to support quick login in popup windows
- Refactor authentication-related components to use global events
* Refactor authentication flow with centralized useAuth composable
- Create new useAuth composable to centralize login, registration, and social login logic
- Simplify authentication methods in LoginForm and RegisterForm
- Add event-based login/registration flow with quick login support
- Remove redundant API calls and consolidate authentication processes
- Improve error handling and analytics tracking for authentication events
* Enhance QuickRegister and RegisterForm components with unauthorized error handling
- Add closeable functionality to modals based on unauthorized error state
- Implement logout button in QuickRegister for unauthorized users
- Reset unauthorized error state on component unmount
- Update styling for "OR" text in RegisterForm for consistency
- Set unauthorized error flag in app store upon 401 response in API calls
* Refactor Authentication Flow and Remove Unused Callback Views
- Deleted unused callback views for Notion and OAuth to streamline the codebase.
- Updated QuickRegister and LoginForm components to remove the after-login event emission, replacing it with a window message system for better communication between components.
- Enhanced the RegisterForm and other components to utilize the new window message system for handling login completion, improving reliability and maintainability.
- Added a verifyAuthentication method in the useAuth composable to ensure user data is loaded correctly after social logins, including retry logic for fetching user data.
These changes aim to simplify the authentication process and improve the overall user experience by ensuring a more robust handling of login events.
* Add eslint-disable comment to useWindowMessage composable for linting control
* Refactor QuickRegister.vue for improved template structure and clarity
- Adjusted the rendering of horizontal dividers and the "or" text for better semantic HTML.
- Added a compact-header prop to the modal for enhanced layout control.
These changes aim to enhance the readability and maintainability of the QuickRegister component.
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
* Decouple title from title block
* fix lint
* remove dry run for FormTitleMigration
* Skip form title migration for forms with hidden titles
* Refactor AI Form Generation with Dedicated Prompt Services
- Extract AI form generation logic from GenerateTemplate command into dedicated prompt service classes
- Update GenerateAiForm job to use new prompt generation services
- Improve GptCompleter with more robust error handling and token tracking
- Add error field to AiFormCompletion model for better error logging
- Simplify command signature from 'ai:make-form-template' to 'form:generate'
* Consolidate Template Metadata Generation with Unified Prompt Service
- Create GenerateTemplateMetadataPrompt to centralize template metadata generation
- Update GenerateTemplate command to use new consolidated metadata generation approach
- Enhance GptCompleter to support strict JSON schema validation
- Increase form prompt max length to support more complex form descriptions
- Refactor form generation to simplify metadata extraction and processing
* Implement Form Mode Strategy for Flexible Form Rendering
- Introduce FormModeStrategy to centralize form rendering logic
- Add support for different form modes: LIVE, PREVIEW, TEST, EDIT, PREFILL
- Refactor components to use mode-based rendering strategy
- Remove legacy boolean props like adminPreview and creating
- Enhance form component flexibility and reusability
* Refine Form Mode Strategy Display Behavior
- Update FormModeStrategy to hide hidden fields in PREVIEW mode
- Add FormMode getter in UrlFormPrefill component for mode-specific rendering
- Clarify mode-specific validation and display logic in form strategies
* Enhance Form Template Generation with Advanced Field Options
- Update GenerateTemplate command to use front_url for template URL output
- Expand GenerateFormPrompt with comprehensive field configuration options
- Add support for advanced field types: date with time, toggle switches, radio/checkbox selections
- Introduce field width configuration and HTML formatting for text elements
- Re-enable select, multi-select, and matrix field type definitions with enhanced configurations
* Remove Deprecated Template Metadata Generation Services
- Delete multiple AI prompt services related to template metadata generation
- Simplify GenerateTemplate command to use default values instead of complex metadata generation
- Remove GenerateTemplateMetadataPrompt and related classes like GenerateTemplateDescriptionPrompt, GenerateTemplateImageKeywordsPrompt, etc.
- Update form template generation to use basic fallback metadata generation approach
* Restore GenerateTemplateMetadataPrompt for Comprehensive Template Generation
- Reintroduce GenerateTemplateMetadataPrompt to replace default metadata generation
- Update GenerateTemplate command to use consolidated metadata generation approach
- Extract detailed metadata components including title, description, industries, and image search query
- Improve template generation with more dynamic and AI-generated metadata
* Refactor Template Preview Section Layout
- Remove unnecessary nested div in template preview section
- Simplify HTML structure for the template preview component
- Maintain existing styling and functionality while improving code readability
* Refactor Constructor and Code Formatting in AI Form Generation and Prompt Classes
- Updated the constructor in GenerateAiForm.php to use a block structure for improved readability and consistency.
- Added a blank line in the Prompt.php file to enhance code formatting and maintain consistency with PHP coding standards.
- Modified the migration file to use a more concise class declaration syntax, improving clarity.
These changes aim to enhance code readability and maintainability across the affected files.
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
* Create form abuse page
* Update iframe height in report-abuse.vue for improved user experience
- Increased the minimum height of the iframe from 600px to 1000px to enhance visibility and usability of the abuse report form. This change aims to provide a better user experience by ensuring that the entire form is more easily accessible without the need for scrolling.
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
* Refactor Form Not Found Handling and Improve Error Response
- Replace the existing "Whoops" message with a NotFoundForm component for better user experience when a form is not found.
- Enhance error handling in the loadForm function to set a 404 response status when a form cannot be loaded, improving clarity for users and developers.
These changes aim to streamline the user experience and provide clearer feedback when forms are unavailable.
* Refactor Navbar and NotFoundForm Components for Improved User Experience
- Simplify the Navbar component by removing unnecessary conditional rendering for the authentication display, enhancing clarity in the layout.
- Update the NotFoundForm component to utilize a dynamic actions array for rendering navigation options, improving maintainability and flexibility.
- Adjust text styles for better readability and consistency across the NotFoundForm component.
These changes aim to streamline the user interface and enhance the overall user experience when navigating forms and handling not found scenarios.
* Update NotFoundForm Component for Improved Action Clarity
- Adjust the text and icon in the actions array of the NotFoundForm component to enhance clarity and user experience. The "Start Fresh" action has been renamed to "Create Form" and the icon has been updated from a check-circle to a rocket-launch icon, better reflecting the action's purpose.
- Minor formatting adjustments were made to the template for improved readability.
These changes aim to provide users with clearer navigation options and a more intuitive interface when encountering a not found scenario.
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
* Add regex matching filters to open_filters.json
- Introduce new regex-based filters: matches_regex and does_not_match_regex
- Add support for string-based regex matching in both API and client filter configurations
- Update filter schemas to include new regex filter options with expected string type
* Add barcode comparators and regex filters to open_filters.json and validatePropertiesLogic.js
- Introduce new barcode comparators: equals, does_not_equal, contains, does_not_contain, starts_with, ends_with, is_empty, is_not_empty, matches_regex, does_not_match_regex, content_length_equals, content_length_does_not_equal, content_length_greater_than, content_length_greater_than_or_equal_to, content_length_less_than, content_length_less_than_or_equal_to.
- Add regex matching filters: matches_regex and does_not_match_regex to open_filters.json.
- Remove console log statements from validatePropertiesLogic.js and FormPropertyLogicRule.js for cleaner code.
This update enhances the filtering capabilities and improves the validation logic by removing unnecessary debug outputs.
* Refactor Vue Components for Improved Readability and Consistency
- Update CameraUpload.vue to enhance formatting and maintain consistent indentation for better readability.
- Modify OpenFormField.vue to improve tooltip component formatting, ensuring consistent styling across the application.
- Refactor FormSecurityAccess.vue to enhance the layout of the conditional rendering for captcha providers.
- Adjust RegisterForm.vue to improve the formatting of the terms and conditions section, ensuring consistent indentation and readability.
These changes aim to enhance code maintainability and visual consistency across the components, contributing to a cleaner codebase.
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
- Implement extended token lifetime for "Remember Me" functionality
- Add token expiration details to authentication responses
- Update client-side token handling to support dynamic expiration
- Modify authentication middleware to handle token initialization more robustly
- Configure JWT configuration to support longer token lifetimes
* Billing flow redirect
* fix checkout url
* Refactor checkout and subscription flow
- Improve checkout URL generation with ref unwrapping
- Enhance user data handling in subscription modal
- Remove deprecated CheckoutDetailsModal component
- Update form field and register form styling
- Add more robust user data update mechanism
* Refactor checkout and subscription flow
- Improve checkout URL generation with ref unwrapping
- Enhance user data handling in subscription modal
- Remove deprecated CheckoutDetailsModal component
- Update form field and register form styling
- Add more robust user data update mechanism
* Fix accessibility and checkout URL generation
- Add proper label for terms and conditions checkbox in RegisterForm
- Refactor checkout URL generation in SubscriptionModal using computed refs
- Improve form input handling and reactivity
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
- Update .dockerignore with comprehensive ignore patterns for API and client
- Modify docker-compose files to improve service configurations
- Enhance Nginx configuration for development and production environments
- Refactor Dockerfile.api with improved build process
- Add docker-setup.sh script for simplified Docker deployment
- Update update-credentials.vue page with improved UI
- Remove hCaptcha dependency from package-lock.json
- Update PHP configuration and entrypoint scripts
Enhance CI/CD pipeline by introducing a new job to run ESLint on the client application. This ensures code quality and consistency for the frontend codebase.
* Readonly User
* Refactor FormPolicy and TemplatePolicy to centralize write operation logic
- Introduced a private method `canPerformWriteOperation` in both FormPolicy and TemplatePolicy to encapsulate the logic for determining if a user can perform write operations on the respective models.
- Updated the `update`, `delete`, `restore`, and `forceDelete` methods in FormPolicy to use the new method for improved readability and maintainability.
- Simplified the `update` and `delete` methods in TemplatePolicy to leverage the centralized write operation logic.
This refactoring enhances code clarity and reduces duplication across policy classes.
* Refactor user and workspace permissions handling
- Updated FormController to authorize form creation based on workspace context.
- Removed the `is_readonly` attribute from UserResource and integrated it into WorkspaceResource for better encapsulation.
- Refactored User model to eliminate the `getIsReadonlyAttribute` method, shifting readonly logic to the Workspace model.
- Adjusted FormPolicy and TemplatePolicy to utilize workspace readonly checks for user permissions.
- Updated various frontend components to reference workspace readonly status instead of user readonly status, enhancing clarity and consistency in permission handling.
These changes improve the management of user permissions in relation to workspaces, ensuring a more robust and maintainable authorization system.
* Fix isReadonlyUser
* fix pint
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
* Add reCAPTCHA support and update captcha provider handling
- Introduced reCAPTCHA as an additional captcha provider alongside hCaptcha.
- Updated form request validation to handle different captcha providers based on user selection.
- Added a new validation rule for reCAPTCHA.
- Modified the forms model to include a 'captcha_provider' field.
- Created a migration to add the 'captcha_provider' column to the forms table.
- Updated frontend components to support dynamic rendering of captcha based on the selected provider.
- Enhanced tests to cover scenarios for both hCaptcha and reCAPTCHA.
These changes improve the flexibility of captcha options available to users, enhancing form security and user experience.
* fix pint
* change comment text
* Refactor captcha implementation and integrate new captcha components
- Removed the old RecaptchaV2 component and replaced it with a new implementation that supports both reCAPTCHA and hCaptcha through a unified CaptchaInput component.
- Updated the OpenForm component to utilize the new CaptchaInput for dynamic captcha rendering based on user-selected provider.
- Cleaned up the package.json by removing the deprecated @hcaptcha/vue3-hcaptcha dependency.
- Enhanced form initialization to set a default captcha provider.
- Improved error handling and cleanup for both reCAPTCHA and hCaptcha scripts.
These changes streamline captcha integration, improve maintainability, and enhance user experience by providing a more flexible captcha solution.
* Refactor captcha error messages and localization support
* Refactor registration process to integrate reCAPTCHA
- Replaced hCaptcha implementation with reCAPTCHA in RegisterController and related test cases.
- Updated validation rules to utilize g-recaptcha-response instead of h-captcha-response.
- Modified RegisterForm component to support reCAPTCHA, including changes to the form data structure and component references.
- Enhanced test cases to reflect the new reCAPTCHA integration, ensuring proper validation and response handling.
These changes improve security and user experience during the registration process by adopting a more widely used captcha solution.
* Fix reCAPTCHA configuration and update RegisterForm styling
- Corrected the configuration key for reCAPTCHA in RegisterController from 'services.recaptcha.secret_key' to 'services.re_captcha.secret_key'.
- Updated the styling of the Captcha input section in RegisterForm.vue to improve layout consistency.
These changes ensure proper reCAPTCHA functionality and enhance the user interface during the registration process.
* Fix reCAPTCHA configuration in RegisterTest to use the correct key format
- Updated the configuration key for reCAPTCHA in RegisterTest from 'services.recaptcha.secret_key' to 'services.re_captcha.secret_key' to ensure proper functionality during tests.
This change aligns the test setup with the recent updates in the reCAPTCHA integration, improving the accuracy of the registration process tests.
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
* Add hCaptcha on register page
* register page captcha test cases
* Refactor integration validation rules to include form context
- Updated the `getValidationRules` method in various integration handlers (Discord, Email, Google Sheets, Slack, Webhook, Zapier) to accept an optional `Form` parameter, allowing for context-aware validation.
- Enhanced the `EmailIntegration` handler to enforce restrictions based on user plans, ensuring free users can only create one email integration per form and can only send to a single email address.
- Added a new test suite for `EmailIntegration` to validate the new restrictions and ensure proper functionality for both free and pro users.
- Introduced loading state management in the `IntegrationModal` component to improve user experience during save operations.
These changes improve the flexibility and user experience of form integrations, particularly for email handling.
* for self-hosted ignore emil validation for spam
* fix pint
* ignore register throttle for testing env
* support new migration for mysql also
* Register page captcha enable if captcha key set
* fix test case
* fix test case
* fix test case
* fix pint
* Refactor RegisterController middleware and update TestCase setup
- Removed environment check for throttling middleware in RegisterController, ensuring consistent rate limiting for the registration endpoint.
- Updated TestCase to disable throttle middleware during tests, allowing for more flexible testing scenarios without rate limiting interference.
* Enhance hCaptcha integration in tests and configuration
- Added hCaptcha site and secret keys to phpunit.xml for testing purposes.
- Updated RegisterTest to configure hCaptcha secret key dynamically, ensuring proper token validation in production environment.
These changes improve the testing setup for hCaptcha, facilitating more accurate simulation of production conditions.
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
- Added support for additional languages (Bengali, Portuguese, Russian, Urdu, Punjabi, German, Javanese, Korean, Vietnamese, Telugu, Marathi, Tamil, Turkish) in the application.
- Updated validation messages across multiple languages to correct formatting issues and improve clarity, including Arabic, English, Spanish, French, Hindi, Japanese, Norwegian, and Chinese.
- Removed obsolete Norwegian language files to streamline localization efforts.
- Improved the language selection interface in the form customization component.
These changes aim to enhance user experience by providing better language support and clearer validation feedback.
* Custom SMTP Settings
* Fix lint
* Custom SMTP add in Pricing plan
* Allow reset email settings
* improve custom SMTP using seprate abstract class
* test case for custom SMTP
* fix test case
* UI improvement
* add CASHIER_KEY in phpunit for testcase
* Attempt to fix tests
* Run pint and attempt to fix cache tests
* Fix user management tests
* Fix code linters
* Merged main & fix linting
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
* Form editor v2
* fix template test
* setFormDefaults when save
* fix form cleaning dark mode
* improvements on open sidebar
* UI polish
* Fix change type button
---------
Co-authored-by: Julien Nahum <julien@nahum.net>
* Re-organize a bit controllers
* Added the featureflagcontroller
* Implement feature flags in the front-end
* Clean env files
* Clean console.log messages
* Fix feature flag test
* fix password reset bug
* self hosted mode middleware changes on pages
* fix lint
* wip: self hosted changes
* wip: self hosted frontend changes
* wip self hosted mode changes
* typo correction
* remove commented logic
* fix env variable names
* fix lint issues
* fix minor updates
* #445 Switched from single monolithic docker image to a docker-compose
orchestrated network of services
* Automatically configures shared secret
* Working through some issues
* Use local file storage
* Moved the dockerfiles
* Fixed some issues when building from clean
* Corrected workflow
* Hopefully schedules everything correctly now
* Prep storage for worker process as well
* .env files are required
* Pinned dependency versions
* Disable self hosted in the client as well
* Removed double defaulting logic
* Using regexs is more succinct
* Added FRONT_URL environment variable
* Merge 236e4-self-hosted-mode-changes
* Improve inital user setup
* Finalized the new docker-compose setup
* Fix back-end formatting issues
---------
Co-authored-by: Frank <csskfaves@gmail.com>
Co-authored-by: Don Benjamin <don@webhammer.co.uk>
* add api enpoints for adding, removing, updating user to workspace and leaving workspace
* feat: updates client site workspace settings
* refactor and add domain setting ui in modal
* move workspace user functionality to its own component
* adds tests
* fix linting
* updates select input to FlatSelectInput
* moves workspace user role edit to seperated component
* move user adding to its own component
* adds check to usure users exist before checking is admin
* fix loading users
* feat: invite user to team functionality
* fix token coulmn
* fix self host mode changes
* tests for user invite
* Refactor back-end
* Rename variables
* Improve some styling elements + refactor workspace settings
* More styling
* More UI polishing
* More UI fixes
* PHP linting
* Implemented most of the logic for team-functionnality
* Fix user avatar URL
* WIP remove users on cancellation
* Finished pricing for team functionality
* Fix tests
* Fix linting
* Added pricing_enabled helper
* Fix pricing_enabled shortcut
* Debug CI
* Disable pricing when testing
---------
Co-authored-by: LL-Etiane <lukongleinyuyetiane@gmail.com>
Co-authored-by: Lukong Etiane <83535251+LL-Etiane@users.noreply.github.com>
Co-authored-by: Julien Nahum <julien@nahum.net>
* Working on custom radius + input size
* Fix date input clear vertical align
* Moslty finished implementing small size
* Polishing larger theme
* Finish large theme
* Added size/radius options in form editor
* Darken help text, improve switch input help location
* Slight form editor improvement
* Fix styling
* Polish of the form editor