Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: hide menu panel on kiosk mode #4

Merged
merged 1 commit into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 91 additions & 60 deletions src/app/components/Home/Home.component.html
Original file line number Diff line number Diff line change
@@ -1,79 +1,113 @@
<div class="body-container">
<mat-toolbar color="primary"
style="min-height: auto;">
<mat-toolbar-row style="flex-wrap: wrap;height: auto;">
<button mat-icon-button
(click)="files = true; drawer.toggle()">
<mat-toolbar color="primary" style="min-height: auto">
<mat-toolbar-row style="flex-wrap: wrap; height: auto">
<button
mat-icon-button
*ngIf="!isKIOSK"
(click)="files = true; drawer.toggle()"
>
<mat-icon>menu</mat-icon>
</button>
<div style="padding-right: 1rem ">WebShark</div>
<div style="padding-right: 1rem">WebShark</div>
<!-- <app-menu></app-menu> -->
<button mat-raised-button
<button
mat-raised-button
*ngIf="captureFile"
(click)="downloadFile(captureFile)">
(click)="downloadFile(captureFile)"
>
<mat-icon class="mat-18">download</mat-icon>
{{ captureFile }}
</button>
<span style="flex: 1;"></span>
<flexible-chart chart style="flex: 3; min-width: 400px; height: 4rem;"
<span style="flex: 1"></span>
<flexible-chart
chart
style="flex: 3; min-width: 400px; height: 4rem"
[typeOfChart]="typeOfChart"
(range)="webShark.range = $event"
#headerChart></flexible-chart>
<button mat-icon-button
[matMenuTriggerFor]="menuSettings">
#headerChart
></flexible-chart>
<button mat-icon-button [matMenuTriggerFor]="menuSettings">
<mat-icon>settings</mat-icon>
<mat-menu #menuSettings="matMenu">
<div style="padding: 1rem; display: flex;">
<div style="padding: 1rem; display: flex">
<mat-radio-group aria-label="Chart settings">
<mat-radio-button color="primary" (click)="typeOfChart='line'"
value="line">Line</mat-radio-button>
<mat-radio-button color="primary" (click)="typeOfChart='bar'"
value="bar">Bar</mat-radio-button>
<mat-radio-button color="primary" (click)="typeOfChart='area'"
value="area" checked>Area</mat-radio-button>
<mat-radio-button
color="primary"
(click)="typeOfChart = 'line'"
value="line"
>Line</mat-radio-button
>
<mat-radio-button
color="primary"
(click)="typeOfChart = 'bar'"
value="bar"
>Bar</mat-radio-button
>
<mat-radio-button
color="primary"
(click)="typeOfChart = 'area'"
value="area"
checked
>Area</mat-radio-button
>
</mat-radio-group>
</div>
<div style="padding: 0rem; width: 390px; display: flex; justify-content: space-around;">
<button mat-button
(click)="framePosition = ['vertical', 'horizontal']">
<div style="width: 60px; height: 60px; padding-top: 5px;">
<mat-grid-list cols="2"
rowHeight="25px">
<mat-grid-tile [colspan]="2"
class="grid-content"></mat-grid-tile>
<div
style="
padding: 0rem;
width: 390px;
display: flex;
justify-content: space-around;
"
>
<button
mat-button
(click)="framePosition = ['vertical', 'horizontal']"
>
<div style="width: 60px; height: 60px; padding-top: 5px">
<mat-grid-list cols="2" rowHeight="25px">
<mat-grid-tile
[colspan]="2"
class="grid-content"
></mat-grid-tile>
<mat-grid-tile class="grid-content"></mat-grid-tile>
<mat-grid-tile class="grid-content"></mat-grid-tile>
</mat-grid-list>
</div>
</button>
<button mat-button
(click)="framePosition = ['horizontal', 'vertical']">
<div style="width: 60px; height: 60px; padding-top: 5px;">
<mat-grid-list cols="2"
rowHeight="25px">
<mat-grid-tile [rowspan]="2"
class="grid-content"></mat-grid-tile>
<button
mat-button
(click)="framePosition = ['horizontal', 'vertical']"
>
<div style="width: 60px; height: 60px; padding-top: 5px">
<mat-grid-list cols="2" rowHeight="25px">
<mat-grid-tile
[rowspan]="2"
class="grid-content"
></mat-grid-tile>
<mat-grid-tile class="grid-content"></mat-grid-tile>
<mat-grid-tile class="grid-content"></mat-grid-tile>
</mat-grid-list>
</div>
</button>
<button mat-button
(click)="framePosition = ['horizontal', 'horizontal']">
<div style="width: 60px; height: 60px; padding-top: 5px;">
<mat-grid-list cols="3"
rowHeight="50px">
<button
mat-button
(click)="framePosition = ['horizontal', 'horizontal']"
>
<div style="width: 60px; height: 60px; padding-top: 5px">
<mat-grid-list cols="3" rowHeight="50px">
<mat-grid-tile class="grid-content"></mat-grid-tile>
<mat-grid-tile class="grid-content"></mat-grid-tile>
<mat-grid-tile class="grid-content"></mat-grid-tile>
</mat-grid-list>
</div>
</button>
<button mat-button
(click)="framePosition = ['vertical', 'vertical']">
<div style="width: 60px; height: 60px; padding-top: 5px;">
<mat-grid-list cols="1"
rowHeight="16px">
<button
mat-button
(click)="framePosition = ['vertical', 'vertical']"
>
<div style="width: 60px; height: 60px; padding-top: 5px">
<mat-grid-list cols="1" rowHeight="16px">
<mat-grid-tile class="grid-content"></mat-grid-tile>
<mat-grid-tile class="grid-content"></mat-grid-tile>
<mat-grid-tile class="grid-content"></mat-grid-tile>
Expand All @@ -85,28 +119,25 @@
</button>
</mat-toolbar-row>
</mat-toolbar>
<mat-drawer-container class="example-container"
autosize>
<mat-drawer #drawer
class="example-sidenav"
mode="side"
[opened]="false">
<app-files-page [isFile]="!isFileOnLink"></app-files-page>
<mat-drawer-container class="example-container" autosize>
<mat-drawer #drawer class="example-sidenav" mode="side" [opened]="false">
<app-files-page *ngIf="!isKIOSK" [isFile]="!isFileOnLink"></app-files-page>
</mat-drawer>
<div class="example-sidenav-content">
<app-webshark
[fileList]="files"
[framePosition]="framePosition"
[fileList]="files"
[framePosition]="framePosition"
(ready)="headerChart.data = $event"
#webShark></app-webshark>
#webShark
></app-webshark>
</div>
</mat-drawer-container>
</div>


<modal-resizable *ngFor="let dialog of dialogs; let idx = index"
<modal-resizable
*ngFor="let dialog of dialogs; let idx = index"
[title]="dialog.name || tapPage.title || '. . .'"
(close)="onClose(idx)">
<tap-page [taplink]="dialog.link"
#tapPage></tap-page>
(close)="onClose(idx)"
>
<tap-page [taplink]="dialog.link" #tapPage></tap-page>
</modal-resizable>
3 changes: 3 additions & 0 deletions src/app/components/Home/Home.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { ModalResizableService } from './../controls/modal-resizable/modal-resizable.service';
import { WebSharkDataService } from '@app/services/web-shark-data.service';
import { Component, OnInit } from '@angular/core';
import { environment } from '@environments/environment';


declare const transcode: Function;
@Component({
Expand All @@ -11,6 +13,7 @@ declare const transcode: Function;
export class HomeComponent implements OnInit {
typeOfChart: any = 'area';
files: any;
isKIOSK = !!environment.kiosk;
isFileOnLink: boolean = false;
dialogs: any[] = [];
framePosition: any = ['vertical', 'horizontal'];
Expand Down
Loading