Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update global loading mask #1760

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added resources/public/loading-indicator.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 14 additions & 25 deletions resources/template/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,24 @@
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
transform: -webkit-translate(-50%, -50%);
transform: -moz-translate(-50%, -50%);
transform: -ms-translate(-50%, -50%);
z-index: 999;
}

.loadmask-hidden {
animation: fadeOut 1.5s forwards;
}

.loadmask > img {
min-width: 50%;
.loadmask > #loadmask-image {
width: 100%;
height: 100%;
max-width: 250px;
object-fit: scale-down;
}

.loadmask > #loadmask-indicator {
width: 50px;
display: table;
margin: 0 auto;
display: block;
}

@keyframes fadeOut {
Expand All @@ -37,29 +41,15 @@
transform: scale(0.5);
}
}

@keyframes heartBeat {
0% {
opacity: 0.2;
}
50% {
opacity: 1;
}
100% {
opacity: 0.2;
}
}
</style>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="loadmask" class="loadmask">
<img src="loading-placeholder.png" id="loadmask-image">
<span id="loading-text">
Loading, please wait…
</span>
<img src="./loading-placeholder.png" id="loadmask-image">
<img src="./loading-indicator.gif" id="loadmask-indicator">
</div>
<script src="./gis-client-config.js"></script>
<script>
Expand All @@ -69,14 +59,13 @@
}
</script>
<script>
const regex = /\applicationId=(\d+)/;
const appIdCand = location.search.match(regex);
const appIdExpression = /\applicationId=(\d+)/;
const appIdCand = location.search.match(appIdExpression);
let appId = appIdCand ? appIdCand[1] : null;
let logoPath = './shogun_spinner.gif';
if (appId) {
logoPath = localStorage.getItem(`SHOGun_Logo_Path_${appId}`);
}
document.getElementById('loading-text').style.display = 'none';
const loadingImageElement = document.getElementById('loadmask-image');
if (logoPath && loadingImageElement) {
loadingImageElement.src = logoPath;
Expand Down
Loading