当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript ISplashScreen.show方法代码示例

本文整理汇总了TypeScript中@jupyterlab/apputils.ISplashScreen.show方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ISplashScreen.show方法的具体用法?TypeScript ISplashScreen.show怎么用?TypeScript ISplashScreen.show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在@jupyterlab/apputils.ISplashScreen的用法示例。


在下文中一共展示了ISplashScreen.show方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: DisposableDelegate

      execute: (args: IRouter.ILocation) => {
        const { hash, path, search } = args;
        const query = URLExt.queryStringToObject(search || '');
        const reset = 'reset' in query;
        const clone = 'clone' in query;

        if (!reset) {
          return;
        }

        // If a splash provider exists, launch the splash screen.
        const loading = splash
          ? splash.show()
          : new DisposableDelegate(() => undefined);

        // If the state database has already been resolved, resetting is
        // impossible without reloading.
        if (resolved) {
          return router.reload();
        }

        // Empty the state database.
        resolved = true;
        transform.resolve({ type: 'clear', contents: null });

        // Maintain the query string parameters but remove `reset`.
        delete query['reset'];

        const silent = true;
        const hard = true;
        const url = path + URLExt.objectToQueryString(query) + hash;
        const cleared = commands
          .execute(CommandIDs.recoverState)
          .then(() => router.stop); // Stop routing before new route navigation.

        // After the state has been reset, navigate to the URL.
        if (clone) {
          void cleared.then(() => {
            router.navigate(url, { silent, hard });
          });
        } else {
          void cleared.then(() => {
            router.navigate(url, { silent });
            loading.dispose();
          });
        }

        return cleared;
      }
开发者ID:jupyter,项目名称:jupyterlab,代码行数:49,代码来源:index.ts

示例2: ThemeManager

 activate: (app: JupyterLab, settingRegistry: ISettingRegistry, splash: ISplashScreen): IThemeManager => {
   let baseUrl = app.serviceManager.serverSettings.baseUrl;
   let host = app.shell;
   let when = app.started;
   let manager = new ThemeManager({ baseUrl,  settingRegistry, host, when });
   let disposable = splash.show();
   manager.ready.then(() => {
     setTimeout(() => {
       disposable.dispose();
     }, 2500);
   }, () => {
     disposable.dispose();
   });
   return manager;
 },
开发者ID:cameronoelsen,项目名称:jupyterlab,代码行数:15,代码来源:index.ts


注:本文中的@jupyterlab/apputils.ISplashScreen.show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。