feat:IDE启动耗时太长,新增加载动画.

This commit is contained in:
chriswang521 2024-05-17 14:54:24 +08:00 committed by wangpenglong
parent da8bbf73ca
commit 5b2e60cf3a
6 changed files with 127 additions and 1 deletions

View File

@ -30,7 +30,38 @@
">
</head>
<style>
#loader {
border: 16px solid rgba(204,204,204,0.5);
border-radius: 50%;
border-top: 16px solid rgba(0,122,204,0.8);
width: 50px;
height: 50px;
-webkit-animation: spin 1s linear infinite; /* Safari */
animation: spin 1s linear infinite;
position: absolute;
top: 50%;
left: 50%;
margin-left: -25px;
margin-top: -25px;
}
/* Safari */
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
<body aria-label="">
<div id="loader"></div>
<div id="process-list"></div>
</body>

View File

@ -30,7 +30,38 @@
">
</head>
<style>
#loader {
border: 16px solid rgba(204,204,204,0.5);
border-radius: 50%;
border-top: 16px solid rgba(0,122,204,0.8);
width: 50px;
height: 50px;
-webkit-animation: spin 1s linear infinite; /* Safari */
animation: spin 1s linear infinite;
position: absolute;
top: 50%;
left: 50%;
margin-left: -25px;
margin-top: -25px;
}
/* Safari */
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
<body aria-label="">
<div id="loader"></div>
<div id="process-list"></div>
</body>

View File

@ -299,6 +299,8 @@ class ProcessExplorer {
}
private async createProcessTree(processRoots: MachineProcessInformation[]): Promise<void> {
document.getElementById('loader')?.remove();
const container = mainWindow.document.getElementById('process-list');
if (!container) {
return;

View File

@ -64,7 +64,38 @@
"/>
</head>
<style>
#loader {
border: 16px solid rgba(204,204,204,0.5);
border-radius: 50%;
border-top: 16px solid rgba(0,122,204,0.8);
width: 50px;
height: 50px;
-webkit-animation: spin 1s linear infinite; /* Safari */
animation: spin 1s linear infinite;
position: absolute;
top: 50%;
left: 50%;
margin-left: -25px;
margin-top: -25px;
}
/* Safari */
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
<body aria-label="">
<div id="loader"></div>
</body>
<!-- Startup (do not modify order of script tags!) -->

View File

@ -64,7 +64,38 @@
"/>
</head>
<style>
#loader {
border: 16px solid rgba(204,204,204,0.5);
border-radius: 50%;
border-top: 16px solid rgba(0,122,204,0.8);
width: 50px;
height: 50px;
-webkit-animation: spin 1s linear infinite; /* Safari */
animation: spin 1s linear infinite;
position: absolute;
top: 50%;
left: 50%;
margin-left: -25px;
margin-top: -25px;
}
/* Safari */
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
<body aria-label="">
<div id="loader"></div>
</body>
<!-- Startup (do not modify order of script tags!) -->

View File

@ -314,7 +314,7 @@ export class Workbench extends Layout {
}
private renderWorkbench(instantiationService: IInstantiationService, notificationService: NotificationService, storageService: IStorageService, configurationService: IConfigurationService): void {
document.getElementById('loader')?.remove();
// ARIA
setARIAContainer(this.mainContainer);