mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-06 08:58:32 +00:00
GH-240: Warn if not connected to the Internet.
Make sure the gRPC client initialization is rejected. Closes #240. Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
@@ -157,6 +157,10 @@ export class ArduinoFrontendContribution implements FrontendApplicationContribut
|
||||
|
||||
@postConstruct()
|
||||
protected async init(): Promise<void> {
|
||||
if (!window.navigator.onLine) {
|
||||
// tslint:disable-next-line:max-line-length
|
||||
this.messageService.warn('You appear to be offline. Without an Internet connection, the Arduino CLI might not be able to download the required resources and could cause malfunction. Please connect to the Internet and restart the application.');
|
||||
}
|
||||
const updateStatusBar = (config: BoardsConfig.Config) => {
|
||||
this.statusBar.setElement('arduino-selected-board', {
|
||||
alignment: StatusBarAlignment.RIGHT,
|
||||
|
||||
Reference in New Issue
Block a user