Add generating animation and fix robot corrupted robot garage load

This commit is contained in:
Reckless_Satoshi 2023-04-24 06:43:21 -07:00
parent 7e47fb60bf
commit e4c1089b46
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
3 changed files with 42 additions and 4 deletions

View File

@ -50,6 +50,8 @@ const RobotAvatar: React.FC<Props> = ({
? theme.palette.mode === 'dark'
? 'loadingAvatarDark'
: 'loadingAvatar'
: theme.palette.mode === 'dark'
? 'generatingAvatarDark'
: 'generatingAvatar';
useEffect(() => {

View File

@ -28,7 +28,6 @@ class Garage {
delete = () => {
this.slots = [emptySlot];
systemClient.deleteItem('garage');
this.save();
};
updateRobot: (robot: Robot, index: number) => void = (robot, index) => {

View File

@ -176,7 +176,7 @@ input[type='number'] {
}
}
@keyframes animatedBackground {
@keyframes animatedLoadingBackground {
from {
background-position: 0 0;
}
@ -185,6 +185,15 @@ input[type='number'] {
}
}
@keyframes animatedGeneratingBackground {
from {
background-position: 0 0;
}
to {
background-position: 0 200px;
}
}
.loadingAvatar {
background-size: 100%;
border-radius: 50%;
@ -199,7 +208,7 @@ input[type='number'] {
);
background-position: 0px 0px;
background-repeat: repeat;
animation: animatedBackground 5s linear infinite;
animation: animatedLoadingBackground 5s linear infinite;
}
.loadingAvatarDark {
@ -216,7 +225,7 @@ input[type='number'] {
);
background-position: 0px 0px;
background-repeat: repeat;
animation: animatedBackground 5s linear infinite;
animation: animatedLoadingBackground 5s linear infinite;
}
.generatingAvatar {
@ -225,4 +234,32 @@ input[type='number'] {
outline: 2px solid #555;
outline-offset: -2px;
filter: dropShadow(1px 1px 1px #000000);
background-image: linear-gradient(
0deg,
#ffffff00 0%,
#dbdbdb93 40%,
#f7f7f791 60%,
#ffffff00 100%
);
background-position: 0px 0px;
background-repeat: repeat;
animation: animatedGeneratingBackground 5s linear infinite;
}
.generatingAvatarDark {
background-size: 100%;
border-radius: 50%;
outline: 2px solid #555;
outline-offset: -2px;
filter: dropShadow(1px 1px 1px #000000);
background-image: linear-gradient(
0deg,
#6e6e6e00 0%,
#14141479 40%,
#14141479 60%,
#6e6e6e00 100%
);
background-position: 0px 0px;
background-repeat: repeat;
animation: animatedGeneratingBackground 5s linear infinite;
}