diff --git a/src/app/chat/chat/channel-list/channel-entry/channel-entry.component.ts b/src/app/chat/chat/channel-list/channel-entry/channel-entry.component.ts
index 14395ec..434ad5e 100644
--- a/src/app/chat/chat/channel-list/channel-entry/channel-entry.component.ts
+++ b/src/app/chat/chat/channel-list/channel-entry/channel-entry.component.ts
@@ -8,7 +8,7 @@ import { Channel } from '../../../../models/channel';
styleUrl: './channel-entry.component.scss'
})
export class ChannelEntryComponent implements OnChanges {
- public readonly NOTIFICATION_LIMIT: number = 2;
+ public readonly NOTIFICATION_LIMIT: number = 10;
@Input("channel") public channel!: Channel;
@Input("selected") public selected!: boolean;
diff --git a/src/app/chat/chat/feed/message/message.component.html b/src/app/chat/chat/feed/message/message.component.html
index 4bcbfaf..cc5975b 100644
--- a/src/app/chat/chat/feed/message/message.component.html
+++ b/src/app/chat/chat/feed/message/message.component.html
@@ -2,10 +2,15 @@
+
+
{{this.message.content}}
+
\ No newline at end of file
diff --git a/src/app/chat/chat/feed/message/message.component.ts b/src/app/chat/chat/feed/message/message.component.ts
index e9686ae..61d8add 100644
--- a/src/app/chat/chat/feed/message/message.component.ts
+++ b/src/app/chat/chat/feed/message/message.component.ts
@@ -1,5 +1,6 @@
-import { Component, Input } from '@angular/core';
+import { Component, HostListener, Input } from '@angular/core';
import { Message } from '../../../../models/message';
+import { UserService } from '../../../../services/user.service';
@Component({
selector: 'app-message',
@@ -10,7 +11,20 @@ import { Message } from '../../../../models/message';
export class MessageComponent {
@Input('message') public message!: Message;
- public getMessageDateFormat(): string {
+ public userStatus?: string;
+
+ constructor(private userService: UserService) { }
+
+ @HostListener('mouseenter')
+ private getStatus(): void {
+ if (!this.userStatus) {
+ this.userService.GetUser(this.message.sender_name).subscribe({
+ next: user => this.userStatus = user.status
+ });
+ }
+ }
+
+ public GetMessageDateFormat(): string {
return (new Date().getDay() == this.message.time.getDay()) ? 'HH:mm' : 'MMM d, HH:mm';
}
}
diff --git a/src/app/user/user/user.component.html b/src/app/user/user/user.component.html
index 25e65f4..44b37d6 100644
--- a/src/app/user/user/user.component.html
+++ b/src/app/user/user/user.component.html
@@ -22,7 +22,8 @@
-
+
+
{{'@'}}{{this.user?.username}}
Status
diff --git a/src/app/user/user/user.component.scss b/src/app/user/user/user.component.scss
index fbd3b7b..ba68f26 100644
--- a/src/app/user/user/user.component.scss
+++ b/src/app/user/user/user.component.scss
@@ -19,6 +19,7 @@ mat-card {
img {
width: 30%;
+ height: auto;
aspect-ratio: 1;
border-radius: 50%;
border: 2px solid var(--mat-sys-on-surface);
@@ -27,6 +28,7 @@ mat-card {
text-align: center;
}
+
h1 {
margin: auto;
}
@@ -43,7 +45,7 @@ mat-card {
* {
width: 100%;
- }
+ }
button {
display: block;