mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
feat: use hourglass icon for loading
This commit is contained in:
parent
66871fcbd2
commit
9f4e0d80ce
3 changed files with 32 additions and 2 deletions
|
|
@ -8,6 +8,7 @@ import {
|
|||
FileZipIcon as FileZip,
|
||||
GearIcon as Gear,
|
||||
GrabberIcon as Grabber,
|
||||
HourglassIcon as Hourglass,
|
||||
Icon as OcticonIcon,
|
||||
IconProps,
|
||||
MarkdownIcon as Markdown,
|
||||
|
|
@ -25,6 +26,11 @@ function getSVGIconComponent(
|
|||
name: string
|
||||
} {
|
||||
switch (type) {
|
||||
case 'hourglass':
|
||||
return {
|
||||
IconComponent: Hourglass,
|
||||
name: 'Hourglass',
|
||||
}
|
||||
case 'submodule':
|
||||
return {
|
||||
IconComponent: Submodule,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export function LoadingIndicator({ text }: Props) {
|
|||
return (
|
||||
<div className={'loading-indicator-container'}>
|
||||
<div className={'loading-indicator'}>
|
||||
<Icon className={'loading-indicator-icon'} type={'gear'} />
|
||||
<Icon className={'loading-indicator-icon'} type={'hourglass'} />
|
||||
{text}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ $minimal-z-index: max($github-header-z-index, $github-pull-request-float-header-
|
|||
.octicon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
animation: rotate 2s infinite linear;
|
||||
animation: pulse-rotate 1.8s infinite ease;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -558,3 +558,27 @@ $minimal-z-index: max($github-header-z-index, $github-pull-request-float-header-
|
|||
transform: rotateZ(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes pulse-rotate {
|
||||
0% {
|
||||
transform: rotateZ(0);
|
||||
}
|
||||
20% {
|
||||
transform: rotateZ(190deg);
|
||||
}
|
||||
30% {
|
||||
transform: rotateZ(175deg);
|
||||
}
|
||||
50% {
|
||||
transform: rotateZ(180deg);
|
||||
}
|
||||
70% {
|
||||
transform: rotateZ(370deg);
|
||||
}
|
||||
80% {
|
||||
transform: rotateZ(355deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotateZ(360deg);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue