Skip to content

Commit 677697a

Browse files
Jhanemba64JeynoxniieeerEtimo285Ubuntu
authored
Dev (#172)
* Fix/resolve merge conflicts (#162) * Dev (#142) * Refactor file handling components and add FilePreview utility - Introduced FilePreview component for displaying file previews based on file type. - Updated FileCard and FileUploader to utilize FilePreview for better file representation. - Enhanced FileInfoDialog to include file previews. - Improved file type detection logic in fileUtils. - Streamlined imports and component structure across affected files. * Test 1 * Add PDF preview message and integrate translation in FilePreview component * Test 2 * Test 3 * Test 4 * Trad part 2 (#122) * rate limiting for build * autres trad * Revert "Fix Playwright" (#121) * Revert "Fix Playwright" * Test 1 * Test 2 * Test 3 * Test 4 * Test 5 * Test 6 * Trad part 2 (#123) * rate limiting for build * autres trad * oublie autres trad * Temporary Files Upload (#119) * Upload page reworked + Visuals for Temp File Gen * Temp Files * Refacto * Fix Front * Persistence in localstorage * Expiration in Front * Working cleanup * Fixes + Translation * Bigger expiration Icon * Set to 24 hours * FilePreview on the Icons * Underscore (#125) * rate limiting for build * underscore * Password Recovery (#124) * Password Recovery * Translation Fix * Refacto decodeJWT + utils * Refacto 2 * Refacto utils part 2 * Schema Validation + Error handling * Added missing definition in resolver * graphql types updated * Changed Toast config (#126) * File list (#128) * Refactor: Update UserResolver and AuthContext for improved async handling and optional fields - Adjusted UserInfo fields to be nullable in UserResolver. - Enhanced async handling in AuthContext and related components. - Improved error handling in Form component. - Cleaned up imports and formatting across multiple files. * Refactor UI components and utility functions - Updated import statements to use consistent single quotes. - Refactored Select, Separator, Sheet, ShimmerButton, Switch, Tabs, and Tooltip components for improved readability and consistency. - Removed the old utility functions file and created a new global utility functions file. - Added new types for file handling and temporary links. - Enhanced drag-and-drop functionality with utility functions. - Cleaned up Layout and UploadPage components for better structure and readability. * Enhance FileCard and FileSection components with compact mode toggle; update Radix UI dependencies and improve file type handling --------- Co-authored-by: Etimo <gitimo@gmail.com> * TempLinks Limit (#130) * TempLink limit + Fixed Translations * Added acceptedFileTypes to TempLinkGenerator * Updated Common i18n * Resend Verify Code Button (#129) * Resend Code Button * underscore * Rework How it Works & About Pages (#131) * Reword How it Works * Rework About Page * Removed Like and Comment (#132) * Feat file expire cron (#134) * feat: add scheduled cleanup for expired resources and update dependencies - Implemented a daily cron job to clean up expired resources from the database and file system. - Added `node-cron` for scheduling tasks and `express-rate-limit` for rate limiting. - Updated `package.json` to include new dependencies and removed duplicates. - Refactored `ResourceResolver` to handle resource expiration and access control more effectively. - Enhanced error handling and logging for resource cleanup operations. - Updated frontend dependencies to their latest versions for improved stability and security. * feat: Enhance subscription and file upload features - Updated SubscriptionResolver to improve error messages for user and subscription not found. - Modified UserResolver to include subscription status in JWT token. - Updated frontend localization files to clarify file size limits for subscribed and non-subscribed users. - Enhanced FileUploader component to enforce file size limits based on subscription status. - Improved TempLinkGenerator to validate file size for non-subscribed users. - Integrated express-rate-limit middleware in storage API to manage upload and request limits. - Refactored multer configuration to include file type and size validation based on user subscription. - Added cleanup logic for expired temporary files in the storage API. - Implemented rate limiting for various routes in the storage API to prevent abuse. * FilePreview v2 (#133) * Updated FilePreviw + FileList * FileSection pagination and Fixes * Added Search Bar * Clear input added --------- Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> * Refactor generateUniqueFilename to use originalName directly and simplify custom name handling * Captcha for Sign Page (#138) * Captcha for Sign Page * Temporilarily Modified e2e test * Inverted logic for keys * Sort By File Type & Author (#136) * Added Audio preview * Filter by type and author * Fixed author filter * Removed useless logs * Antivirus Scan (#137) * Initialization * Working State * Improved UI/UX and translations * Mini fix * Removed useless files * MD5 Hash stored & Exposed on Front (#139) * md5file installed * MD5 Hash is stored and exposed in the UI * Fix lint * Email Code Expiration + fix resend email (#140) * Added the group selection in Front * Grouped Deletion * Drag to select * Grouped Sharing * ScrollBox + Improved drag to select + typo * Group Report * Group Export to ZIP + Removed Group Download * Fix Lint * Cleaning --------- Co-authored-by: niieeer <clement0201@icloud.com> Co-authored-by: Etimo <gitimo@gmail.com> Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> Co-authored-by: Etimo <86971633+Etimo285@users.noreply.github.com> * Fix/frontend build (#143) * fix: correct frontend Dockerfile for production build * fix: remove TypeScript check from frontend build to fix production build --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script (#144) Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Fix/frontend dockerfile (#145) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Fix/frontend dockerfile (#146) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile * feat: add production environment variables for frontend build --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Disable Recaptcha (#147) * Disable Recaptcha * error Lint * error Lint * Chore/final prod config (#148) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile * feat: add production environment variables for frontend build * chore: final production config with storage-api build fix --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * test (#149) * fix: resolve merge conflicts in Dockerfile and reCAPTCHA files --------- Co-authored-by: Daniel Lemos <118815455+Jeynox@users.noreply.github.com> Co-authored-by: niieeer <clement0201@icloud.com> Co-authored-by: Etimo <gitimo@gmail.com> Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> Co-authored-by: Etimo <86971633+Etimo285@users.noreply.github.com> Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Fix/resolve merge conflicts (#164) * Dev (#142) * Refactor file handling components and add FilePreview utility - Introduced FilePreview component for displaying file previews based on file type. - Updated FileCard and FileUploader to utilize FilePreview for better file representation. - Enhanced FileInfoDialog to include file previews. - Improved file type detection logic in fileUtils. - Streamlined imports and component structure across affected files. * Test 1 * Add PDF preview message and integrate translation in FilePreview component * Test 2 * Test 3 * Test 4 * Trad part 2 (#122) * rate limiting for build * autres trad * Revert "Fix Playwright" (#121) * Revert "Fix Playwright" * Test 1 * Test 2 * Test 3 * Test 4 * Test 5 * Test 6 * Trad part 2 (#123) * rate limiting for build * autres trad * oublie autres trad * Temporary Files Upload (#119) * Upload page reworked + Visuals for Temp File Gen * Temp Files * Refacto * Fix Front * Persistence in localstorage * Expiration in Front * Working cleanup * Fixes + Translation * Bigger expiration Icon * Set to 24 hours * FilePreview on the Icons * Underscore (#125) * rate limiting for build * underscore * Password Recovery (#124) * Password Recovery * Translation Fix * Refacto decodeJWT + utils * Refacto 2 * Refacto utils part 2 * Schema Validation + Error handling * Added missing definition in resolver * graphql types updated * Changed Toast config (#126) * File list (#128) * Refactor: Update UserResolver and AuthContext for improved async handling and optional fields - Adjusted UserInfo fields to be nullable in UserResolver. - Enhanced async handling in AuthContext and related components. - Improved error handling in Form component. - Cleaned up imports and formatting across multiple files. * Refactor UI components and utility functions - Updated import statements to use consistent single quotes. - Refactored Select, Separator, Sheet, ShimmerButton, Switch, Tabs, and Tooltip components for improved readability and consistency. - Removed the old utility functions file and created a new global utility functions file. - Added new types for file handling and temporary links. - Enhanced drag-and-drop functionality with utility functions. - Cleaned up Layout and UploadPage components for better structure and readability. * Enhance FileCard and FileSection components with compact mode toggle; update Radix UI dependencies and improve file type handling --------- Co-authored-by: Etimo <gitimo@gmail.com> * TempLinks Limit (#130) * TempLink limit + Fixed Translations * Added acceptedFileTypes to TempLinkGenerator * Updated Common i18n * Resend Verify Code Button (#129) * Resend Code Button * underscore * Rework How it Works & About Pages (#131) * Reword How it Works * Rework About Page * Removed Like and Comment (#132) * Feat file expire cron (#134) * feat: add scheduled cleanup for expired resources and update dependencies - Implemented a daily cron job to clean up expired resources from the database and file system. - Added `node-cron` for scheduling tasks and `express-rate-limit` for rate limiting. - Updated `package.json` to include new dependencies and removed duplicates. - Refactored `ResourceResolver` to handle resource expiration and access control more effectively. - Enhanced error handling and logging for resource cleanup operations. - Updated frontend dependencies to their latest versions for improved stability and security. * feat: Enhance subscription and file upload features - Updated SubscriptionResolver to improve error messages for user and subscription not found. - Modified UserResolver to include subscription status in JWT token. - Updated frontend localization files to clarify file size limits for subscribed and non-subscribed users. - Enhanced FileUploader component to enforce file size limits based on subscription status. - Improved TempLinkGenerator to validate file size for non-subscribed users. - Integrated express-rate-limit middleware in storage API to manage upload and request limits. - Refactored multer configuration to include file type and size validation based on user subscription. - Added cleanup logic for expired temporary files in the storage API. - Implemented rate limiting for various routes in the storage API to prevent abuse. * FilePreview v2 (#133) * Updated FilePreviw + FileList * FileSection pagination and Fixes * Added Search Bar * Clear input added --------- Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> * Refactor generateUniqueFilename to use originalName directly and simplify custom name handling * Captcha for Sign Page (#138) * Captcha for Sign Page * Temporilarily Modified e2e test * Inverted logic for keys * Sort By File Type & Author (#136) * Added Audio preview * Filter by type and author * Fixed author filter * Removed useless logs * Antivirus Scan (#137) * Initialization * Working State * Improved UI/UX and translations * Mini fix * Removed useless files * MD5 Hash stored & Exposed on Front (#139) * md5file installed * MD5 Hash is stored and exposed in the UI * Fix lint * Email Code Expiration + fix resend email (#140) * Added the group selection in Front * Grouped Deletion * Drag to select * Grouped Sharing * ScrollBox + Improved drag to select + typo * Group Report * Group Export to ZIP + Removed Group Download * Fix Lint * Cleaning --------- Co-authored-by: niieeer <clement0201@icloud.com> Co-authored-by: Etimo <gitimo@gmail.com> Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> Co-authored-by: Etimo <86971633+Etimo285@users.noreply.github.com> * Fix/frontend build (#143) * fix: correct frontend Dockerfile for production build * fix: remove TypeScript check from frontend build to fix production build --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script (#144) Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Fix/frontend dockerfile (#145) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Fix/frontend dockerfile (#146) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile * feat: add production environment variables for frontend build --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Disable Recaptcha (#147) * Disable Recaptcha * error Lint * error Lint * Chore/final prod config (#148) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile * feat: add production environment variables for frontend build * chore: final production config with storage-api build fix --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * test (#149) * fix: resolve merge conflicts in Dockerfile and reCAPTCHA files --------- Co-authored-by: Daniel Lemos <118815455+Jeynox@users.noreply.github.com> Co-authored-by: niieeer <clement0201@icloud.com> Co-authored-by: Etimo <gitimo@gmail.com> Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> Co-authored-by: Etimo <86971633+Etimo285@users.noreply.github.com> Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Fix/resolve merge conflicts (#166) * Dev (#142) * Refactor file handling components and add FilePreview utility - Introduced FilePreview component for displaying file previews based on file type. - Updated FileCard and FileUploader to utilize FilePreview for better file representation. - Enhanced FileInfoDialog to include file previews. - Improved file type detection logic in fileUtils. - Streamlined imports and component structure across affected files. * Test 1 * Add PDF preview message and integrate translation in FilePreview component * Test 2 * Test 3 * Test 4 * Trad part 2 (#122) * rate limiting for build * autres trad * Revert "Fix Playwright" (#121) * Revert "Fix Playwright" * Test 1 * Test 2 * Test 3 * Test 4 * Test 5 * Test 6 * Trad part 2 (#123) * rate limiting for build * autres trad * oublie autres trad * Temporary Files Upload (#119) * Upload page reworked + Visuals for Temp File Gen * Temp Files * Refacto * Fix Front * Persistence in localstorage * Expiration in Front * Working cleanup * Fixes + Translation * Bigger expiration Icon * Set to 24 hours * FilePreview on the Icons * Underscore (#125) * rate limiting for build * underscore * Password Recovery (#124) * Password Recovery * Translation Fix * Refacto decodeJWT + utils * Refacto 2 * Refacto utils part 2 * Schema Validation + Error handling * Added missing definition in resolver * graphql types updated * Changed Toast config (#126) * File list (#128) * Refactor: Update UserResolver and AuthContext for improved async handling and optional fields - Adjusted UserInfo fields to be nullable in UserResolver. - Enhanced async handling in AuthContext and related components. - Improved error handling in Form component. - Cleaned up imports and formatting across multiple files. * Refactor UI components and utility functions - Updated import statements to use consistent single quotes. - Refactored Select, Separator, Sheet, ShimmerButton, Switch, Tabs, and Tooltip components for improved readability and consistency. - Removed the old utility functions file and created a new global utility functions file. - Added new types for file handling and temporary links. - Enhanced drag-and-drop functionality with utility functions. - Cleaned up Layout and UploadPage components for better structure and readability. * Enhance FileCard and FileSection components with compact mode toggle; update Radix UI dependencies and improve file type handling --------- Co-authored-by: Etimo <gitimo@gmail.com> * TempLinks Limit (#130) * TempLink limit + Fixed Translations * Added acceptedFileTypes to TempLinkGenerator * Updated Common i18n * Resend Verify Code Button (#129) * Resend Code Button * underscore * Rework How it Works & About Pages (#131) * Reword How it Works * Rework About Page * Removed Like and Comment (#132) * Feat file expire cron (#134) * feat: add scheduled cleanup for expired resources and update dependencies - Implemented a daily cron job to clean up expired resources from the database and file system. - Added `node-cron` for scheduling tasks and `express-rate-limit` for rate limiting. - Updated `package.json` to include new dependencies and removed duplicates. - Refactored `ResourceResolver` to handle resource expiration and access control more effectively. - Enhanced error handling and logging for resource cleanup operations. - Updated frontend dependencies to their latest versions for improved stability and security. * feat: Enhance subscription and file upload features - Updated SubscriptionResolver to improve error messages for user and subscription not found. - Modified UserResolver to include subscription status in JWT token. - Updated frontend localization files to clarify file size limits for subscribed and non-subscribed users. - Enhanced FileUploader component to enforce file size limits based on subscription status. - Improved TempLinkGenerator to validate file size for non-subscribed users. - Integrated express-rate-limit middleware in storage API to manage upload and request limits. - Refactored multer configuration to include file type and size validation based on user subscription. - Added cleanup logic for expired temporary files in the storage API. - Implemented rate limiting for various routes in the storage API to prevent abuse. * FilePreview v2 (#133) * Updated FilePreviw + FileList * FileSection pagination and Fixes * Added Search Bar * Clear input added --------- Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> * Refactor generateUniqueFilename to use originalName directly and simplify custom name handling * Captcha for Sign Page (#138) * Captcha for Sign Page * Temporilarily Modified e2e test * Inverted logic for keys * Sort By File Type & Author (#136) * Added Audio preview * Filter by type and author * Fixed author filter * Removed useless logs * Antivirus Scan (#137) * Initialization * Working State * Improved UI/UX and translations * Mini fix * Removed useless files * MD5 Hash stored & Exposed on Front (#139) * md5file installed * MD5 Hash is stored and exposed in the UI * Fix lint * Email Code Expiration + fix resend email (#140) * Added the group selection in Front * Grouped Deletion * Drag to select * Grouped Sharing * ScrollBox + Improved drag to select + typo * Group Report * Group Export to ZIP + Removed Group Download * Fix Lint * Cleaning --------- Co-authored-by: niieeer <clement0201@icloud.com> Co-authored-by: Etimo <gitimo@gmail.com> Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> Co-authored-by: Etimo <86971633+Etimo285@users.noreply.github.com> * Fix/frontend build (#143) * fix: correct frontend Dockerfile for production build * fix: remove TypeScript check from frontend build to fix production build --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script (#144) Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Fix/frontend dockerfile (#145) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Fix/frontend dockerfile (#146) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile * feat: add production environment variables for frontend build --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Disable Recaptcha (#147) * Disable Recaptcha * error Lint * error Lint * Chore/final prod config (#148) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile * feat: add production environment variables for frontend build * chore: final production config with storage-api build fix --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * test (#149) * fix: resolve merge conflicts in Dockerfile and reCAPTCHA files * fix: improve prod-frontend workflow to handle merged PRs correctly * fix: ensure lint workflow uses correct branch code * fix: ensure lint uses correct code without merge conflicts * fix: remove dotenv import and update Dockerfile with Node 22 and better error handling --------- Co-authored-by: Daniel Lemos <118815455+Jeynox@users.noreply.github.com> Co-authored-by: niieeer <clement0201@icloud.com> Co-authored-by: Etimo <gitimo@gmail.com> Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> Co-authored-by: Etimo <86971633+Etimo285@users.noreply.github.com> Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Conflits (#169) * Dev (#142) * Refactor file handling components and add FilePreview utility - Introduced FilePreview component for displaying file previews based on file type. - Updated FileCard and FileUploader to utilize FilePreview for better file representation. - Enhanced FileInfoDialog to include file previews. - Improved file type detection logic in fileUtils. - Streamlined imports and component structure across affected files. * Test 1 * Add PDF preview message and integrate translation in FilePreview component * Test 2 * Test 3 * Test 4 * Trad part 2 (#122) * rate limiting for build * autres trad * Revert "Fix Playwright" (#121) * Revert "Fix Playwright" * Test 1 * Test 2 * Test 3 * Test 4 * Test 5 * Test 6 * Trad part 2 (#123) * rate limiting for build * autres trad * oublie autres trad * Temporary Files Upload (#119) * Upload page reworked + Visuals for Temp File Gen * Temp Files * Refacto * Fix Front * Persistence in localstorage * Expiration in Front * Working cleanup * Fixes + Translation * Bigger expiration Icon * Set to 24 hours * FilePreview on the Icons * Underscore (#125) * rate limiting for build * underscore * Password Recovery (#124) * Password Recovery * Translation Fix * Refacto decodeJWT + utils * Refacto 2 * Refacto utils part 2 * Schema Validation + Error handling * Added missing definition in resolver * graphql types updated * Changed Toast config (#126) * File list (#128) * Refactor: Update UserResolver and AuthContext for improved async handling and optional fields - Adjusted UserInfo fields to be nullable in UserResolver. - Enhanced async handling in AuthContext and related components. - Improved error handling in Form component. - Cleaned up imports and formatting across multiple files. * Refactor UI components and utility functions - Updated import statements to use consistent single quotes. - Refactored Select, Separator, Sheet, ShimmerButton, Switch, Tabs, and Tooltip components for improved readability and consistency. - Removed the old utility functions file and created a new global utility functions file. - Added new types for file handling and temporary links. - Enhanced drag-and-drop functionality with utility functions. - Cleaned up Layout and UploadPage components for better structure and readability. * Enhance FileCard and FileSection components with compact mode toggle; update Radix UI dependencies and improve file type handling --------- Co-authored-by: Etimo <gitimo@gmail.com> * TempLinks Limit (#130) * TempLink limit + Fixed Translations * Added acceptedFileTypes to TempLinkGenerator * Updated Common i18n * Resend Verify Code Button (#129) * Resend Code Button * underscore * Rework How it Works & About Pages (#131) * Reword How it Works * Rework About Page * Removed Like and Comment (#132) * Feat file expire cron (#134) * feat: add scheduled cleanup for expired resources and update dependencies - Implemented a daily cron job to clean up expired resources from the database and file system. - Added `node-cron` for scheduling tasks and `express-rate-limit` for rate limiting. - Updated `package.json` to include new dependencies and removed duplicates. - Refactored `ResourceResolver` to handle resource expiration and access control more effectively. - Enhanced error handling and logging for resource cleanup operations. - Updated frontend dependencies to their latest versions for improved stability and security. * feat: Enhance subscription and file upload features - Updated SubscriptionResolver to improve error messages for user and subscription not found. - Modified UserResolver to include subscription status in JWT token. - Updated frontend localization files to clarify file size limits for subscribed and non-subscribed users. - Enhanced FileUploader component to enforce file size limits based on subscription status. - Improved TempLinkGenerator to validate file size for non-subscribed users. - Integrated express-rate-limit middleware in storage API to manage upload and request limits. - Refactored multer configuration to include file type and size validation based on user subscription. - Added cleanup logic for expired temporary files in the storage API. - Implemented rate limiting for various routes in the storage API to prevent abuse. * FilePreview v2 (#133) * Updated FilePreviw + FileList * FileSection pagination and Fixes * Added Search Bar * Clear input added --------- Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> * Refactor generateUniqueFilename to use originalName directly and simplify custom name handling * Captcha for Sign Page (#138) * Captcha for Sign Page * Temporilarily Modified e2e test * Inverted logic for keys * Sort By File Type & Author (#136) * Added Audio preview * Filter by type and author * Fixed author filter * Removed useless logs * Antivirus Scan (#137) * Initialization * Working State * Improved UI/UX and translations * Mini fix * Removed useless files * MD5 Hash stored & Exposed on Front (#139) * md5file installed * MD5 Hash is stored and exposed in the UI * Fix lint * Email Code Expiration + fix resend email (#140) * Added the group selection in Front * Grouped Deletion * Drag to select * Grouped Sharing * ScrollBox + Improved drag to select + typo * Group Report * Group Export to ZIP + Removed Group Download * Fix Lint * Cleaning --------- Co-authored-by: niieeer <clement0201@icloud.com> Co-authored-by: Etimo <gitimo@gmail.com> Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> Co-authored-by: Etimo <86971633+Etimo285@users.noreply.github.com> * Fix/frontend build (#143) * fix: correct frontend Dockerfile for production build * fix: remove TypeScript check from frontend build to fix production build --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script (#144) Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Fix/frontend dockerfile (#145) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Fix/frontend dockerfile (#146) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile * feat: add production environment variables for frontend build --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Disable Recaptcha (#147) * Disable Recaptcha * error Lint * error Lint * Chore/final prod config (#148) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile * feat: add production environment variables for frontend build * chore: final production config with storage-api build fix --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * test (#149) * Fix/resolve merge conflicts (#162) (#163) * Dev (#142) * Refactor file handling components and add FilePreview utility - Introduced FilePreview component for displaying file previews based on file type. - Updated FileCard and FileUploader to utilize FilePreview for better file representation. - Enhanced FileInfoDialog to include file previews. - Improved file type detection logic in fileUtils. - Streamlined imports and component structure across affected files. * Test 1 * Add PDF preview message and integrate translation in FilePreview component * Test 2 * Test 3 * Test 4 * Trad part 2 (#122) * rate limiting for build * autres trad * Revert "Fix Playwright" (#121) * Revert "Fix Playwright" * Test 1 * Test 2 * Test 3 * Test 4 * Test 5 * Test 6 * Trad part 2 (#123) * rate limiting for build * autres trad * oublie autres trad * Temporary Files Upload (#119) * Upload page reworked + Visuals for Temp File Gen * Temp Files * Refacto * Fix Front * Persistence in localstorage * Expiration in Front * Working cleanup * Fixes + Translation * Bigger expiration Icon * Set to 24 hours * FilePreview on the Icons * Underscore (#125) * rate limiting for build * underscore * Password Recovery (#124) * Password Recovery * Translation Fix * Refacto decodeJWT + utils * Refacto 2 * Refacto utils part 2 * Schema Validation + Error handling * Added missing definition in resolver * graphql types updated * Changed Toast config (#126) * File list (#128) * Refactor: Update UserResolver and AuthContext for improved async handling and optional fields - Adjusted UserInfo fields to be nullable in UserResolver. - Enhanced async handling in AuthContext and related components. - Improved error handling in Form component. - Cleaned up imports and formatting across multiple files. * Refactor UI components and utility functions - Updated import statements to use consistent single quotes. - Refactored Select, Separator, Sheet, ShimmerButton, Switch, Tabs, and Tooltip components for improved readability and consistency. - Removed the old utility functions file and created a new global utility functions file. - Added new types for file handling and temporary links. - Enhanced drag-and-drop functionality with utility functions. - Cleaned up Layout and UploadPage components for better structure and readability. * Enhance FileCard and FileSection components with compact mode toggle; update Radix UI dependencies and improve file type handling --------- * TempLinks Limit (#130) * TempLink limit + Fixed Translations * Added acceptedFileTypes to TempLinkGenerator * Updated Common i18n * Resend Verify Code Button (#129) * Resend Code Button * underscore * Rework How it Works & About Pages (#131) * Reword How it Works * Rework About Page * Removed Like and Comment (#132) * Feat file expire cron (#134) * feat: add scheduled cleanup for expired resources and update dependencies - Implemented a daily cron job to clean up expired resources from the database and file system. - Added `node-cron` for scheduling tasks and `express-rate-limit` for rate limiting. - Updated `package.json` to include new dependencies and removed duplicates. - Refactored `ResourceResolver` to handle resource expiration and access control more effectively. - Enhanced error handling and logging for resource cleanup operations. - Updated frontend dependencies to their latest versions for improved stability and security. * feat: Enhance subscription and file upload features - Updated SubscriptionResolver to improve error messages for user and subscription not found. - Modified UserResolver to include subscription status in JWT token. - Updated frontend localization files to clarify file size limits for subscribed and non-subscribed users. - Enhanced FileUploader component to enforce file size limits based on subscription status. - Improved TempLinkGenerator to validate file size for non-subscribed users. - Integrated express-rate-limit middleware in storage API to manage upload and request limits. - Refactored multer configuration to include file type and size validation based on user subscription. - Added cleanup logic for expired temporary files in the storage API. - Implemented rate limiting for various routes in the storage API to prevent abuse. * FilePreview v2 (#133) * Updated FilePreviw + FileList * FileSection pagination and Fixes * Added Search Bar * Clear input added --------- * Refactor generateUniqueFilename to use originalName directly and simplify custom name handling * Captcha for Sign Page (#138) * Captcha for Sign Page * Temporilarily Modified e2e test * Inverted logic for keys * Sort By File Type & Author (#136) * Added Audio preview * Filter by type and author * Fixed author filter * Removed useless logs * Antivirus Scan (#137) * Initialization * Working State * Improved UI/UX and translations * Mini fix * Removed useless files * MD5 Hash stored & Exposed on Front (#139) * md5file installed * MD5 Hash is stored and exposed in the UI * Fix lint * Email Code Expiration + fix resend email (#140) * Added the group selection in Front * Grouped Deletion * Drag to select * Grouped Sharing * ScrollBox + Improved drag to select + typo * Group Report * Group Export to ZIP + Removed Group Download * Fix Lint * Cleaning --------- * Fix/frontend build (#143) * fix: correct frontend Dockerfile for production build * fix: remove TypeScript check from frontend build to fix production build --------- * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script (#144) * Fix/frontend dockerfile (#145) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile --------- * Fix/frontend dockerfile (#146) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile * feat: add production environment variables for frontend build --------- * Disable Recaptcha (#147) * Disable Recaptcha * error Lint * error Lint * Chore/final prod config (#148) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile * feat: add production environment variables for frontend build * chore: final production config with storage-api build fix --------- * test (#149) * fix: resolve merge conflicts in Dockerfile and reCAPTCHA files --------- Co-authored-by: Daniel Lemos <118815455+Jeynox@users.noreply.github.com> Co-authored-by: niieeer <clement0201@icloud.com> Co-authored-by: Etimo <gitimo@gmail.com> Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> Co-authored-by: Etimo <86971633+Etimo285@users.noreply.github.com> Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Dev (#165) * Fix/resolve merge conflicts (#162) * Dev (#142) * Refactor file handling components and add FilePreview utility - Introduced FilePreview component for displaying file previews based on file type. - Updated FileCard and FileUploader to utilize FilePreview for better file representation. - Enhanced FileInfoDialog to include file previews. - Improved file type detection logic in fileUtils. - Streamlined imports and component structure across affected files. * Test 1 * Add PDF preview message and integrate translation in FilePreview component * Test 2 * Test 3 * Test 4 * Trad part 2 (#122) * rate limiting for build * autres trad * Revert "Fix Playwright" (#121) * Revert "Fix Playwright" * Test 1 * Test 2 * Test 3 * Test 4 * Test 5 * Test 6 * Trad part 2 (#123) * rate limiting for build * autres trad * oublie autres trad * Temporary Files Upload (#119) * Upload page reworked + Visuals for Temp File Gen * Temp Files * Refacto * Fix Front * Persistence in localstorage * Expiration in Front * Working cleanup * Fixes + Translation * Bigger expiration Icon * Set to 24 hours * FilePreview on the Icons * Underscore (#125) * rate limiting for build * underscore * Password Recovery (#124) * Password Recovery * Translation Fix * Refacto decodeJWT + utils * Refacto 2 * Refacto utils part 2 * Schema Validation + Error handling * Added missing definition in resolver * graphql types updated * Changed Toast config (#126) * File list (#128) * Refactor: Update UserResolver and AuthContext for improved async handling and optional fields - Adjusted UserInfo fields to be nullable in UserResolver. - Enhanced async handling in AuthContext and related components. - Improved error handling in Form component. - Cleaned up imports and formatting across multiple files. * Refactor UI components and utility functions - Updated import statements to use consistent single quotes. - Refactored Select, Separator, Sheet, ShimmerButton, Switch, Tabs, and Tooltip components for improved readability and consistency. - Removed the old utility functions file and created a new global utility functions file. - Added new types for file handling and temporary links. - Enhanced drag-and-drop functionality with utility functions. - Cleaned up Layout and UploadPage components for better structure and readability. * Enhance FileCard and FileSection components with compact mode toggle; update Radix UI dependencies and improve file type handling --------- Co-authored-by: Etimo <gitimo@gmail.com> * TempLinks Limit (#130) * TempLink limit + Fixed Translations * Added acceptedFileTypes to TempLinkGenerator * Updated Common i18n * Resend Verify Code Button (#129) * Resend Code Button * underscore * Rework How it Works & About Pages (#131) * Reword How it Works * Rework About Page * Removed Like and Comment (#132) * Feat file expire cron (#134) * feat: add scheduled cleanup for expired resources and update dependencies - Implemented a daily cron job to clean up expired resources from the database and file system. - Added `node-cron` for scheduling tasks and `express-rate-limit` for rate limiting. - Updated `package.json` to include new dependencies and removed duplicates. - Refactored `ResourceResolver` to handle resource expiration and access control more effectively. - Enhanced error handling and logging for resource cleanup operations. - Updated frontend dependencies to their latest versions for improved stability and security. * feat: Enhance subscription and file upload features - Updated SubscriptionResolver to improve error messages for user and subscription not found. - Modified UserResolver to include subscription status in JWT token. - Updated frontend localization files to clarify file size limits for subscribed and non-subscribed users. - Enhanced FileUploader component to enforce file size limits based on subscription status. - Improved TempLinkGenerator to validate file size for non-subscribed users. - Integrated express-rate-limit middleware in storage API to manage upload and request limits. - Refactored multer configuration to include file type and size validation based on user subscription. - Added cleanup logic for expired temporary files in the storage API. - Implemented rate limiting for various routes in the storage API to prevent abuse. * FilePreview v2 (#133) * Updated FilePreviw + FileList * FileSection pagination and Fixes * Added Search Bar * Clear input added --------- Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> * Refactor generateUniqueFilename to use originalName directly and simplify custom name handling * Captcha for Sign Page (#138) * Captcha for Sign Page * Temporilarily Modified e2e test * Inverted logic for keys * Sort By File Type & Author (#136) * Added Audio preview * Filter by type and author * Fixed author filter * Removed useless logs * Antivirus Scan (#137) * Initialization * Working State * Improved UI/UX and translations * Mini fix * Removed useless files * MD5 Hash stored & Exposed on Front (#139) * md5file installed * MD5 Hash is stored and exposed in the UI * Fix lint * Email Code Expiration + fix resend email (#140) * Added the group selection in Front * Grouped Deletion * Drag to select * Grouped Sharing * ScrollBox + Improved drag to select + typo * Group Report * Group Export to ZIP + Removed Group Download * Fix Lint * Cleaning --------- Co-authored-by: niieeer <clement0201@icloud.com> Co-authored-by: Etimo <gitimo@gmail.com> Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> Co-authored-by: Etimo <86971633+Etimo285@users.noreply.github.com> * Fix/frontend build (#143) * fix: correct frontend Dockerfile for production build * fix: remove TypeScript check from frontend build to fix production build --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script (#144) Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Fix/frontend dockerfile (#145) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Fix/frontend dockerfile (#146) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile * feat: add production environment variables for frontend build --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Disable Recaptcha (#147) * Disable Recaptcha * error Lint * error Lint * Chore/final prod config (#148) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile * feat: add production environment variables for frontend build * chore: final production config with storage-api build fix --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * test (#149) * fix: resolve merge conflicts in Dockerfile and reCAPTCHA files --------- Co-authored-by: Daniel Lemos <118815455+Jeynox@users.noreply.github.com> Co-authored-by: niieeer <clement0201@icloud.com> Co-authored-by: Etimo <gitimo@gmail.com> Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> Co-authored-by: Etimo <86971633+Etimo285@users.noreply.github.com> Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Fix/resolve merge conflicts (#164) * Dev (#142) * Refactor file handling components and add FilePreview utility - Introduced FilePreview component for displaying file previews based on file type. - Updated FileCard and FileUploader to utilize FilePreview for better file representation. - Enhanced FileInfoDialog to include file previews. - Improved file type detection logic in fileUtils. - Streamlined imports and component structure across affected files. * Test 1 * Add PDF preview message and integrate translation in FilePreview component * Test 2 * Test 3 * Test 4 * Trad part 2 (#122) * rate limiting for build * autres trad * Revert "Fix Playwright" (#121) * Revert "Fix Playwright" * Test 1 * Test 2 * Test 3 * Test 4 * Test 5 * Test 6 * Trad part 2 (#123) * rate limiting for build * autres trad * oublie autres trad * Temporary Files Upload (#119) * Upload page reworked + Visuals for Temp File Gen * Temp Files * Refacto * Fix Front * Persistence in localstorage * Expiration in Front * Working cleanup * Fixes + Translation * Bigger expiration Icon * Set to 24 hours * FilePreview on the Icons * Underscore (#125) * rate limiting for build * underscore * Password Recovery (#124) * Password Recovery * Translation Fix * Refacto decodeJWT + utils * Refacto 2 * Refacto utils part 2 * Schema Validation + Error handling * Added missing definition in resolver * graphql types updated * Changed Toast config (#126) * File list (#128) * Refactor: Update UserResolver and AuthContext for improved async handling and optional fields - Adjusted UserInfo fields to be nullable in UserResolver. - Enhanced async handling in AuthContext and related components. - Improved error handling in Form component. - Cleaned up imports and formatting across multiple files. * Refactor UI components and utility functions - Updated import statements to use consistent single quotes. - Refactored Select, Separator, Sheet, ShimmerButton, Switch, Tabs, and Tooltip components for improved readability and consistency. - Removed the old utility functions file and created a new global utility functions file. - Added new types for file handling and temporary links. - Enhanced drag-and-drop functionality with utility functions. - Cleaned up Layout and UploadPage components for better structure and readability. * Enhance FileCard and FileSection components with compact mode toggle; update Radix UI dependencies and improve file type handling --------- Co-authored-by: Etimo <gitimo@gmail.com> * TempLinks Limit (#130) * TempLink limit + Fixed Translations * Added acceptedFileTypes to TempLinkGenerator * Updated Common i18n * Resend Verify Code Button (#129) * Resend Code Button * underscore * Rework How it Works & About Pages (#131) * Reword How it Works * Rework About Page * Removed Like and Comment (#132) * Feat file expire cron (#134) * feat: add scheduled cleanup for expired resources and update dependencies - Implemented a daily cron job to clean up expired resources from the database and file system. - Added `node-cron` for scheduling tasks and `express-rate-limit` for rate limiting. - Updated `package.json` to include new dependencies and removed duplicates. - Refactored `ResourceResolver` to handle resource expiration and access control more effectively. - Enhanced error handling and logging for resource cleanup operations. - Updated frontend dependencies to their latest versions for improved stability and security. * feat: Enhance subscription and file upload features - Updated SubscriptionResolver to improve error messages for user and subscription not found. - Modified UserResolver to include subscription status in JWT token. - Updated frontend localization files to clarify file size limits for subscribed and non-subscribed users. - Enhanced FileUploader component to enforce file size limits based on subscription status. - Improved TempLinkGenerator to validate file size for non-subscribed users. - Integrated express-rate-limit middleware in storage API to manage upload and request limits. - Refactored multer configuration to include file type and size validation based on user subscription. - Added cleanup logic for expired temporary files in the storage API. - Implemented rate limiting for various routes in the storage API to prevent abuse. * FilePreview v2 (#133) * Updated FilePreviw + FileList * FileSection pagination and Fixes * Added Search Bar * Clear input added --------- Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> * Refactor generateUniqueFilename to use originalName directly and simplify custom name handling * Captcha for Sign Page (#138) * Captcha for Sign Page * Temporilarily Modified e2e test * Inverted logic for keys * Sort By File Type & Author (#136) * Added Audio preview * Filter by type and author * Fixed author filter * Removed useless logs * Antivirus Scan (#137) * Initialization * Working State * Improved UI/UX and translations * Mini fix * Removed useless files * MD5 Hash stored & Exposed on Front (#139) * md5file installed * MD5 Hash is stored and exposed in the UI * Fix lint * Email Code Expiration + fix resend email (#140) * Added the group selection in Front * Grouped Deletion * Drag to select * Grouped Sharing * ScrollBox + Improved drag to select + typo * Group Report * Group Export to ZIP + Removed Group Download * Fix Lint * Cleaning --------- Co-authored-by: niieeer <clement0201@icloud.com> Co-authored-by: Etimo <gitimo@gmail.com> Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> Co-authored-by: Etimo <86971633+Etimo285@users.noreply.github.com> * Fix/frontend build (#143) * fix: correct frontend Dockerfile for production build * fix: remove TypeScript check from frontend build to fix production build --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script (#144) Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Fix/frontend dockerfile (#145) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Fix/frontend dockerfile (#146) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile * feat: add production environment variables for frontend build --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Disable Recaptcha (#147) * Disable Recaptcha * error Lint * error Lint * Chore/final prod config (#148) * chore: update production config with HTTPS ports, healthcheck fixes, and deployment script * fix: make .env file optional in frontend Dockerfile * feat: add production environment variables for frontend build * chore: final production config with storage-api build fix --------- Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * test (#149) * fix: resolve merge conflicts in Dockerfile and reCAPTCHA files --------- Co-authored-by: Daniel Lemos <118815455+Jeynox@users.noreply.github.com> Co-authored-by: niieeer <clement0201@icloud.com> Co-authored-by: Etimo <gitimo@gmail.com> Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> Co-authored-by: Etimo <86971633+Etimo285@users.noreply.github.com> Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> --------- Co-authored-by: Daniel Lemos <118815455+Jeynox@users.noreply.github.com> Co-authored-by: niieeer <clement0201@icloud.com> Co-authored-by: Etimo <gitimo@gmail.com> Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> Co-authored-by: Etimo <86971633+Etimo285@users.noreply.github.com> Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * Clean up Dockerfile by removing unused ARGs and ENV (#167) Removed environment variable setup for production build. * fix: finalize merge conflict resolution in ReCaptcha and Sign components --------- Co-authored-by: Daniel Lemos <118815455+Jeynox@users.noreply.github.com> Co-authored-by: niieeer <clement0201@icloud.com> Co-authored-by: Etimo <gitimo@gmail.com> Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> Co-authored-by: Etimo <86971633+Etimo285@users.noreply.github.com> Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net> * fix: finalize merge conflict resolution in ReCaptcha and Sign components (#171) --------- Co-authored-by: Daniel Lemos <118815455+Jeynox@users.noreply.github.com> Co-authored-by: niieeer <clement0201@icloud.com> Co-authored-by: Etimo <gitimo@gmail.com> Co-authored-by: Clément Beaudouin <85437955+niieeer@users.noreply.github.com> Co-authored-by: Etimo <86971633+Etimo285@users.noreply.github.com> Co-authored-by: Ubuntu <ubuntu@vps-cdddcab1.vps.ovh.net>
1 parent 8252587 commit 677697a

8 files changed

Lines changed: 72 additions & 49 deletions

File tree

.github/workflows/frontend.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@ on:
44
push:
55
paths:
66
- 'frontend/**'
7+
pull_request:
8+
paths:
9+
- 'frontend/**'
710

811
jobs:
912
lint:
1013
runs-on: ubuntu-latest
1114
steps:
1215
- name: Récupération du code
1316
uses: actions/checkout@v4
17+
with:
18+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
19+
fetch-depth: 0
1420

1521
- name: Installation des dépendances
1622
run: |

.github/workflows/prod-frontend.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,22 @@ on:
44
pull_request:
55
types: [closed]
66
branches: ["main"]
7+
push:
8+
branches: ["main"]
9+
paths:
10+
- 'frontend/**'
711

812
workflow_dispatch:
913

1014
jobs:
1115
build:
1216
runs-on: ubuntu-latest
17+
# Ne builder que si la PR a été mergée (pas juste fermée)
18+
if: github.event.pull_request.merged == true || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
1319
steps:
1420
- uses: actions/checkout@v2
21+
with:
22+
ref: ${{ github.event.pull_request.merge_commit_sha || github.ref }}
1523

1624
- uses: docker/login-action@v1
1725
name: Login to Docker Hub

backend/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@
4747
},
4848
"devDependencies": {
4949
"@faker-js/faker": "^9.6.0",
50-
<<<<<<< HEAD
51-
=======
5250
"@types/cors": "^2.8.17",
53-
>>>>>>> origin/dev
5451
"@types/form-data": "^2.5.2",
5552
"@types/jsonwebtoken": "^9.0.8",
5653
"@types/node": "^22.13.2",

backend/src/resolvers/UserResolver.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ import {
1111
calculateStoragePercentage,
1212
formatFileSize,
1313
} from '@/utils/storageUtils';
14-
<<<<<<< HEAD
15-
=======
1614
import { verifyRecaptchaToken } from '@/utils/recaptchaUtils';
17-
>>>>>>> origin/dev
1815
import * as argon2 from 'argon2';
1916
import { IsEmail, Length, Matches } from 'class-validator';
2017
import jwt, { Secret } from 'jsonwebtoken';

frontend/Dockerfile.prod

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
1-
FROM node:lts-alpine AS builder
1+
FROM node:22-alpine AS builder
2+
3+
# Mettre à jour npm vers la dernière version
4+
RUN npm install -g npm@latest
5+
6+
# Argument pour définir l'environnement (PROD, STAGING, DEV)
7+
ARG BUILD_ENV=PROD
8+
ENV VITE_ENVIRONMENT=${BUILD_ENV}
9+
10+
# Argument optionnel pour la clé reCAPTCHA
11+
ARG VITE_RECAPTCHA_SITE_KEY
12+
ENV VITE_RECAPTCHA_SITE_KEY=${VITE_RECAPTCHA_SITE_KEY}
13+
214
WORKDIR /app
315
COPY package.json package.json
416
COPY package-lock.json package-lock.json
517
# Retry npm install avec délai en cas d'erreur E429 (rate limiting)
618
RUN npm config set registry https://registry.npmjs.org/ && \
7-
for i in 1 2 3; do \
8-
npm ci && break || { \
9-
echo "npm install failed, attempt $i/3. Retrying in 30 seconds..." && \
10-
sleep 30; \
11-
} \
12-
done
19+
npm ci --verbose || { \
20+
echo "npm install failed, retrying..." && \
21+
sleep 30 && \
22+
npm ci --verbose; \
23+
}
1324
COPY public public
1425
COPY src src
1526
COPY codegen.ts codegen.ts
@@ -18,9 +29,19 @@ COPY tsconfig.app.json tsconfig.app.json
1829
COPY tsconfig.json tsconfig.json
1930
COPY tsconfig.node.json tsconfig.node.json
2031
COPY vite.config.ts vite.config.ts
21-
COPY .env.production .env
22-
# BUILD l'application
23-
RUN npm run build
32+
33+
# Créer le fichier .env avec les variables d'environnement
34+
RUN echo "VITE_ENVIRONMENT=${BUILD_ENV}" > .env && \
35+
if [ -n "${VITE_RECAPTCHA_SITE_KEY}" ]; then \
36+
echo "VITE_RECAPTCHA_SITE_KEY=${VITE_RECAPTCHA_SITE_KEY}" >> .env; \
37+
fi
38+
39+
# BUILD l'application avec logs détaillés
40+
RUN echo "Building with VITE_ENVIRONMENT=${BUILD_ENV}" && \
41+
echo "Building with VITE_RECAPTCHA_SITE_KEY=${VITE_RECAPTCHA_SITE_KEY:+***}" && \
42+
cat .env && \
43+
npm run build
44+
2445
# Stage 2: Servir avec nginx
2546
FROM nginx:alpine
2647
COPY --from=builder /app/dist /usr/share/nginx/html

frontend/src/components/ReCaptcha/ReCaptcha.tsx

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,12 @@ declare global {
2828
}
2929

3030
export const ReCAPTCHA = ({ onSuccess, onError }: ReCAPTCHAProps) => {
31-
<<<<<<< HEAD
32-
const { isDev } = useEnv();
33-
const testSiteKey = '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI';
34-
35-
const resolvedSiteKey =
36-
isDev
37-
=======
3831
const { isDev, isStaging } = useEnv();
3932
const testSiteKey = '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI';
4033

4134
// Utiliser la clé de test en dev, ou en staging si la clé n'est pas configurée
4235
const resolvedSiteKey =
4336
isDev || (isStaging && !import.meta.env?.VITE_RECAPTCHA_SITE_KEY)
44-
>>>>>>> origin/dev
4537
? testSiteKey
4638
: import.meta.env?.VITE_RECAPTCHA_SITE_KEY;
4739

@@ -56,7 +48,9 @@ export const ReCAPTCHA = ({ onSuccess, onError }: ReCAPTCHAProps) => {
5648
}
5749

5850
const scriptId = 'google-recaptcha-script';
59-
const existing = document.getElementById(scriptId) as HTMLScriptElement | null;
51+
const existing = document.getElementById(
52+
scriptId,
53+
) as HTMLScriptElement | null;
6054

6155
const onLoad = () => {
6256
setScriptLoaded(true);
@@ -65,11 +59,13 @@ export const ReCAPTCHA = ({ onSuccess, onError }: ReCAPTCHAProps) => {
6559
if (!existing) {
6660
const script = document.createElement('script');
6761
script.id = scriptId;
68-
script.src = 'https://www.google.com/recaptcha/api.js?render=explicit';
62+
script.src =
63+
'https://www.google.com/recaptcha/api.js?render=explicit';
6964
script.async = true;
7065
script.defer = true;
7166
script.onload = onLoad;
72-
script.onerror = () => onError?.(new Error('Failed to load reCAPTCHA script'));
67+
script.onerror = () =>
68+
onError?.(new Error('Failed to load reCAPTCHA script'));
7369
document.body.appendChild(script);
7470
} else if (existing && window.grecaptcha) {
7571
// Script already present and grecaptcha available
@@ -89,18 +85,21 @@ export const ReCAPTCHA = ({ onSuccess, onError }: ReCAPTCHAProps) => {
8985
// Wait until grecaptcha fully initializes (render is available)
9086
window.grecaptcha.ready(() => {
9187
try {
92-
const id = window.grecaptcha!.render(containerRef.current as HTMLDivElement, {
93-
sitekey: resolvedSiteKey,
94-
callback: (token: string) => {
95-
onSuccess(token);
96-
},
97-
'expired-callback': () => {
98-
onError?.(new Error('reCAPTCHA expired'));
99-
},
100-
'error-callback': () => {
101-
onError?.(new Error('reCAPTCHA error'));
88+
const id = window.grecaptcha!.render(
89+
containerRef.current as HTMLDivElement,
90+
{
91+
sitekey: resolvedSiteKey,
92+
callback: (token: string) => {
93+
onSuccess(token);
94+
},
95+
'expired-callback': () => {
96+
onError?.(new Error('reCAPTCHA expired'));
97+
},
98+
'error-callback': () => {
99+
onError?.(new Error('reCAPTCHA error'));
100+
},
102101
},
103-
});
102+
);
104103
setWidgetId(id);
105104
} catch {
106105
onError?.(new Error('Failed to initialize reCAPTCHA'));
@@ -127,4 +126,4 @@ export const ReCAPTCHA = ({ onSuccess, onError }: ReCAPTCHAProps) => {
127126
}
128127

129128
return <div ref={containerRef} />;
130-
};
129+
};

frontend/src/pages/Sign/sign.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,17 @@ const Sign = () => {
1212
const [isSubmitted, setIsSubmitted] = useState(false);
1313
const [userEmail, setUserEmail] = useState<string>('');
1414

15-
const handleSubmit = async (email: string, password: string, recaptchaToken?: string) => {
15+
const handleSubmit = async (
16+
email: string,
17+
password: string,
18+
recaptchaToken?: string,
19+
) => {
1620
try {
1721
const response = await register({
1822
variables: {
1923
data: { email, password },
2024
lang: i18n.language as 'fr' | 'en',
21-
<<<<<<< HEAD
22-
=======
2325
recaptchaToken,
24-
>>>>>>> origin/dev
2526
},
2627
});
2728
if (response.data?.register) {
@@ -45,11 +46,7 @@ const Sign = () => {
4546
title={t('auth.signup.title')}
4647
onSubmit={handleSubmit}
4748
loading={loading}
48-
<<<<<<< HEAD
49-
// requireCaptcha - temporairement désactivé
50-
=======
5149
requireCaptcha={true}
52-
>>>>>>> origin/dev
5350
links={
5451
<span>
5552
{t('auth.signup.links.terms')}{' '}

frontend/vite.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import react from '@vitejs/plugin-react';
33
import path from 'path';
44
import { defineConfig, UserConfig, loadEnv } from 'vite';
55

6-
import 'dotenv/config';
7-
86
// https://vite.dev/config/
97
export default defineConfig(({ mode }) => {
108
const env = loadEnv(mode, process.cwd(), '');

0 commit comments

Comments
 (0)