diff --git a/frontend/src/app/app.html b/frontend/src/app/app.html index ae848de..cc4a9ae 100644 --- a/frontend/src/app/app.html +++ b/frontend/src/app/app.html @@ -1,8 +1,7 @@
-
+
-
diff --git a/frontend/src/app/auth/login/login.html b/frontend/src/app/auth/login/login.html index 9a5814c..12eaa03 100644 --- a/frontend/src/app/auth/login/login.html +++ b/frontend/src/app/auth/login/login.html @@ -1,21 +1,35 @@ -
+
-
+
- +
-

Welcome Back

+

+ Welcome Back +

Sign in to continue to Post Assistant.

-
-
+
-
+
Don't have an account? - Register + Register

diff --git a/frontend/src/app/auth/register/register.html b/frontend/src/app/auth/register/register.html index 59d267b..8d35781 100644 --- a/frontend/src/app/auth/register/register.html +++ b/frontend/src/app/auth/register/register.html @@ -1,21 +1,35 @@ -
+
-
+
- +
-

Create Account

+

+ Create Account +

Join us and start using Post Assistant.

-
-
+
-
+
-
+
-
+
Already have an account? - Sign in + Sign in

diff --git a/frontend/src/app/chat/chat.html b/frontend/src/app/chat/chat.html index 2e84880..78f84b6 100644 --- a/frontend/src/app/chat/chat.html +++ b/frontend/src/app/chat/chat.html @@ -1,69 +1,72 @@ -
-
- @for (msg of messageStore.messages(); track msg.id) { +
+
+ @for (msg of messageStore.messages(); track msg.id) {
- {{ msg.attributes.content }} +
+ {{ msg.attributes.content }} +
+
+ {{ msg.attributes.createdAt | date:'shortTime' }} +
-
- {{ msg.attributes.createdAt | date:'shortTime' }} + } @if (messageStore.isLoading()) { +
+
+
+
+
+ } +
+ +
+ @if (errorMessage) { +
+ {{ errorMessage }} +
+ } + +
+ +
- } @if (messageStore.isLoading()) { -
-
-
-
-
- } -
- -
- @if (errorMessage) { -
- {{ errorMessage }} -
- } - -
- - -
+
diff --git a/frontend/src/app/chat/chat.ts b/frontend/src/app/chat/chat.ts index 2cf11c0..e8b8d2e 100644 --- a/frontend/src/app/chat/chat.ts +++ b/frontend/src/app/chat/chat.ts @@ -3,11 +3,12 @@ import { CommonModule } from '@angular/common'; import { FormControl, ReactiveFormsModule } from '@angular/forms'; import { ChatStore, MessageStore } from './chat.store'; import { ActivatedRoute } from '@angular/router'; +import { Sidebar } from "../core/layout/sidebar/sidebar"; @Component({ selector: 'app-chat', standalone: true, - imports: [CommonModule, ReactiveFormsModule], + imports: [CommonModule, ReactiveFormsModule, Sidebar], templateUrl: './chat.html', styleUrl: './chat.css', }) diff --git a/frontend/src/app/core/layout/sidebar/sidebar.html b/frontend/src/app/core/layout/sidebar/sidebar.html index 54fd5a6..62fc961 100644 --- a/frontend/src/app/core/layout/sidebar/sidebar.html +++ b/frontend/src/app/core/layout/sidebar/sidebar.html @@ -173,9 +173,10 @@
-
+
+ @if(authStore.isLoading()) { +

Loading...

+ } @else if(authStore.user() !== null){
@@ -205,6 +206,14 @@ d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /> + } @else{ + + Login to save chats + + }
diff --git a/frontend/src/app/core/layout/sidebar/sidebar.ts b/frontend/src/app/core/layout/sidebar/sidebar.ts index a43adac..3e2e442 100644 --- a/frontend/src/app/core/layout/sidebar/sidebar.ts +++ b/frontend/src/app/core/layout/sidebar/sidebar.ts @@ -2,6 +2,7 @@ import { Component, signal, computed, inject, OnInit } from '@angular/core'; import { CommonModule } from '@angular/common'; import { RouterModule } from '@angular/router'; import { ChatStore } from '../../../chat/chat.store'; +import { AuthStore } from '../../../auth/auth.store'; @Component({ selector: 'app-sidebar', @@ -12,6 +13,8 @@ import { ChatStore } from '../../../chat/chat.store'; }) export class Sidebar implements OnInit { protected chatStore = inject(ChatStore); + protected authStore = inject(AuthStore); + protected isOpen = signal(true); protected searchQuery = signal('');