From 91143a497be7830c150c25c20e9a952f769be420 Mon Sep 17 00:00:00 2001 From: Till-JS <101404291+Till-JS@users.noreply.github.com> Date: Thu, 29 Jan 2026 13:30:37 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(questions):=20unify=20auth=20p?= =?UTF-8?q?ages=20with=20shared=20components?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add Questions branding to shared-branding package (logo, colors) - Create QuestionsLogo.svelte component - Refactor login page to use shared LoginPage component - Refactor register page to use shared RegisterPage component - Refactor forgot-password page to use shared ForgotPasswordPage component - Fix Svelte 5 class: directive on components (+page.svelte) The Questions app now uses the same auth UI as Calendar, Chat, and other apps. --- .../apps/web/src/routes/(app)/+page.svelte | 5 +- .../(auth)/forgot-password/+page.svelte | 95 +++-------- .../web/src/routes/(auth)/login/+page.svelte | 113 ++++++-------- .../src/routes/(auth)/register/+page.svelte | 147 ++++-------------- packages/shared-branding/src/config.ts | 13 ++ packages/shared-branding/src/index.ts | 1 + .../src/logos/QuestionsLogo.svelte | 13 ++ packages/shared-branding/src/logos/index.ts | 1 + packages/shared-branding/src/types.ts | 3 +- 9 files changed, 136 insertions(+), 255 deletions(-) create mode 100644 packages/shared-branding/src/logos/QuestionsLogo.svelte diff --git a/apps/questions/apps/web/src/routes/(app)/+page.svelte b/apps/questions/apps/web/src/routes/(app)/+page.svelte index dcf246626..5895f197c 100644 --- a/apps/questions/apps/web/src/routes/(app)/+page.svelte +++ b/apps/questions/apps/web/src/routes/(app)/+page.svelte @@ -142,8 +142,9 @@
diff --git a/apps/questions/apps/web/src/routes/(auth)/forgot-password/+page.svelte b/apps/questions/apps/web/src/routes/(auth)/forgot-password/+page.svelte index 08f34d5da..58d6e3a57 100644 --- a/apps/questions/apps/web/src/routes/(auth)/forgot-password/+page.svelte +++ b/apps/questions/apps/web/src/routes/(auth)/forgot-password/+page.svelte @@ -1,81 +1,30 @@ -
-
-

Reset Password

-

Enter your email to receive a reset link

-
+ + {translations.titleForm} | Questions + - {#if success} -
-
📧
-

Check your email

-

- We've sent a password reset link to {email}. Please check your inbox. -

- Back to login -
- {:else} -
- {#if error} -
- {error} -
- {/if} - -
- - -
- - -
- -
- - - Back to login - -
- {/if} -
+ diff --git a/apps/questions/apps/web/src/routes/(auth)/login/+page.svelte b/apps/questions/apps/web/src/routes/(auth)/login/+page.svelte index 97e32d1b0..053068445 100644 --- a/apps/questions/apps/web/src/routes/(auth)/login/+page.svelte +++ b/apps/questions/apps/web/src/routes/(auth)/login/+page.svelte @@ -1,81 +1,64 @@ -
-
-

Questions

-

Sign in to your account

-
+ + {translations.title} | Questions + -
- {#if error} -
- {error} -
- {/if} - -
- - -
- -
- - -
- - -
- - -
+ diff --git a/apps/questions/apps/web/src/routes/(auth)/register/+page.svelte b/apps/questions/apps/web/src/routes/(auth)/register/+page.svelte index af668cd9c..0cc35bc43 100644 --- a/apps/questions/apps/web/src/routes/(auth)/register/+page.svelte +++ b/apps/questions/apps/web/src/routes/(auth)/register/+page.svelte @@ -1,125 +1,44 @@ -
-
-

Questions

-

Create your account

-
+ + {translations.title} | Questions + - {#if needsVerification} -
-
📧
-

Check your email

-

- We've sent a verification link to {email}. Please check your inbox and - click the link to verify your account. -

- Back to login -
- {:else} -
- {#if error} -
- {error} -
- {/if} - -
- - -
- -
- - -
- -
- - -
- - -
- -
- Already have an account? - Sign in -
- {/if} -
+ diff --git a/packages/shared-branding/src/config.ts b/packages/shared-branding/src/config.ts index 3c82ae55b..f887053a6 100644 --- a/packages/shared-branding/src/config.ts +++ b/packages/shared-branding/src/config.ts @@ -220,6 +220,19 @@ export const APP_BRANDING: Record = { logoStroke: true, logoStrokeWidth: 1.5, }, + questions: { + id: 'questions', + name: 'Questions', + tagline: 'AI Research Assistant', + primaryColor: '#8b5cf6', + secondaryColor: '#a78bfa', + // Question mark / search icon + logoPath: + 'M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z', + logoViewBox: '0 0 24 24', + logoStroke: true, + logoStrokeWidth: 1.5, + }, }; /** diff --git a/packages/shared-branding/src/index.ts b/packages/shared-branding/src/index.ts index 17edd5fc0..5338cae9d 100644 --- a/packages/shared-branding/src/index.ts +++ b/packages/shared-branding/src/index.ts @@ -31,6 +31,7 @@ export { MoodlitLogo, InventoryLogo, ClockLogo, + QuestionsLogo, } from './logos'; // Configuration diff --git a/packages/shared-branding/src/logos/QuestionsLogo.svelte b/packages/shared-branding/src/logos/QuestionsLogo.svelte new file mode 100644 index 000000000..e78903d05 --- /dev/null +++ b/packages/shared-branding/src/logos/QuestionsLogo.svelte @@ -0,0 +1,13 @@ + + + diff --git a/packages/shared-branding/src/logos/index.ts b/packages/shared-branding/src/logos/index.ts index 3bc5d22df..6dc45069f 100644 --- a/packages/shared-branding/src/logos/index.ts +++ b/packages/shared-branding/src/logos/index.ts @@ -18,3 +18,4 @@ export { default as MailLogo } from './MailLogo.svelte'; export { default as MoodlitLogo } from './MoodlitLogo.svelte'; export { default as InventoryLogo } from './InventoryLogo.svelte'; export { default as ClockLogo } from './ClockLogo.svelte'; +export { default as QuestionsLogo } from './QuestionsLogo.svelte'; diff --git a/packages/shared-branding/src/types.ts b/packages/shared-branding/src/types.ts index 420cba292..ce19459be 100644 --- a/packages/shared-branding/src/types.ts +++ b/packages/shared-branding/src/types.ts @@ -18,7 +18,8 @@ export type AppId = | 'todo' | 'mail' | 'moodlit' - | 'inventory'; + | 'inventory' + | 'questions'; /** * App branding configuration