Compare commits

...

2 Commits

Author SHA1 Message Date
Florian THIERRY
86fcdd4d12 Some change styling. 2022-03-04 17:43:04 +01:00
Florian THIERRY
3819b859fe Change header display in selection mode. 2022-03-04 17:40:47 +01:00
5 changed files with 35 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
<nav>
<nav *ngIf="!selectionMode">
<span class="title" routerLink="/">
To Do
</span>
@@ -16,3 +16,12 @@
Liste active : {{activeTaskList.name}}
</div>
</nav>
<nav *ngIf="selectionMode" class="selectionMode">
<div></div>
<div>
Cliquez sur une liste pour la sélectionner
</div>
<div class="actions">
<button mat-raised-button (click)="disableSelectionMode()">Annuler</button>
</div>
</nav>

View File

@@ -5,7 +5,22 @@ nav {
right: 0;
display: flex;
align-items: center;
height: 4rem;
height: 3.2rem;
background-color: #eee;
&.selectionMode {
font-weight: bold;
background-color: #185eb4;
color: white;
display: flex;
justify-content: center;
.actions {
position: absolute;
right: 0;
margin: 0 1rem;
}
}
.title {
font-size: 1.5rem;

View File

@@ -14,6 +14,7 @@ import { TaskListService } from '../../service/task-list.service';
export class HeaderComponent implements OnInit, OnDestroy {
private _storeSubscription?: Subscription;
activeTaskList?: TaskList;
selectionMode = false;
constructor(
private _dialog: MatDialog,
@@ -24,6 +25,7 @@ export class HeaderComponent implements OnInit, OnDestroy {
ngOnInit(): void {
this._storeSubscription = this._taskListService.store$.subscribe(store => {
this.activeTaskList = store.taskLists.find(taskList => store.activeTaskListId === taskList.id);
this.selectionMode = store.selectionMode;
});
}
@@ -38,4 +40,8 @@ export class HeaderComponent implements OnInit, OnDestroy {
goTaskListsPane(): void {
this._taskListService.removeActiveTaskList();
}
disableSelectionMode(): void {
this._taskListService.disableSelectionMode();
}
}

View File

@@ -118,7 +118,8 @@ export class TaskListService {
disableSelectionMode(): void {
const store = this.store;
store.selectionMode = true;
store.selectionMode = false;
store.selectedTaskLists = [];
this._store.next(store);
}
}

View File

@@ -4,7 +4,7 @@ html, body { height: 100%; }
body {
margin: 0;
font-family: Roboto, "Helvetica Neue", sans-serif;
padding-top: 4rem;
padding-top: 3.2rem;
}