Selaa lähdekoodia

Fixes spinners & centers loading message

main
Eric Amodio 2 vuotta sitten
vanhempi
commit
1057278647
3 muutettua tiedostoa jossa 57 lisäystä ja 22 poistoa
  1. +3
    -3
      src/webviews/apps/plus/graph/GraphWrapper.tsx
  2. +19
    -19
      src/webviews/apps/plus/graph/graph.scss
  3. +35
    -0
      src/webviews/apps/shared/codicons.scss

+ 3
- 3
src/webviews/apps/plus/graph/GraphWrapper.tsx Näytä tiedosto

@ -322,11 +322,11 @@ export function GraphWrapper({
</div>
</div>
{graphList.length > 0 && (
<span>
{graphList.length} commit{graphList.length ? 's' : ''}
<span className="actionbar__details">
{graphList.length} item{graphList.length ? 's' : ''}
</span>
)}
{isLoading && <span className="icon--loading" />}
{isLoading && <span className="actionbar__loading icon--loading icon-modifier--spin" />}
</div>
<div className="actionbar__group">
<a

+ 19
- 19
src/webviews/apps/plus/graph/graph.scss Näytä tiedosto

@ -47,6 +47,15 @@ a {
}
}
&__details {}
&__loading {
position: relative;
top: 1px;
left: 0.5rem;
font-size: 1.2rem;
}
a {
color: inherit;
}
@ -232,22 +241,6 @@ a {
}
}
.icon--loading {
&::before {
// codicon-loading
font-family: codicon;
content: '\eb19';
}
transform-origin: 50% 42%;
animation: spin .7s steps(30) infinite;
@keyframes spin {
100% {
transform: rotate(360deg);
}
}
}
.icon--warning {
:before {
// codicon-vm
@ -382,8 +375,15 @@ a {
& .resizable-handle.horizontal {
display: none;
}
}
.graph-container .node.stash-node .graph-icon {
transform: translateY(-2px);
& .node.stash-node .graph-icon {
transform: translateY(-2px);
}
& .graph-adjust-commit-count {
display: flex;
width: 100vw;
align-items: center;
justify-content: center;
}
}

+ 35
- 0
src/webviews/apps/shared/codicons.scss Näytä tiedosto

@ -1,3 +1,38 @@
@keyframes codicon-spin {
100% {
transform: rotate(360deg);
}
}
.icon--sync.icon-modifier--spin,
.icon--loading.icon-modifier--spin,
.icon--gear.icon-modifier--spin {
/* Use steps to throttle FPS to reduce CPU usage */
animation: codicon-spin 1.5s steps(30) infinite;
}
.icon-modifier--disabled {
opacity: 0.5;
}
.icon-modifier--hidden {
opacity: 0;
}
.icon--loading {
/* Use steps to throttle FPS to reduce CPU usage */
animation: codicon-spin 1.5s steps(30) infinite;
/* custom speed & easing for loading icon */
animation-duration: 1s !important;
animation-timing-function: cubic-bezier(0.53, 0.21, 0.29, 0.67) !important;
&::before {
content: '\eb19';
font-family: codicon;
}
}
.icon--branch {
&::before {
content: '\ea68';

Ladataan…
Peruuta
Tallenna