|
1 | | -<div class="dashboard"> |
2 | | - <div class="pb-bookmarked"> |
3 | | - <div class="pb-bookmarked-title"> |
4 | | - <h1 i18n="DashboardComponent|Title of the Bookmarked people section@@DashboardComponentTitleBookmark"> |
5 | | - Bookmarked People |
| 1 | +<mat-drawer-container hasBackdrop="false" class="container" position="end"> |
| 2 | + <mat-drawer #drawer [mode]="drawerMode" [opened]="drawerOpen" position="end" class="pb-recent-people-drawer"> |
| 3 | + <div class="pb-recent-people"> |
| 4 | + <h1> |
| 5 | + <ng-container i18n="DashboardComponent|Title of the recent people section@@DashboardComponentTitleRecent"> |
| 6 | + Recent People |
| 7 | + </ng-container> |
| 8 | + <button |
| 9 | + mat-button |
| 10 | + *ngIf="removedLastPersons == null && (lastPersons$ | async)?.length != 0" |
| 11 | + (click)="resetLastPersons()" |
| 12 | + i18n="@@GeneralResetButton" |
| 13 | + > |
| 14 | + Reset |
| 15 | + </button> |
| 16 | + <button mat-button *ngIf="removedLastPersons != null" (click)="undoLastPersons()"> |
| 17 | + <mat-icon>undo</mat-icon> |
| 18 | + <span i18n="GeneralUndoButton|Button for undoing something@@GeneralUndoButton"> Undo </span> |
| 19 | + </button> |
6 | 20 | </h1> |
7 | | - <mat-form-field> |
8 | | - <mat-select [(value)]="favoriteSort" (valueChange)="changeOrder()"> |
9 | | - <mat-option |
10 | | - value="" |
11 | | - i18n="DashboardComponent|The standard (customizable) order of the favorite cards@@DashboardComponentOrderNone" |
| 21 | + <cdk-virtual-scroll-viewport itemSize="148" class="pb-recent-people-list"> |
| 22 | + <div class="pb-flex-row"> |
| 23 | + <ng-container *cdkVirtualFor="let person of lastPersons$ | async"> |
| 24 | + <app-user-tiny-card |
| 25 | + [person]="person" |
| 26 | + [actionButtonIcon]="'close'" |
| 27 | + (actionButtonClicked)="removeFromLastPersons(person)" |
| 28 | + class="pb-card" |
| 29 | + ></app-user-tiny-card> |
| 30 | + </ng-container> |
| 31 | + <div |
| 32 | + *ngIf="(lastPersons$ | async)?.length === 0" |
| 33 | + i18n=" |
| 34 | + DashboardComponent|Message displayed if no people have been visited |
| 35 | + recently@@DashboardComponentDescriptionRecent |
| 36 | + " |
12 | 37 | > |
13 | | - Custom Order</mat-option |
14 | | - > |
15 | | - <mat-option |
16 | | - value="asc" |
17 | | - i18n="DashboardComponent|The alphabetical asc order of the favorite cards@@DashboardComponentOrderAsc" |
18 | | - > |
19 | | - Alphabetical asc</mat-option |
20 | | - > |
21 | | - <mat-option |
22 | | - value="desc" |
23 | | - i18n="DashboardComponent|The alphabetical desc order of the favorite cards@@DashboardComponentOrderDesc" |
24 | | - > |
25 | | - Alphabetical desc</mat-option |
26 | | - > |
27 | | - </mat-select> |
28 | | - </mat-form-field> |
| 38 | + Looks like you haven't searched for any colleagues yet. Search for somebody to see how it works! The most |
| 39 | + recent ones will be displayed here. |
| 40 | + </div> |
| 41 | + </div> |
| 42 | + </cdk-virtual-scroll-viewport> |
29 | 43 | </div> |
30 | | - <!-- This is a workaround for https://github.com/angular/material2/issues/13372 --> |
31 | | - <div cdkDropListGroup class="pb-flex-row"> |
| 44 | + </mat-drawer> |
| 45 | + <mat-drawer-content class="content"> |
| 46 | + <div class="pb-bookmarked"> |
| 47 | + <div class="pb-bookmarked-title"> |
| 48 | + <h1 i18n="DashboardComponent|Title of the Bookmarked people section@@DashboardComponentTitleBookmark"> |
| 49 | + Bookmarked People |
| 50 | + </h1> |
| 51 | + <mat-form-field> |
| 52 | + <mat-select [(value)]="favoriteSort" (valueChange)="changeOrder()"> |
| 53 | + <mat-option |
| 54 | + value="" |
| 55 | + i18n=" |
| 56 | + DashboardComponent|The standard (customizable) order of the favorite cards@@DashboardComponentOrderNone |
| 57 | + |
| 58 | + " |
| 59 | + > |
| 60 | + Custom Order</mat-option |
| 61 | + > |
| 62 | + <mat-option |
| 63 | + value="asc" |
| 64 | + i18n="DashboardComponent|The alphabetical asc order of the favorite cards@@DashboardComponentOrderAsc" |
| 65 | + > |
| 66 | + Alphabetical asc</mat-option |
| 67 | + > |
| 68 | + <mat-option |
| 69 | + value="desc" |
| 70 | + i18n="DashboardComponent|The alphabetical desc order of the favorite cards@@DashboardComponentOrderDesc" |
| 71 | + > |
| 72 | + Alphabetical desc</mat-option |
| 73 | + > |
| 74 | + </mat-select> |
| 75 | + </mat-form-field> |
| 76 | + </div> |
| 77 | + <!-- This is a workaround for https://github.com/angular/material2/issues/13372 --> |
| 78 | + <div cdkDropListGroup class="pb-bookmarks-list pb-flex-row"> |
| 79 | + <div |
| 80 | + *ngFor="let person of bookmarkedPersons; index as i" |
| 81 | + cdkDropList |
| 82 | + [cdkDropListData]="i" |
| 83 | + cdkDropListOrientation="horizontal" |
| 84 | + class="card-container" |
| 85 | + > |
| 86 | + <app-user-small-card |
| 87 | + [person]="person" |
| 88 | + [actionButtonIcon]="'close'" |
| 89 | + [actionButtonClasses]="'white'" |
| 90 | + (actionButtonClicked)="removeFromBookmarkedPersons(person)" |
| 91 | + class="pb-small-card pb-card" |
| 92 | + cdkDrag |
| 93 | + (cdkDragEntered)="entered($event)" |
| 94 | + (cdkDragEnded)="ended($event)" |
| 95 | + [cdkDragData]="i" |
| 96 | + [cdkDragDisabled]="favoriteSort != ''" |
| 97 | + ></app-user-small-card> |
| 98 | + </div> |
| 99 | + </div> |
32 | 100 | <div |
33 | | - *ngFor="let person of bookmarkedPersons; index as i" |
34 | | - cdkDropList |
35 | | - [cdkDropListData]="i" |
36 | | - cdkDropListOrientation="horizontal" |
37 | | - class="card-container" |
| 101 | + *ngIf="bookmarkedPersons.length === 0" |
| 102 | + i18n="DashboardComponent|Message displayed if no people are bookmarked@@DashboardComponentDescriptionBookmark" |
38 | 103 | > |
39 | | - <app-user-small-card |
40 | | - [person]="person" |
41 | | - [actionButtonIcon]="'close'" |
42 | | - [actionButtonClasses]="'white'" |
43 | | - (actionButtonClicked)="removeFromBookmarkedPersons(person)" |
44 | | - class="pb-small-card pb-card" |
45 | | - cdkDrag |
46 | | - (cdkDragEntered)="entered($event)" |
47 | | - (cdkDragEnded)="ended($event)" |
48 | | - [cdkDragData]="i" |
49 | | - [cdkDragDisabled]="favoriteSort != ''" |
50 | | - ></app-user-small-card> |
| 104 | + You haven't bookmarked anybody yet, look for the button |
| 105 | + <button mat-icon-button> |
| 106 | + <mat-icon>bookmark_border</mat-icon> |
| 107 | + </button> |
| 108 | + on a workmates page. |
51 | 109 | </div> |
52 | 110 | </div> |
53 | | - <div |
54 | | - *ngIf="bookmarkedPersons.length === 0" |
55 | | - i18n="DashboardComponent|Message displayed if no people are bookmarked@@DashboardComponentDescriptionBookmark" |
56 | | - > |
57 | | - You haven't bookmarked anybody yet, look for the button |
58 | | - <button mat-icon-button> |
59 | | - <mat-icon>bookmark_border</mat-icon> |
60 | | - </button> |
61 | | - on a workmates page. |
62 | | - </div> |
63 | | - </div> |
64 | | - <mat-divider [vertical]="true"></mat-divider> |
65 | | - <cdk-virtual-scroll-viewport itemSize="148" class="pb-last"> |
66 | | - <h1> |
67 | | - <ng-container i18n="DashboardComponent|Title of the recent people section@@DashboardComponentTitleRecent"> |
68 | | - Recent People |
69 | | - </ng-container> |
| 111 | + <div class="toggle-drawer"> |
70 | 112 | <button |
71 | | - mat-button |
72 | | - *ngIf="removedLastPersons == null && (lastPersons$ | async)?.length != 0" |
73 | | - (click)="resetLastPersons()" |
74 | | - i18n="@@GeneralResetButton" |
| 113 | + mat-icon-button |
| 114 | + (click)="drawer.toggle()" |
| 115 | + i18n-matTooltip=" |
| 116 | + DashboardComponent|Tooltip for expanding recently viewed people@@DashboardComponentButtonExpandTooltip |
| 117 | + " |
| 118 | + i18n-aria-label=" |
| 119 | + DashboardComponent|Aria Label for expanding recently viewed people@@DashboardComponentButtonExpandArialLabel |
| 120 | + " |
| 121 | + matTooltip="Expand or Collapse recently viewed people" |
| 122 | + aria-label="Button expanding or collapsing the recently viewed people section" |
75 | 123 | > |
76 | | - Reset |
77 | | - </button> |
78 | | - <button mat-button *ngIf="removedLastPersons != null" (click)="undoLastPersons()"> |
79 | | - <mat-icon>undo</mat-icon> |
80 | | - <span i18n="GeneralUndoButton|Button for undoing something@@GeneralUndoButton"> Undo </span> |
| 124 | + <span> |
| 125 | + <mat-icon>{{ drawer.opened ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }} </mat-icon> |
| 126 | + <span i18n="DashboardComponent|Title of the recent people section@@DashboardComponentTitleRecent" |
| 127 | + >Recent People</span |
| 128 | + > |
| 129 | + </span> |
81 | 130 | </button> |
82 | | - </h1> |
83 | | - <div class="pb-flex-row"> |
84 | | - <ng-container *cdkVirtualFor="let person of lastPersons$ | async"> |
85 | | - <app-user-tiny-card |
86 | | - [person]="person" |
87 | | - [actionButtonIcon]="'close'" |
88 | | - (actionButtonClicked)="removeFromLastPersons(person)" |
89 | | - class="pb-card" |
90 | | - ></app-user-tiny-card> |
91 | | - </ng-container> |
92 | | - <div |
93 | | - *ngIf="(lastPersons$ | async)?.length === 0" |
94 | | - i18n="DashboardComponent|Message displayed if no people have been visited recently@@DashboardComponentDescriptionRecent" |
95 | | - > |
96 | | - Looks like you haven't searched for any colleagues yet. Search for somebody to see how it works! The most recent |
97 | | - ones will be displayed here. |
98 | | - </div> |
99 | 131 | </div> |
100 | | - </cdk-virtual-scroll-viewport> |
101 | | -</div> |
| 132 | + </mat-drawer-content> |
| 133 | +</mat-drawer-container> |
0 commit comments