-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
594 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
projects/gameboard-ui/src/app/support/support-page/support-page.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
<!-- Copyright 2021 Carnegie Mellon University. All Rights Reserved. --> | ||
<!-- Released under a MIT (SEI)-style license. See LICENSE.md in the project root for license information. --> | ||
|
||
<div class="mb-4"> | ||
<h1 class="support-header mb-0">Support</h1> | ||
<div class="mb-4 container"> | ||
<h1 class="support-header mb-0 pl-0">Support</h1> | ||
</div> | ||
|
||
<main class=" mb-4 pb-4"> | ||
|
||
<router-outlet></router-outlet> | ||
|
||
</main> | ||
|
||
<footer class="p-4 mt-4"></footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
...fications/components/admin-system-notifications/admin-system-notifications.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<ng-container> | ||
<h1 class="mt-3">Notifications</h1> | ||
|
||
<p> | ||
You can use the Notifications system to post general announcements to players. When they log in, they'll see | ||
a banner for each notification you create (as long as the date is within the start and end date you can | ||
optionally configure below). Once a player dismisses a notification, they won't see it again. | ||
</p> | ||
|
||
<div class="notification-controls-container my-4"> | ||
<div class="d-flex justify-content-end"> | ||
<button type="button" class="btn btn-lg btn-info" (click)="handleCreateNotificationClick()"> | ||
+ Create Notification | ||
</button> | ||
</div> | ||
|
||
<hr class="light" /> | ||
</div> | ||
|
||
<table class="mt-5"> | ||
<col> <!--notification text--> | ||
<col> <!--type--> | ||
<col> <!--dates--> | ||
<col> <!--views--> | ||
<col> <!--edit--> | ||
|
||
<thead class="thead-light"> | ||
<tr> | ||
<th scope="col">Notification</th> | ||
<th scope="col">Type</th> | ||
<th scope="col">Visible Dates</th> | ||
<th scope="col">Views</th> | ||
<th scope="col"></th> | ||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
<tr class="data-row" *ngFor="let notification of (notifications$ | async)"> | ||
<td class="notification-content-cell"> | ||
<div class="fs-11">{{notification.title}}</div> | ||
<p class="notification-content m-0">{{ notification.markdownContent }}</p> | ||
</td> | ||
|
||
<td> | ||
<span class="badge text-capitalize" | ||
[class.badge-info]="notification.notificationType == 'generalInfo'" | ||
[class.badge-warning]="notification.notificationType == 'warning'" | ||
[class.badge-danger]="notification.notificationType == 'emergency'"> | ||
{{notification.notificationType | systemNotificationTypeToText}} | ||
</span> | ||
</td> | ||
|
||
<td> | ||
<span *ngIf="notification.startsOn || notification.endsOn; else noValue"> | ||
{{ notification.startsOn ? (notification.startsOn | shortdate ) : "?" }} | ||
- | ||
{{ notification.endsOn ? (notification.endsOn | shortdate ) : "?" }} | ||
</span> | ||
</td> | ||
|
||
<td> | ||
<div><strong>{{notification.calloutViewCount}}</strong> callout views</div> | ||
<div><strong>{{notification.fullViewCount}}</strong> full views</div> | ||
</td> | ||
|
||
<td> | ||
<button type="button" class="btn btn-sm btn-info mr-2" | ||
(click)="handleEditNotificationClick(notification)">Edit</button> | ||
<app-confirm-button btnClass="btn btn-sm btn-danger" | ||
(confirm)="handleDelete(notification.id)">Delete</app-confirm-button> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</ng-container> | ||
|
||
<ng-template #noNotifications> | ||
<p class="text-center">You haven't created any notifications yet. Use the button above to add one!</p> | ||
</ng-template> | ||
|
||
<ng-template #noValue> | ||
<p class="text-center">--</p> | ||
</ng-template> |
20 changes: 20 additions & 0 deletions
20
...fications/components/admin-system-notifications/admin-system-notifications.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.notification-content-cell { | ||
width: 35%; | ||
} | ||
|
||
.notification-content { | ||
color: #bababa; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
max-width: 35vw; | ||
} | ||
|
||
td, th { | ||
margin: 4px 0; | ||
border-bottom: solid 1px #dedede; | ||
} | ||
|
||
tbody td { | ||
padding: 4px; | ||
} |
Oops, something went wrong.