Skip to content

Commit

Permalink
enhance(client): show loading icon on splash screen
Browse files Browse the repository at this point in the history
Close #8481
  • Loading branch information
syuilo committed Apr 11, 2022
1 parent a7015e6 commit 08ff492
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ You should also include the user name that made the change.

### Improvements
- Improve webhook @syuilo
- Client: Show loading icon on splash screen @syuilo

### Bugfixes
- API: parameter validation of users/show was wrong
Expand Down
47 changes: 46 additions & 1 deletion packages/backend/src/server/web/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ html {
transition: opacity 0.5s ease;
}

#splash > img {
#splashIcon {
position: absolute;
top: 0;
right: 0;
Expand All @@ -27,3 +27,48 @@ html {
height: 64px;
pointer-events: none;
}

#splashSpinner {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
display: inline-block;
width: 28px;
height: 28px;
transform: translateY(70px);
}

#splashSpinner:before,
#splashSpinner:after {
content: " ";
display: block;
box-sizing: border-box;
width: 28px;
height: 28px;
border-radius: 50%;
border: solid 4px;
}

#splashSpinner:before {
border-color: currentColor;
opacity: 0.3;
}

#splashSpinner:after {
position: absolute;
top: 0;
border-color: currentColor transparent transparent transparent;
animation: splashSpinner 0.5s linear infinite;
}

@keyframes splashSpinner {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
3 changes: 2 additions & 1 deletion packages/backend/src/server/web/views/base.pug
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@ html
br
| Please turn on your JavaScript
div#splash
img(src= icon || '/static-assets/splash.png')
img#splashIcon(src= icon || '/static-assets/splash.png')
div#splashSpinner
block content

0 comments on commit 08ff492

Please sign in to comment.