Skip to content

Commit 1794597

Browse files
Update project title and favicon (#84)
* Update project title and favicon * Update error message for homepage * Update favicon file type - Changed from .png to .ico * Rename errorMessage --------- Co-authored-by: Samuel Lim <[email protected]>
1 parent 517f526 commit 1794597

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

frontend/public/favicon.ico

181 KB
Binary file not shown.

frontend/public/logo.png

-5.1 KB
Loading

frontend/src/app/home/home.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ <h3 class="m-0">Active Sessions</h3>
8181
<div
8282
class="flex flex-column w-full align-items-center justify-content-center px-4 pb-0 pt-2">
8383
<div>
84-
<p>You currently have no active sessions.</p>
84+
<p>{{ message }}</p>
8585
</div>
8686
</div>
8787
</ng-template>

frontend/src/app/home/home.component.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export class HomeComponent implements OnInit, OnDestroy {
2525
activeSessions: RoomData[] = [];
2626
difficultyLevels = DifficultyLevels;
2727
userId!: string;
28+
message!: string;
2829

2930
constructor(
3031
private collabService: CollabService,
@@ -70,12 +71,18 @@ export class HomeComponent implements OnInit, OnDestroy {
7071
this.collabService.getRoomsWithQuery(true, false).subscribe({
7172
next: response => {
7273
this.activeSessions = Array.isArray(response.data) ? response.data : [];
74+
if (this.activeSessions.length == 0) {
75+
this.message = 'You currently have no active sessions.';
76+
}
7377
},
7478
error: () => {
79+
this.loading = false;
80+
this.message = 'Unable to retrieve session data. Please try again later.';
81+
7582
this.messageService.add({
7683
severity: 'error',
7784
summary: 'Error',
78-
detail: 'Failed to retrieve room data',
85+
detail: this.message,
7986
life: 3000,
8087
});
8188
},

frontend/src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<title>Frontend</title>
5+
<title>PeerPrep</title>
66
<base href="/" />
77
<meta name="viewport" content="width=device-width, initial-scale=1" />
88
<link rel="icon" type="image/x-icon" href="favicon.ico" />

0 commit comments

Comments
 (0)