當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript apputils.ISplashScreen類代碼示例

本文整理匯總了TypeScript中@jupyterlab/apputils.ISplashScreen的典型用法代碼示例。如果您正苦於以下問題:TypeScript ISplashScreen類的具體用法?TypeScript ISplashScreen怎麽用?TypeScript ISplashScreen使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了ISplashScreen類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: 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

示例2: 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


注:本文中的@jupyterlab/apputils.ISplashScreen類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。