-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
42579b4
commit 5a78eb9
Showing
6 changed files
with
86 additions
and
46 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { keyframes } from "@vanilla-extract/css"; | ||
import { recipe } from "@vanilla-extract/recipes"; | ||
import { SPACING_UNIT } from "../../theme.css"; | ||
|
||
export const backdropFadeIn = keyframes({ | ||
"0%": { backdropFilter: "blur(0px)", backgroundColor: "rgba(0, 0, 0, 0.5)" }, | ||
"100%": { | ||
backdropFilter: "blur(2px)", | ||
backgroundColor: "rgba(0, 0, 0, 0.7)", | ||
}, | ||
}); | ||
|
||
export const backdropFadeOut = keyframes({ | ||
"0%": { backdropFilter: "blur(2px)", backgroundColor: "rgba(0, 0, 0, 0.7)" }, | ||
"100%": { | ||
backdropFilter: "blur(0px)", | ||
backgroundColor: "rgba(0, 0, 0, 0)", | ||
}, | ||
}); | ||
|
||
export const backdrop = recipe({ | ||
base: { | ||
animationName: backdropFadeIn, | ||
animationDuration: "0.4s", | ||
backgroundColor: "rgba(0, 0, 0, 0.7)", | ||
position: "absolute", | ||
width: "100%", | ||
height: "100%", | ||
display: "flex", | ||
justifyContent: "center", | ||
alignItems: "center", | ||
zIndex: 1, | ||
top: 0, | ||
padding: `${SPACING_UNIT * 3}px`, | ||
backdropFilter: "blur(2px)", | ||
transition: "all ease 0.2s", | ||
}, | ||
variants: { | ||
closing: { | ||
true: { | ||
animationName: backdropFadeOut, | ||
backdropFilter: "blur(0px)", | ||
backgroundColor: "rgba(0, 0, 0, 0)", | ||
}, | ||
}, | ||
}, | ||
}); |
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,12 @@ | ||
import * as styles from "./backdrop.css"; | ||
|
||
export interface BackdropProps { | ||
isClosing?: boolean; | ||
children: React.ReactNode; | ||
} | ||
|
||
export function Backdrop({ isClosing = false, children }: BackdropProps) { | ||
return ( | ||
<div className={styles.backdrop({ closing: isClosing })}>{children}</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
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
21 changes: 21 additions & 0 deletions
21
src/renderer/src/pages/game-details/online-fix-installation-guide.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,21 @@ | ||
import { Button, CheckboxField, Modal, TextField } from "@renderer/components"; | ||
import { Backdrop } from "@renderer/components/backdrop/backdrop"; | ||
import { createPortal } from "react-dom"; | ||
|
||
export function OnlineFixInstallationGuide() { | ||
return ( | ||
<Modal title="Extraction password" visible> | ||
<form> | ||
<p> | ||
When asked for an extraction password for OnlineFix repacks, use the | ||
following one: | ||
</p> | ||
<TextField value="online-fix.me" readOnly disabled /> | ||
|
||
<CheckboxField label="Don't show it again" /> | ||
|
||
<Button>Ok</Button> | ||
</form> | ||
</Modal> | ||
); | ||
} |