How to use the @jupyterlab/application.JupyterLab.defaultInfo function in @jupyterlab/application

To help you get started, we’ve selected a few @jupyterlab/application examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyterlab / jupyterlab_app / src / browser / extensions / electron-extension / index.ts View on Github external
ServerConnection.makeSettings = function(options?: Partial) {
      options = {
        ...options,
        ...{
          baseUrl: PageConfig.getBaseUrl(),
          pageUrl: PageConfig.getOption('pageUrl'),
          wsUrl: PageConfig.getWsUrl(),
          token: PageConfig.getToken()
        }
      };
      return oldMakeSettings(options);
    };

    super(options);

    this._electronInfo = { ...JupyterLab.defaultInfo, ...options };
    if (this._electronInfo.devMode) {
      this.shell.addClass('jp-mod-devMode');
    }

    // Get the top panel widget
    let topPanel: Widget;
    each(this.shell.layout.iter(), (widget: Widget) => {
      if (widget.id === 'jp-top-panel') {
        topPanel = widget;
        return false;
      }
    });
    topPanel.addClass('jpe-mod-' + options.uiState);

    if (options.uiState === 'mac') {
      // Resize the top panel based on zoom factor