-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Slack Invitation in Nav Sidebar (#257)
Users are now able to join the XL Slack via the sidebar, with community agreement opt-in. Additionally, this links to the GitHub project of the CSXL website. --------- Co-authored-by: Kris Jordan <[email protected]>
- Loading branch information
1 parent
5e506dc
commit 93b4320
Showing
11 changed files
with
227 additions
and
46 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
12 changes: 12 additions & 0 deletions
12
frontend/src/app/navigation/widgets/slack-invite-box/slack-invite-box.widget.css
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,12 @@ | ||
.slack-dialog { | ||
max-width: 100%; | ||
max-height: 90vh; | ||
overflow: auto; | ||
scroll-behavior: auto; | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
.slack-dialog { | ||
color: white; | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
frontend/src/app/navigation/widgets/slack-invite-box/slack-invite-box.widget.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,55 @@ | ||
<mat-card class="slack-dialog" appearance="outlined" #dialogContainer> | ||
<mat-card-content class="content-container"> | ||
<h2>Join the CS Experience Labs' Slack Community</h2> | ||
<p> | ||
The CSXL Slack to get updates about the XL, learn about new opportunities | ||
for CS students, and connect with fellow CS majors! | ||
</p> | ||
<h3>XL Slack Community Agreements</h3> | ||
<p> | ||
Please read and accept the following expectations of the XL Slack | ||
Community: | ||
</p> | ||
<p> | ||
<mat-checkbox [(ngModel)]="realName" | ||
>I will use my <strong>real first and last names</strong> in my XL Slack | ||
Profile.</mat-checkbox | ||
> | ||
</p> | ||
<p> | ||
<mat-checkbox [(ngModel)]="profilePicture" | ||
>I will add set my <strong>profile picture</strong> to | ||
<strong>include my face</strong>, and <em>no one else's face</em>, upon | ||
joining.</mat-checkbox | ||
> | ||
</p> | ||
<p> | ||
<mat-checkbox [(ngModel)]="communityStandards" | ||
>I will abide by the rules and standards detailed in the | ||
<strong>CSXL Community Standards Agreement</strong>.</mat-checkbox | ||
> | ||
</p> | ||
<p> | ||
<mat-checkbox [(ngModel)]="fAroundFindOut" | ||
>I understand my | ||
<strong>failure to comply to these community standards</strong> may | ||
result in <strong>being removed from the XL Slack community</strong> and | ||
<strong>unable to make use of CS XL facilities</strong> in Sitterson | ||
Hall and the Fred Brooks Building.</mat-checkbox | ||
> | ||
</p> | ||
<mat-card-actions align="end"> | ||
<button | ||
mat-button | ||
(click)="openSlackInvite()" | ||
*ngIf="acceptAll; else pleaseAcceptAll"> | ||
Join the XL Slack | ||
</button> | ||
<ng-template #pleaseAcceptAll> | ||
<button mat-button disabled="disabled"> | ||
Accept All XL Slack Community Agreements to Join | ||
</button> | ||
</ng-template> | ||
</mat-card-actions> | ||
</mat-card-content> | ||
</mat-card> |
31 changes: 31 additions & 0 deletions
31
frontend/src/app/navigation/widgets/slack-invite-box/slack-invite-box.widget.ts
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,31 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'slack-invite-box', | ||
templateUrl: './slack-invite-box.widget.html', | ||
styleUrls: ['./slack-invite-box.widget.css'] | ||
}) | ||
export class SlackInviteBox { | ||
public realName: boolean = false; | ||
public profilePicture: boolean = false; | ||
public communityStandards: boolean = false; | ||
public fAroundFindOut: boolean = false; | ||
|
||
public get acceptAll(): boolean { | ||
return ( | ||
this.realName && | ||
this.profilePicture && | ||
this.communityStandards && | ||
this.fAroundFindOut | ||
); | ||
} | ||
|
||
constructor() {} | ||
|
||
public openSlackInvite() { | ||
window.open( | ||
'https://join.slack.com/t/csxl/shared_invite/zt-1mvfaiqme-fXXw9cKjaXOfhXVBfgXVCA', | ||
'_blank' | ||
); | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.