blob: e5edf42e5d1a4fcad9d445e2c3433c007c4ac255 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
<app-navbar></app-navbar>
<app-loading *ngIf="!dataArrived"></app-loading>
<main class="scroll-standalone under-navbar centered-content flex-col">
<form class="flex-row card font-size-dot9" [formGroup]="updateProfilePictureFormGroup" (ngSubmit)="updateProfilePicture()">
<img id="profile-picture" class="round-image" [src]="user.profilePictureURL">
<section class="flexible flex-col flex-center-align-items flex-justify-center side-padding-font">
<input class="full-width faded-slim-border padding-smaller lighter-hover click-effect border-radius-smaller" type="file" accept="image/*" formControlName="fileUpload" (change)="onFileUpload($event)">
<button class="full-width faded-slim-border padding-smaller lighter-hover click-effect border-radius-smaller margin-top-normal" type="submit" *ngIf="newProfilePicture.size > 0">
Update profile picture
</button>
</section>
</form>
<form class="flex-col card padding-big" [formGroup]="updateUserFormGroup" (ngSubmit)="onSubmit()">
<section class="flex-col">
<div class="flex-row">
<label class="flexible focus-fg-color">First Name</label>
<label *ngIf="updateUserFormGroup.get('firstName')?.errors?.required" class="error">*Required</label>
<label *ngIf="updateUserFormGroup.get('firstName')?.errors?.minlength" class="error">*Minimum 3 characters</label>
</div>
<input type="text" class="fancy-input faded-slim-border border-bottom-only" formControlName="firstName" required>
</section>
<section class="flex-col">
<div class="flex-row">
<label class="flexible focus-fg-color">Last Name</label>
<label *ngIf="updateUserFormGroup.get('lastName')?.errors?.required" class="error">*Required</label>
<label *ngIf="updateUserFormGroup.get('lastName')?.errors?.minlength" class="error">*Minimum 3 characters</label>
</div>
<input type="text" class="fancy-input faded-slim-border border-bottom-only" formControlName="lastName" required>
</section>
<section class="flex-col">
<div class="flex-row">
<label class="flexible focus-fg-color">Username</label>
<label *ngIf="updateUserFormGroup.get('username')?.errors?.required" class="error">*Required</label>
<label *ngIf="updateUserFormGroup.get('username')?.errors?.minlength" class="error">*Minimum 3 characters</label>
</div>
<input type="text" class="fancy-input faded-slim-border border-bottom-only" formControlName="username" required>
</section>
<section class="flex-col">
<div class="flex-row">
<label class="flexible focus-fg-color">Email</label>
<label *ngIf="updateUserFormGroup.get('email')?.errors?.required" class="error">*Required</label>
<label *ngIf="updateUserFormGroup.get('email')?.errors?.email" class="error">*Invalid email</label>
</div>
<input type="text" class="fancy-input faded-slim-border border-bottom-only" formControlName="email" required>
</section>
<section class="flex-col">
<div class="flex-row">
<label class="flexible focus-fg-color">Password</label>
<label *ngIf="updateUserFormGroup.get('password')?.errors?.required" class="error">*Required</label>
<label *ngIf="updateUserFormGroup.get('password')?.errors?.minlength" class="error">*Minimum 3 characters</label>
<label *ngIf="updateUserFormGroup.get('password')?.errors?.pattern" class="error">*At least 1 number</label>
</div>
<input type="password" class="fancy-input faded-slim-border border-bottom-only" formControlName="password" required>
</section>
<button type="button" class="submit-btn edit-btn" (click)="toggleLanguages()">▼ Edit Languages ▼</button>
<div *ngIf="showLanguages">
<div class="input-selection">
<input type="text" class="input-field" formControlName="languageInput" required>
<div class="input-errors">
<label class="error">Type in your desired languages, separated by a space</label>
</div>
</div>
Available languages:
<div id="all-languages">
<div class="user-language" *ngFor="let lang of availableLanguages">
{{ lang.name }}
</div>
</div>
</div>
<button type="button" class="submit-btn edit-btn" (click)="toggleTechnologies()">▼ Edit Technologies ▼</button>
<div *ngIf="showTechnologies">
<div class="input-selection">
<input type="text" class="input-field" formControlName="technologyInput" required>
<div class="input-errors">
<label class="error">Type in your desired technologies, separated by a space</label>
</div>
</div>
Available technologies:
<div id="all-technologies">
<div class="user-technology" *ngFor="let tech of availableTechnologies">
{{ tech.name }}
</div>
</div>
</div>
<button class="full-width faded-slim-border padding-smaller lighter-hover click-effect border-radius-smaller margin-top-normal" type="submit">
Update profile
</button>
<app-success-bar></app-success-bar>
<app-error-bar></app-error-bar>
</form>
<section class="card full-width">
<div class="margin-bot-bigger text-centered error-fg-color" *ngIf="deleteAccountConfirm">
Are you sure you want to delete your account?<br>This is permanent!
</div>
<button class="full-width faded-slim-border padding-smaller lighter-hover click-effect border-radius-smaller error-fg-color" (click)="deleteAccount()">
Delete account
</button>
</section>
</main>
|