Open sgempi opened 2 weeks ago
The pull request introduces significant enhancements to session management and subscription handling within the backend application. A new subscription endpoint is added to process user subscription requests, and session management is refactored for improved reusability. Additionally, TypeScript definitions are updated to support new properties related to subscriptions and user settings. The frontend is enhanced with new components and features to manage offline states, service worker registration, and installation prompts, along with updates to localization files to support these features.
File | Change Summary |
---|---|
backend/app.ts |
Added a reusable sessionStore variable and a new POST endpoint /subscribe for handling subscriptions. |
backend/express-session.d.ts |
Extended SessionData interface to include optional subscription and passport properties. |
backend/mail/mail.ts |
Integrated sendPushNotification function into sendMail , allowing push notifications to be sent alongside emails. |
backend/models/user.ts |
Added showInstallBanner field to settings in userSchema . |
backend/package.json |
Added web-push and @types/web-push dependencies. |
backend/push.ts |
Introduced functions for sending push notifications and managing user sessions. |
backend/server.ts |
Added VITE_PUBLIC_VAPID_KEY and VITE_PRIVATE_VAPID_KEY to environment variables. |
common/forms/user.json |
Added showInstallBanner property to the settings schema. |
common/locales/de.json |
Updated with new keys for installation prompts and reload instructions. |
common/locales/en.json |
Similar updates as the German localization, enhancing installation instructions. |
common/types.ts |
Introduced Subscription type and updated User interface to include showInstallBanner . |
docker-compose.yml |
Updated Dockerfile paths for ldap , inbucket , and mongo-express services to use a static reference. |
frontend/Dockerfile.development |
Integrated Nginx into the frontend Dockerfile for development. |
frontend/index.html |
Added link to manifest.json and script for service worker registration. |
frontend/package.json |
Updated dev and build scripts; added nodemon and vite-plugin-pwa dependencies. |
frontend/src/App.vue |
Enhanced user experience with offline status handling and installation prompts. |
frontend/src/components/HomePage.vue |
Added conditional disabling of buttons based on offline status. |
frontend/src/components/elements/Installation.vue |
Created a component for displaying installation instructions for mobile users. |
frontend/src/components/elements/OfflineBanner.vue |
Introduced a banner to indicate offline status to users. |
frontend/src/components/elements/PaginationList.vue |
Added data fetching logic based on online status. |
frontend/src/components/travel/TravelPage.vue |
Updated form elements to disable when offline. |
frontend/src/components/travel/elements/TravelApplication.vue |
Added disabled state to buttons based on offline status. |
frontend/src/env.d.ts |
Added VITE_PUBLIC_VAPID_KEY to environment variable definitions. |
frontend/src/main.ts |
Augmented Vue's global properties with new boolean states. |
frontend/src/manifest.json |
Created a new manifest file for PWA functionality. |
frontend/src/registerSW.ts |
Implemented service worker registration and update handling. |
frontend/src/router.ts |
Modified authentication logic to allow offline users to bypass checks. |
frontend/sw.ts |
Implemented service worker with caching and offline capabilities. |
frontend/vite.config.ts |
Added vite-plugin-pwa to enhance PWA capabilities. |
🐰 "In the code, a new path we weave,
With subscriptions and banners, we believe.
Push notifications, oh what a delight,
For users to stay connected, day and night.
So hop along, let’s celebrate this cheer,
With every change, our goals are near!" 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
fixes #64
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Documentation
Chores
These changes aim to enhance user experience, improve functionality, and ensure better communication with users regarding app status and updates.