Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Web Browser App: App2App communication - phase 1
Signed-off-by: Leonty Chudinov <lchudinov@rocketsoftware.com>
- Loading branch information
Leonty Chudinov
committed
Mar 23, 2020
1 parent
3c24c1d
commit 0ea8edc
Showing
8 changed files
with
99 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
system-apps/web-browser-app/webClient/src/app/browser/services/settings.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
This program and the accompanying materials are | ||
made available under the terms of the Eclipse Public License v2.0 which accompanies | ||
this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html | ||
SPDX-License-Identifier: EPL-2.0 | ||
Copyright Contributors to the Zowe Project. | ||
*/ | ||
|
||
import { Injectable, Optional, Inject } from '@angular/core'; | ||
import { Angular2InjectionTokens } from 'pluginlib/inject-resources'; | ||
import { isLaunchMetadata } from '../shared'; | ||
|
||
@Injectable() | ||
export class SettingsService { | ||
private controlsVisible = true; | ||
|
||
constructor( | ||
@Optional() @Inject(Angular2InjectionTokens.LAUNCH_METADATA) | ||
launchMetadata: any, | ||
) { | ||
if (isLaunchMetadata(launchMetadata) && launchMetadata.data.hideControls) { | ||
this.controlsVisible = false; | ||
} | ||
} | ||
|
||
toggleControls(): void { | ||
this.controlsVisible = !this.controlsVisible; | ||
} | ||
|
||
areControlsVisible(): boolean { | ||
return this.controlsVisible; | ||
} | ||
} | ||
|
||
|
||
/* | ||
This program and the accompanying materials are | ||
made available under the terms of the Eclipse Public License v2.0 which accompanies | ||
this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html | ||
SPDX-License-Identifier: EPL-2.0 | ||
Copyright Contributors to the Zowe Project. | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters