181. Adding profile image form (#26)

This commit is contained in:
Art
2021-09-22 13:59:42 +03:00
parent 718a9c342f
commit 77e40c594f
2 changed files with 16 additions and 1 deletions

View File

@ -154,7 +154,7 @@
login: login:
{{loggedInUser?.lastLoginDateDisplay | date:'medium'}}</small></div> {{loggedInUser?.lastLoginDateDisplay | date:'medium'}}</small></div>
<div class="mt-2"> <div class="mt-2">
<button class="btn btn-primary" type="button"> <button (click)="updateProfileImage()" class="btn btn-primary" type="button">
<i class="fa fa-fw fa-camera"></i> <i class="fa fa-fw fa-camera"></i>
<span>Change Photo</span> <span>Change Photo</span>
</button> </button>
@ -527,5 +527,12 @@
</div> </div>
</div> </div>
<!-- profile image change form -->
<form enctype="multipart/form-data" style="display:none;">
<input type="file"
(change)="onProfileImageChange($any($event).target.files); onUpdateProfileImage()"
name="profile-image-input" id="profile-image-input" placeholder="file" accept="image/*" />
</form>
</div> </div>
</div> </div>

View File

@ -228,4 +228,12 @@ export class UserComponent implements OnInit, OnDestroy {
this.router.navigate(['/login']); this.router.navigate(['/login']);
this.sendNotification(NotificationType.SUCCESS, 'You have been successfully logged out'); this.sendNotification(NotificationType.SUCCESS, 'You have been successfully logged out');
} }
public updateProfileImage(): void {
this.clickButton('profile-image-input');
}
public onUpdateProfileImage(): void {
}
} }