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

Support isWeb Operating System context for theia #8529

Closed
mohitsuman opened this issue Sep 18, 2020 · 3 comments · Fixed by #8530
Closed

Support isWeb Operating System context for theia #8529

mohitsuman opened this issue Sep 18, 2020 · 3 comments · Fixed by #8530
Labels
good first issue good first issues for new contributors help wanted issues meant to be picked up, require help plug-in system issues related to the plug-in system vscode issues related to VSCode compatibility

Comments

@mohitsuman
Copy link
Contributor

Feature Description:

Currently theia supports OS context for isWin/Mac/Linux . VSCode context API has added isWeb context too which should be supported in Theia API.

@mohitsuman
Copy link
Contributor Author

cc : @azatsarynnyy @ericwill

@azatsarynnyy
Copy link
Member

Thanks for the feature request @mohitsuman!

BTW, it should be as easy as just adding

this.contextKeyService.createKey<boolean>('isWeb', !this.isElectron());

to

this.contextKeyService.createKey<boolean>('isLinux', OS.type() === OS.Type.Linux);
this.contextKeyService.createKey<boolean>('isMac', OS.type() === OS.Type.OSX);
this.contextKeyService.createKey<boolean>('isWindows', OS.type() === OS.Type.Windows);

@azatsarynnyy azatsarynnyy added plug-in system issues related to the plug-in system vscode issues related to VSCode compatibility help wanted issues meant to be picked up, require help good first issue good first issues for new contributors labels Sep 18, 2020
@azatsarynnyy
Copy link
Member

Another solution can be env.UIKind API.
It returns UIKind.Desktop or UIKind.Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue good first issues for new contributors help wanted issues meant to be picked up, require help plug-in system issues related to the plug-in system vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants