forked from equinor/webviz
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved to Amsterdam
notification (equinor#752)
- Loading branch information
1 parent
56055dd
commit 1431123
Showing
5 changed files
with
183 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from "react"; | ||
|
||
import { WebvizSpinnerAmsterdam } from "./WebvizSpinner/webvizSpinnerAmsterdam"; | ||
|
||
export function TempMovedToAmsterdamNotifier(): React.ReactNode { | ||
const [timeLeft, setTimeLeft] = React.useState(10); | ||
|
||
React.useEffect(() => { | ||
let internalTimeLeft = 10; | ||
const interval = setInterval(() => { | ||
if (internalTimeLeft === 0) { | ||
window.location.href = "https://webviz.app.c2.radix.equinor.com/"; | ||
return; | ||
} | ||
setTimeLeft((prevTimeLeft) => prevTimeLeft - 1); | ||
internalTimeLeft--; | ||
}, 1000); | ||
|
||
return () => clearInterval(interval); | ||
}, []); | ||
|
||
return ( | ||
<div className="w-screen h-screen flex flex-col items-center justify-center gap-8"> | ||
<WebvizSpinnerAmsterdam size={100} /> | ||
<div className="text-lg font-bold">Webviz moved to Amsterdam</div> | ||
<div> | ||
You can now find us at:{" "} | ||
<a href="https://webviz.app.c2.radix.equinor.com/" className="text-blue-600 underline"> | ||
https://webviz.app.c2.radix.equinor.com/ | ||
</a> | ||
</div> | ||
<div>We are taking you to our new address in {timeLeft}s...</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { WebvizSpinnerAmsterdam as WebvizSpinner } from "./webvizSpinnerAmsterdam"; |
85 changes: 85 additions & 0 deletions
85
frontend/src/tempMoved/WebvizSpinner/webvizSpinnerAmsterdam.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
.webviz-spinner-amsterdam { | ||
position: relative; | ||
perspective: 1000; | ||
} | ||
|
||
.webviz-spinner-amsterdam > div { | ||
border-color: transparent; | ||
} | ||
|
||
.webviz-spinner-amsterdam > div:nth-child(1) { | ||
animation: spin1-amsterdam 1s linear infinite; | ||
} | ||
|
||
.webviz-spinner-amsterdam > div:nth-child(2) { | ||
animation: spin2-amsterdam 0.6s linear infinite; | ||
} | ||
|
||
.webviz-spinner-amsterdam > div:nth-child(3) { | ||
animation: spin3-amsterdam 0.8s linear infinite; | ||
} | ||
|
||
@keyframes spin1-amsterdam { | ||
0% { | ||
transform: rotateY(-10deg) rotateX(60deg) rotateY(48deg) rotateZ(0deg); | ||
border-top-color: #C8102E; | ||
z-index: -2; | ||
} | ||
49% { | ||
transform: rotateY(-10deg) rotateX(60deg) rotateY(48deg) rotateZ(179deg); | ||
border-top-color: #C8102E; | ||
z-index: 0; | ||
} | ||
50% { | ||
transform: rotateY(-10deg) rotateX(60deg) rotateY(48deg) rotateZ(180deg); | ||
border-top-color: #003DA5; | ||
z-index: 2; | ||
} | ||
100% { | ||
transform: rotateY(-10deg) rotateX(60deg) rotateY(48deg) rotateZ(359deg); | ||
border-top-color: #003DA5; | ||
z-index: 0; | ||
} | ||
} | ||
|
||
@keyframes spin2-amsterdam { | ||
0% { | ||
transform: rotateY(10deg) rotateX(60deg) rotateY(-48deg) rotateZ(0deg); | ||
border-top-color: #C8102E; | ||
} | ||
49% { | ||
transform: rotateY(10deg) rotateX(60deg) rotateY(-48deg) rotateZ(179deg); | ||
border-top-color: #C8102E; | ||
} | ||
50% { | ||
transform: rotateY(10deg) rotateX(60deg) rotateY(-48deg) rotateZ(180deg); | ||
border-top-color: #003DA5; | ||
} | ||
100% { | ||
transform: rotateY(10deg) rotateX(60deg) rotateY(-48deg) rotateZ(359deg); | ||
border-top-color: #003DA5; | ||
} | ||
} | ||
|
||
@keyframes spin3-amsterdam { | ||
0% { | ||
transform: rotateX(58deg) rotateZ(0deg); | ||
border-top-color: #003DA5; | ||
z-index: -1; | ||
} | ||
49% { | ||
transform: rotateX(58deg) rotateZ(179deg); | ||
border-top-color: #003DA5; | ||
z-index: 0; | ||
} | ||
50% { | ||
transform: rotateX(58deg) rotateZ(180deg); | ||
border-top-color: #C8102E; | ||
z-index: 1; | ||
} | ||
100% { | ||
transform: rotateX(58deg) rotateZ(359deg); | ||
border-top-color: #C8102E; | ||
z-index: 0; | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
frontend/src/tempMoved/WebvizSpinner/webvizSpinnerAmsterdam.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import React from "react"; | ||
|
||
import "./webvizSpinnerAmsterdam.css"; | ||
|
||
export type WebvizSpinnerAmsterdamProps = { | ||
size: number; | ||
}; | ||
|
||
export const WebvizSpinnerAmsterdam: React.FC<WebvizSpinnerAmsterdamProps> = (props) => { | ||
const borderWidth = props.size / 10; | ||
return ( | ||
<div style={{ width: props.size, height: props.size }} className="webviz-spinner-amsterdam"> | ||
<div | ||
className="rounded-full absolute border-t-[#003DA5]" | ||
style={{ | ||
borderWidth: borderWidth, | ||
width: props.size - 0, | ||
height: props.size - 0, | ||
top: 5, | ||
}} | ||
/> | ||
<div | ||
className="rounded-full absolute border-t-[#003DA5]" | ||
style={{ | ||
borderWidth: borderWidth, | ||
width: props.size - 0, | ||
height: props.size - 0, | ||
}} | ||
/> | ||
<div | ||
className="rounded-full absolute border-t-[#C8102E]" | ||
style={{ | ||
borderWidth: borderWidth, | ||
width: props.size - 8, | ||
height: props.size - 8, | ||
top: 12, | ||
left: 5, | ||
}} | ||
/> | ||
</div> | ||
); | ||
}; |