Skip to content
Open
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 modified lib/Styles/globe.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion lib/Views/Loader.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import globeGif from "../Styles/globe.gif";
import Styles from "./loader.scss";

const loadingStr = "Loading the globe";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Literal strings should be defined in translations. See languageOverrides.json.


export const Loader = () => {
return (
<div
Expand All @@ -9,7 +11,10 @@ export const Loader = () => {
backgroundColor: "#383F4D"
}}
>
<img src={globeGif} />
<div className={Styles.loaderUiContainer}>
<img src={globeGif} />
<div className={Styles.loaderUiText}>{loadingStr}</div>
</div>
</div>
);
};
30 changes: 14 additions & 16 deletions lib/Views/loader.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
.loader-ui img {
display: block;
margin: calc(50vh - 150px) auto;
}

@media (min-width: 768px) {
.loader-ui {
display: flex;
position: fixed;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
}
}

.loader-ui {
transition: opacity, 2s;
opacity: 1;
Expand All @@ -24,8 +8,22 @@
left: 0;
top: 0;
pointer-events: none;
display: flex;
}

.loader-ui-hide {
opacity: 0;
}

.loader-ui-container {
margin: calc(50vh - 150px) auto;
text-align: center;
}

.loader-ui-text {
color: #686d79;
font-family: sans-serif;
font-weight: bold;
position: relative;
top: -30%;
}
4 changes: 4 additions & 0 deletions lib/Views/loader.scss.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
declare namespace LoaderScssNamespace {
export interface ILoaderScss {
"loader-ui": string;
"loader-ui-container": string;
"loader-ui-hide": string;
"loader-ui-text": string;
loaderUi: string;
loaderUiContainer: string;
loaderUiHide: string;
loaderUiText: string;
}
}

Expand Down