-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into feature/add-current-experience
- Loading branch information
Showing
12 changed files
with
293 additions
and
176 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
File renamed without changes.
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
Empty file.
24 changes: 24 additions & 0 deletions
24
src/main/client/src/app/navbar/search-user/search-user.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,24 @@ | ||
<div class="modal-header"> | ||
<h4 class="modal-title pull-left">Search users: </h4> | ||
<button type="button" class="close pull-right" aria-label="Close" (click)="close()"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
<div class="modal-body"> | ||
|
||
<label> | ||
Search for user: | ||
<input class="form-control" (keyup)="searchUser($event)"> | ||
</label> | ||
<hr> | ||
<div *ngFor="let user of users"> | ||
<div class="w3-container w3-card w3-white w3-round "> | ||
<img [src]="user.imagePath" alt="Avatar" class="w3-left w3-circle w3-margin-right" style="width:60px"> | ||
<h4><a (click)="close()" [routerLink]="['profile', user.username]">{{ user.displayName }} | ||
</a></h4> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="submit" class="btn btn-danger" (click)="close()">Close</button> | ||
</div> |
40 changes: 40 additions & 0 deletions
40
src/main/client/src/app/navbar/search-user/search-user.component.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,40 @@ | ||
import {Component, OnInit} from '@angular/core'; | ||
import {BsModalRef} from "ngx-bootstrap"; | ||
import {Users} from "../../shared/user/user.model"; | ||
import {UserService} from "../../shared/user/user.service"; | ||
|
||
@Component({ | ||
selector: 'app-search-user', | ||
templateUrl: './search-user.component.html', | ||
styleUrls: ['./search-user.component.css'] | ||
}) | ||
export class SearchUserComponent implements OnInit { | ||
users: Users; | ||
|
||
constructor(public _modal: BsModalRef, | ||
private _userService: UserService) { | ||
} | ||
|
||
ngOnInit() { | ||
this.users = []; | ||
} | ||
|
||
searchUser(event) { | ||
let term = event.target.value; | ||
if (term == '') { | ||
this.users = []; | ||
return; | ||
} | ||
this._userService.search(term) | ||
.then((users: Users) => { | ||
this.users = users; | ||
}); | ||
} | ||
|
||
close() { | ||
if (this._modal) { | ||
this._modal.hide(); | ||
this._modal = null; | ||
} | ||
} | ||
} |
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
Oops, something went wrong.