本文整理汇总了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;
},
示例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;
}