[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;"
(click)="onEdit()">
<div class="xdesktop">
<i class="material-icons">edit</i> Edit {{edit}}
<i class="material-icons">edit</i> Edit
</div>
<div class="xmobile">
<i class="material-icons">edit</i>
@ -88,7 +88,7 @@
</div>
<div class="fill-all" *ngIf="login != null &amp;&amp; displayUserMenu == true" (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">
Sign in as <b>{{login}}</b>
</button>
@ -103,4 +103,21 @@
</button>
</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>

View File

@ -1,10 +1,8 @@
.top {
.user-menu {
.sub-menu {
position: fixed;
top:75px;
right:15px;
min-width:150px;
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 {
position: absolute;

View File

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