Skip to content

Commit

Permalink
Merge pull request #296 from mitre-attack/feature/#181-layer-upgrade-…
Browse files Browse the repository at this point in the history
…ui-update

Feature/#181 layer upgrade UI update
  • Loading branch information
clemiller committed May 17, 2021
2 parents ba49817 + 88d543b commit f945629
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
5 changes: 4 additions & 1 deletion nav-app/src/app/data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ export class DataService {
public versions: any[] = [];

public subtechniquesEnabled: boolean = true;
public sidebarOpened: boolean = false;
public versionChangelog?: VersionChangelog<Technique>;

private _sidebarOpened: boolean;
public get sidebarOpened(): boolean { return this._sidebarOpened; };
public set sidebarOpened(newVal: boolean) { this._sidebarOpened = newVal; };

/**
* Callback functions passed to this function will be called after data is loaded
* @param {*} callback callback function to call when data is done loading
Expand Down
4 changes: 2 additions & 2 deletions nav-app/src/app/datatable/data-table.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<div *ngIf="configService.getFeature('search')" class="control-row-item">

<div class="control-row-button dropdown noselect"
(click)="currentDropdown = currentDropdown !== 'search' ? 'search' : null;"
(click)="currentDropdown = currentDropdown !== 'search' ? 'search' : null;"
matTooltipPosition="below"
matTooltip="search">
<img src="assets/icons/ic_search_black_24px.svg"/>
Expand Down Expand Up @@ -548,7 +548,7 @@
</div>
</div>
</mat-drawer-content>
<mat-drawer mode="side" position="end" #sidebar [opened]="sidebarOpened">
<mat-drawer mode="side" position="end" #sidebar [opened]="dataService.sidebarOpened">
<sidebar></sidebar>
</mat-drawer>
</mat-drawer-container>
Expand Down
3 changes: 0 additions & 3 deletions nav-app/src/app/datatable/data-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ export class DataTableComponent implements AfterViewInit {

currentDropdown: string = ""; //current dropdown menu

public get sidebarOpened() { return this.dataService.sidebarOpened; }


//////////////////////////////////////////////////////////
// Stringifies the current view model into a json string//
// stores the string as a blob //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class LayerUpgradeComponent implements OnInit {

public upgradeLayer(): void {
// close sidebar
this.dataService.sidebarOpened = false;
this.dataService.sidebarOpened = !this.dataService.sidebarOpened;
}

public getIDs(object: Technique) {
Expand Down

0 comments on commit f945629

Please sign in to comment.