[DEV] update top menu

This commit is contained in:
Edouard DUPIN 2020-04-08 14:36:58 +02:00
parent 7ab5416f92
commit 2e9fc87fb5
3 changed files with 39 additions and 5 deletions

View File

@ -79,7 +79,7 @@
style="float:right; height:56px;" style="float:right; height:56px;"
(click)="onEdit()"> (click)="onEdit()">
<div class="xdesktop"> <div class="xdesktop">
<i class="material-icons">edit</i> Edit {{edit}} <i class="material-icons">edit</i> Edit
</div> </div>
<div class="xmobile"> <div class="xmobile">
<i class="material-icons">edit</i> <i class="material-icons">edit</i>
@ -88,7 +88,7 @@
</div> </div>
<div class="fill-all" *ngIf="login != null &amp;&amp; displayUserMenu == true" (click)="onOutUserProperty()"> <div class="fill-all" *ngIf="login != null &amp;&amp; displayUserMenu == true" (click)="onOutUserProperty()">
<!-- (click)="onOutUserProperty()" --> <!-- (click)="onOutUserProperty()" -->
<div class="user-menu color-menu-background"> <div class="sub-menu user-menu color-menu-background">
<button class="item" disabled="disabled"> <button class="item" disabled="disabled">
Sign in as <b>{{login}}</b> Sign in as <b>{{login}}</b>
</button> </button>
@ -103,4 +103,21 @@
</button> </button>
</div> </div>
</div> </div>
<div class="fill-all" *ngIf="displayEditMenu == true" (click)="onOutUserProperty()">
<!-- (click)="onOutUserProperty()" -->
<div class="xdesktop">
<div class="sub-menu edit-menu color-menu-background">
<button class="item" disabled="disabled">
<b>edit</b>
</button>
</div>
</div>
<div class="xmobile">
<div class="sub-menu edit-menu-mob color-menu-background">
<button class="item" disabled="disabled">
<b>edit</b>
</button>
</div>
</div>
</div>
</div> </div>

View File

@ -1,10 +1,8 @@
.top { .top {
.user-menu { .sub-menu {
position: fixed; position: fixed;
top:75px;
right:15px;
min-width:150px; min-width:150px;
min-height:70px; min-height:70px;
@ -61,6 +59,18 @@
} }
} }
.user-menu {
top:75px;
right:15px;
}
.edit-menu {
top:75px;
right:200px;
}
.edit-menu-mob {
top:75px;
right:25px;
}
.fill-all { .fill-all {
position: absolute; position: absolute;

View File

@ -22,6 +22,7 @@ export class TopMenuComponent implements OnInit {
public login: string = null;//Session.getLogin(); public login: string = null;//Session.getLogin();
public avatar: string = null;//Session.getAvatar(); public avatar: string = null;//Session.getAvatar();
public displayUserMenu: boolean = false; public displayUserMenu: boolean = false;
public displayEditMenu: boolean = false;
public ariane_type_id: number = null; public ariane_type_id: number = null;
public ariane_type_name: string = null; public ariane_type_name: string = null;
@ -85,6 +86,7 @@ export class TopMenuComponent implements OnInit {
onAvatar(): void { onAvatar(): void {
console.log("onAvatar() " + this.displayUserMenu); console.log("onAvatar() " + this.displayUserMenu);
this.displayUserMenu = !this.displayUserMenu; this.displayUserMenu = !this.displayUserMenu;
this.displayEditMenu = false;
} }
updateEditable() { updateEditable() {
@ -114,6 +116,9 @@ export class TopMenuComponent implements OnInit {
} }
onEdit(): void { onEdit(): void {
console.log("onEdit()"); console.log("onEdit()");
this.displayEditMenu = !this.displayEditMenu;
this.displayUserMenu = false;
/*
if (this.arianeService.getVideoId() != null) { if (this.arianeService.getVideoId() != null) {
this.router.navigate(['video-edit/' + this.arianeService.getVideoId()]); this.router.navigate(['video-edit/' + this.arianeService.getVideoId()]);
return; return;
@ -135,6 +140,7 @@ export class TopMenuComponent implements OnInit {
return; return;
} }
this.edit = null; this.edit = null;
*/
} }
onHome(): void { onHome(): void {
@ -177,6 +183,7 @@ export class TopMenuComponent implements OnInit {
onOutUserProperty(): void { onOutUserProperty(): void {
console.log("onOutUserProperty ==> event..."); console.log("onOutUserProperty ==> event...");
this.displayUserMenu = false; this.displayUserMenu = false;
this.displayEditMenu = false;
} }
onArianeType(): void { onArianeType(): void {