-
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.
- Loading branch information
1 parent
d75eeb6
commit 891b2bf
Showing
8 changed files
with
106 additions
and
77 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,99 @@ | ||
<form [formGroup]="profileForm" (ngSubmit)="onSubmit()"> | ||
<mat-card appearance="outlined"> | ||
<mat-card-header *ngIf="profile.id; else registration"> | ||
<mat-card-title>Update your Profile</mat-card-title> | ||
</mat-card-header> | ||
<ng-template #registration> | ||
<mat-card-header> | ||
<mat-card-title>Welcome to CSXL! Please verify and complete your profile | ||
below.</mat-card-title> | ||
<mat-card-subtitle> | ||
Once your profile is setup you will be able to take advantage of CSXL | ||
initiatives such as enrolling in workshops, reserving a desk during | ||
coworking hours, and more! | ||
</mat-card-subtitle> | ||
</mat-card-header> | ||
</ng-template> | ||
<mat-card-content> | ||
<mat-form-field appearance="outline"> | ||
<mat-label>First Name</mat-label> | ||
<input matInput placeholder="Jane" formControlName="first_name" name="first_name" required /> | ||
</mat-form-field> | ||
<mat-form-field appearance="outline"> | ||
<mat-label>Last Name</mat-label> | ||
<input matInput placeholder="Doe" formControlName="last_name" name="last_name" required /> | ||
</mat-form-field> | ||
<mat-form-field appearance="outline"> | ||
<mat-label>UNC Email</mat-label> | ||
<input matInput type="email" placeholder="[email protected]" formControlName="email" name="email" | ||
required /> | ||
<mat-error *ngIf="profileForm.value.email">Must provide a valid UNC email address.</mat-error> | ||
</mat-form-field> | ||
<mat-form-field appearance="outline"> | ||
<mat-label>Pronouns</mat-label> | ||
<input matInput placeholder="she / her / hers" formControlName="pronouns" name="pronouns" required /> | ||
</mat-form-field> | ||
</mat-card-content> | ||
<mat-card-actions> | ||
<button mat-stroked-button type="submit" [disabled]="profileForm.invalid"> | ||
SAVE | ||
</button> | ||
</mat-card-actions> | ||
</mat-card> | ||
<mat-card appearance="outlined"> | ||
<mat-card-header *ngIf="profile.id; else registration"> | ||
<mat-card-title>Update your Profile</mat-card-title> | ||
</mat-card-header> | ||
<ng-template #registration> | ||
<mat-card-header> | ||
<mat-card-title | ||
>Welcome to CSXL! Please verify and complete your profile | ||
below.</mat-card-title | ||
> | ||
<mat-card-subtitle> | ||
Once your profile is setup you will be able to take advantage of CSXL | ||
initiatives such as enrolling in workshops, reserving a desk during | ||
coworking hours, and more! | ||
</mat-card-subtitle> | ||
</mat-card-header> | ||
</ng-template> | ||
<mat-card-content> | ||
<mat-form-field appearance="outline"> | ||
<mat-label>First Name</mat-label> | ||
<input | ||
matInput | ||
placeholder="Jane" | ||
formControlName="first_name" | ||
name="first_name" | ||
required /> | ||
</mat-form-field> | ||
<mat-form-field appearance="outline"> | ||
<mat-label>Last Name</mat-label> | ||
<input | ||
matInput | ||
placeholder="Doe" | ||
formControlName="last_name" | ||
name="last_name" | ||
required /> | ||
</mat-form-field> | ||
<mat-form-field appearance="outline"> | ||
<mat-label>UNC Email</mat-label> | ||
<input | ||
matInput | ||
type="email" | ||
placeholder="[email protected]" | ||
formControlName="email" | ||
name="email" | ||
required /> | ||
<mat-error *ngIf="profileForm.value.email" | ||
>Must provide a valid UNC email address.</mat-error | ||
> | ||
</mat-form-field> | ||
<mat-form-field appearance="outline"> | ||
<mat-label>Pronouns</mat-label> | ||
<input | ||
matInput | ||
placeholder="she / her / hers" | ||
formControlName="pronouns" | ||
name="pronouns" | ||
required /> | ||
</mat-form-field> | ||
</mat-card-content> | ||
<mat-card-actions> | ||
<button mat-stroked-button type="submit" [disabled]="profileForm.invalid"> | ||
Save | ||
</button> | ||
</mat-card-actions> | ||
</mat-card> | ||
</form> | ||
|
||
<mat-card *ngIf="profile.id" appearance="outlined"> | ||
<div *ngIf="profile.github !== ''; else associate_github"> | ||
<mat-card-header> | ||
<img mat-card-avatar [src]="profile.github_avatar" /> | ||
<mat-card-title>GitHub / | ||
<a id="github_link" href="https://github.com/{{ profile.github }}" target="_blank"> | ||
{{ profile.github }} | ||
</a></mat-card-title> | ||
</mat-card-header> | ||
<mat-card-actions> | ||
<button mat-stroked-button (click)="unlinkGitHub()">Unlink GitHub</button> | ||
</mat-card-actions> | ||
</div> | ||
<ng-template #associate_github> | ||
<mat-card-header> | ||
<mat-card-title>Link Your GitHub Account</mat-card-title> | ||
</mat-card-header> | ||
<mat-card-actions> | ||
<button mat-stroked-button (click)="linkWithGitHub()"> | ||
Link with GitHub | ||
</button> | ||
</mat-card-actions> | ||
</ng-template> | ||
<div *ngIf="profile.github !== ''; else associate_github"> | ||
<mat-card-header> | ||
<img mat-card-avatar [src]="profile.github_avatar" /> | ||
<mat-card-title | ||
>GitHub / | ||
<a | ||
id="github_link" | ||
href="https://github.com/{{ profile.github }}" | ||
target="_blank"> | ||
{{ profile.github }} | ||
</a></mat-card-title | ||
> | ||
</mat-card-header> | ||
<mat-card-actions> | ||
<button mat-stroked-button (click)="unlinkGitHub()">Unlink GitHub</button> | ||
</mat-card-actions> | ||
</div> | ||
<ng-template #associate_github> | ||
<mat-card-header> | ||
<mat-card-title>Link Your GitHub Account</mat-card-title> | ||
</mat-card-header> | ||
<mat-card-actions> | ||
<button mat-stroked-button (click)="linkWithGitHub()"> | ||
Link with GitHub | ||
</button> | ||
</mat-card-actions> | ||
</ng-template> | ||
</mat-card> | ||
|
||
<mat-card *ngIf="profile.id" appearance="outlined"> | ||
|
@@ -104,4 +133,4 @@ | |
<code>{{ token }}</code></mat-card-content | ||
> | ||
</div> | ||
</mat-card> | ||
</mat-card> |