Skip to content

Commit

Permalink
Update project title and favicon (CS3219-AY2425S1#84)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
limcaaarl and samuelim01 authored Nov 7, 2024
1 parent 517f526 commit 1794597
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
Binary file modified frontend/public/favicon.ico
Binary file not shown.
Binary file modified frontend/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion frontend/src/app/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h3 class="m-0">Active Sessions</h3>
<div
class="flex flex-column w-full align-items-center justify-content-center px-4 pb-0 pt-2">
<div>
<p>You currently have no active sessions.</p>
<p>{{ message }}</p>
</div>
</div>
</ng-template>
Expand Down
9 changes: 8 additions & 1 deletion frontend/src/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export class HomeComponent implements OnInit, OnDestroy {
activeSessions: RoomData[] = [];
difficultyLevels = DifficultyLevels;
userId!: string;
message!: string;

constructor(
private collabService: CollabService,
Expand Down Expand Up @@ -70,12 +71,18 @@ export class HomeComponent implements OnInit, OnDestroy {
this.collabService.getRoomsWithQuery(true, false).subscribe({
next: response => {
this.activeSessions = Array.isArray(response.data) ? response.data : [];
if (this.activeSessions.length == 0) {
this.message = 'You currently have no active sessions.';
}
},
error: () => {
this.loading = false;
this.message = 'Unable to retrieve session data. Please try again later.';

this.messageService.add({
severity: 'error',
summary: 'Error',
detail: 'Failed to retrieve room data',
detail: this.message,
life: 3000,
});
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Frontend</title>
<title>PeerPrep</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
Expand Down

0 comments on commit 1794597

Please sign in to comment.