dev #14717 Добавить меню в андрод WPA
This commit is contained in:
parent
ea5b07964d
commit
19577e272f
@ -8,7 +8,7 @@
|
||||
</div>
|
||||
<!-- <div class="plug"></div> -->
|
||||
<div *ngIf="showDropdown" class="backdrop" (click)="closeMenu()"></div>
|
||||
<div *ngIf="showMenu" class="menu">
|
||||
<div class="menu">
|
||||
<button mat-button (click)="toggleMenu()">
|
||||
<span class="material-icons" style="color: white !important">
|
||||
more_horiz
|
||||
@ -16,17 +16,35 @@
|
||||
</button>
|
||||
|
||||
<div class="menu__dropdown" *ngIf="showDropdown">
|
||||
<ul>
|
||||
<ul>
|
||||
<menu-item [handler]="handler(aboutApp)">
|
||||
<span class="material-icons icon" style="color: var(--main-color)">
|
||||
info
|
||||
</span>
|
||||
<span class="item_title">О приложении</span>
|
||||
</menu-item>
|
||||
<menu-item [handler]="handler(addToWallet)">
|
||||
<img src="./assets/apple_wallet.svg" class="icon" width="24" height="24" />
|
||||
<span class="item_title">Добавить карточку в Wallet</span>
|
||||
</menu-item>
|
||||
<span class="material-icons icon" style="color: var(--main-color)">
|
||||
info
|
||||
</span>
|
||||
<span class="item_title">О приложении</span>
|
||||
</menu-item>
|
||||
<ng-container *ngIf="isios">
|
||||
<menu-item [handler]="handler(addToWallet)">
|
||||
<img src="./assets/apple_wallet.svg" class="icon" width="24" height="24" alt="" />
|
||||
<span class="item_title">Добавить карточку в Wallet</span>
|
||||
</menu-item>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!isios">
|
||||
<menu-item appDownloadApp [handler]="handler(installApp)">
|
||||
<img src="./assets/coffee-like-logo.svg" width="24" height="24" alt="" />
|
||||
<span class="item_title">
|
||||
Установить приложение
|
||||
</span>
|
||||
</menu-item>
|
||||
<menu-item *ngIf="!messagingService.checkRequestPermission()" [handler]="handler(messagingService.requestPermission)">
|
||||
<span class="material-icons" style="color: var(--main-color)">
|
||||
notifications
|
||||
</span>
|
||||
<span class="item_title">
|
||||
Подписаться на уведомления
|
||||
</span>
|
||||
</menu-item>
|
||||
</ng-container>
|
||||
<menu-item [handler]="handler(logout)">
|
||||
<span class="material-icons" style="color: var(--main-color)">
|
||||
logout
|
||||
@ -35,17 +53,6 @@
|
||||
</menu-item>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrapper" *ngIf="!showMenu">
|
||||
<button
|
||||
mat-button
|
||||
*ngIf="!messagingService.checkRequestPermission()"
|
||||
(click)="messagingService.requestPermission()"
|
||||
class="notification"
|
||||
>
|
||||
<img src="./assets/notification.svg" alt="notification" />
|
||||
</button>
|
||||
<button mat-stroked-button appDownloadApp>Установить</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -57,9 +57,9 @@
|
||||
|
||||
.menu__dropdown {
|
||||
z-index: 110;
|
||||
position: fixed;
|
||||
position: absolute;
|
||||
background-color: white;
|
||||
width: fit-content;
|
||||
width: 250px;
|
||||
height: fit-content;
|
||||
right: 20px;
|
||||
border-radius: 6px;
|
||||
|
||||
@ -16,8 +16,8 @@ export class NavbarComponent implements OnInit {
|
||||
@Input() title: string = 'Название не задано'
|
||||
@Input() backEvent?: () => void;
|
||||
|
||||
showMenu: boolean = false;
|
||||
showDropdown: boolean = false;
|
||||
isios: boolean = false;
|
||||
|
||||
constructor(
|
||||
public messagingService: MessagingService,
|
||||
@ -37,9 +37,7 @@ export class NavbarComponent implements OnInit {
|
||||
aboutApp() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
const deviceType = getTypeDevice();
|
||||
|
||||
this.showMenu = deviceType === DeviceType.ios;
|
||||
this.isios = getTypeDevice() == DeviceType.ios;
|
||||
}
|
||||
|
||||
toggleMenu() {
|
||||
@ -78,5 +76,7 @@ export class NavbarComponent implements OnInit {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
installApp = () => { }
|
||||
}
|
||||
|
||||
|
||||
22
angular/src/assets/coffee-like-logo.svg
Normal file
22
angular/src/assets/coffee-like-logo.svg
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Creator: CorelDRAW -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="35.6446mm" height="51.1881mm" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
|
||||
viewBox="0 0 4756.71 6830.97"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xodm="http://www.corel.com/coreldraw/odm/2003">
|
||||
<defs>
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
.fil0 {fill:#005C50;fill-rule:nonzero}
|
||||
]]>
|
||||
</style>
|
||||
</defs>
|
||||
<g id="Слой_x0020_1">
|
||||
<metadata id="CorelCorpID_0Corel-Layer"/>
|
||||
<path class="fil0" d="M3624.79 6537.21l-2493 0 -593.79 -5550.88 3680.77 0 -593.98 5550.88zm961.94 -6281.71l-202.72 0 -78.95 -255.5 -3853.44 0 -78.85 255.5 -202.76 0 -170 550.53 241.74 0 644.49 6024.94 2984.16 0 644.68 -6024.94 241.65 0 -169.99 -550.53z"/>
|
||||
<polygon class="fil0" points="1026.49,2860.81 3728.55,2860.81 3874.58,1495.52 880.44,1495.52 "/>
|
||||
<polygon class="fil0" points="1202.08,4502.38 3552.85,4502.38 3699.07,3135.98 1055.9,3135.98 "/>
|
||||
<polygon class="fil0" points="1377.49,6144.24 3379.23,6144.24 3523.42,4777.69 1231.56,4777.69 "/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
Loading…
Reference in New Issue
Block a user