From 1e9f70d552f6ae9719d484c5ec6ca9476b49cd37 Mon Sep 17 00:00:00 2001 From: Hari Date: Tue, 24 Feb 2026 13:19:40 +0530 Subject: [PATCH 1/6] added the backend for gmail integration --- frontend/src/app/app.config.ts | 4 +- .../gmail-setup-modal.component.html | 9 + .../gmail-setup-modal.component.ts | 5 + .../components/landing/landing.component.html | 70 +++++-- .../components/privacy/privacy.component.html | 172 +++++++++++------- .../components/profile/profile.component.html | 40 ++++ .../components/profile/profile.component.ts | 29 +++ frontend/src/app/services/auth.service.ts | 9 + frontend/src/index.html | 1 + 9 files changed, 253 insertions(+), 86 deletions(-) diff --git a/frontend/src/app/app.config.ts b/frontend/src/app/app.config.ts index 3b9c73b..3d2e1fc 100644 --- a/frontend/src/app/app.config.ts +++ b/frontend/src/app/app.config.ts @@ -1,5 +1,5 @@ import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; -import { provideRouter } from '@angular/router'; +import { provideRouter, withInMemoryScrolling } from '@angular/router'; import { routes } from './app.routes'; import { provideHttpClient, withInterceptors } from '@angular/common/http'; @@ -8,7 +8,7 @@ import { authInterceptor } from './core/interceptors/auth.interceptor'; export const appConfig: ApplicationConfig = { providers: [ provideZoneChangeDetection({ eventCoalescing: true }), - provideRouter(routes), + provideRouter(routes, withInMemoryScrolling({ scrollPositionRestoration: 'enabled' })), provideHttpClient(withInterceptors([authInterceptor])), ], }; diff --git a/frontend/src/app/components/gmail-setup-modal/gmail-setup-modal.component.html b/frontend/src/app/components/gmail-setup-modal/gmail-setup-modal.component.html index db4331d..a4cc650 100644 --- a/frontend/src/app/components/gmail-setup-modal/gmail-setup-modal.component.html +++ b/frontend/src/app/components/gmail-setup-modal/gmail-setup-modal.component.html @@ -14,6 +14,15 @@

Gmail Sync Setup

+
+

Gmail Automation

+

No more manual forwarding. Connect your Gmail to track jobs automatically.

+ + +
diff --git a/frontend/src/app/components/gmail-setup-modal/gmail-setup-modal.component.ts b/frontend/src/app/components/gmail-setup-modal/gmail-setup-modal.component.ts index ae4201d..07a5bfc 100644 --- a/frontend/src/app/components/gmail-setup-modal/gmail-setup-modal.component.ts +++ b/frontend/src/app/components/gmail-setup-modal/gmail-setup-modal.component.ts @@ -43,6 +43,11 @@ export class GmailSetupModalComponent { window.open(`https://mail.google.com/mail/u/0/#search/${encodedQuery}`, '_blank'); } + connectGmail() { + // Redirect to your backend which then redirects to Google + window.location.href = `${environment.apiBaseUrl}/api/auth/connect/gmail`; +} + close() { this.onClose.emit(); setTimeout(() => this.activeStep.set(1), 300); diff --git a/frontend/src/app/components/landing/landing.component.html b/frontend/src/app/components/landing/landing.component.html index caf4bb4..6d640da 100644 --- a/frontend/src/app/components/landing/landing.component.html +++ b/frontend/src/app/components/landing/landing.component.html @@ -137,23 +137,63 @@

Zero Latency

-