Skip to content

Commit f087eb8

Browse files
committed
(v0.1.6.4-alpha) Loading Screen + Sound
A loading screen on lockscreen after correct pass + SOUND. This is a very small YET tedious stuff that I had to get out of the way lmao.
1 parent 66d77a3 commit f087eb8

File tree

8 files changed

+90
-31
lines changed

8 files changed

+90
-31
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Your PC has been compromised by a group called the "HackClub". Can you regain co
66
- [ ] HINT after failed try.
77
- [ ] Add more stuff to Lockscreen.
88
- [X] Animations in the Lockscreen.
9-
- [ ] A loading screen on lockscreen after correct pass slowly fade while loading desktop in the back + SOUND.
9+
- [X] A loading screen on lockscreen after correct pass + SOUND. (Done v0.1.6.4)
10+
- [ ] loading screen slowly fade while loading desktop in the back.
1011
- [X] Fullscreen after login (Done v0.1.6.3)
1112
- [X] Windows Design + Desktop Design (Done in v0.1.3... & v0.1.4... respectively)
1213
- [X] Windows start menu does nothing rn. (Done in v0.1.4.4)
@@ -38,7 +39,7 @@ Your PC has been compromised by a group called the "HackClub". Can you regain co
3839
- [X] BUG: Notepad selection stops when it goes outside the rnd window. (Fixed in v0.1.5.5(1))
3940
- [X] Window App's title bar and tab bar colors need adjusting. (Its fine lol)
4041
- [ ] Notepad Generalised component
41-
- [ ] CHANGE CHROME TO BRAVE
42+
- [ ] ~~CHANGE CHROME TO BRAVE~~ (I aint doing this)
4243
- [X] VSCode App (Added v0.1.6.2)
4344
- [X] Terminal (v0.1.6.0 ... v0.1.6.1)
4445
- [X] Terminal (Proper) Selection, Proper fonts, Polish (Done v0.1.6.1)

package-lock.json

Lines changed: 30 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"react-draggable": "^4.5.0",
1919
"react-rnd": "^10.5.2",
2020
"react-router": "^7.13.0",
21-
"react-router-dom": "^7.13.0"
21+
"react-router-dom": "^7.13.0",
22+
"react-spinners": "^0.17.0"
2223
},
2324
"devDependencies": {
2425
"@eslint/js": "^9.39.1",

public/sounds/startup.mp3

64.2 KB
Binary file not shown.

src/apps/chrome.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ function Chrome() {
77
<iframe
88
className={"chrome-iframe"}
99
src={"https://5.39.47.103/#/cast/browser"}
10+
allow="camera; microphone; display-capture; clipboard-read; clipboard-write; self"
11+
sandbox="allow-scripts allow-same-origin allow-forms allow-popups allow-top-navigation allow-downloads"
1012
/>
1113
</>
1214
)

src/routes/desktop.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@ import Draggable from 'react-draggable';
1010
import { motion, AnimatePresence } from "framer-motion";
1111

1212
import SystemTray from "../components/SystemTray.jsx";
13+
import LockScreen from "./lockscreen.jsx";
14+
1315

1416
function Desktop() {
17+
const startupSound = new Audio("/sounds/startup.mp3");
18+
startupSound.volume = Math.min(1.5, 1.0);
19+
startupSound.play().catch(e => console.log("Audio play blocked", e));
20+
1521
const [isStartMenuActive, setIsStartMenuActive] = useState(false);
1622

1723
const startMenuRef = useRef(null);

src/routes/lockscreen.jsx

Lines changed: 46 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ import '../styles/routes/lockscreen.css';
44
import { Wifi, BatteryCharging } from 'lucide-react';
55
import {useNavigate} from "react-router";
66
import * as React from "react";
7-
87
import { useDateTime } from "../components/DateTime.jsx";
98

9+
import { GridLoader } from "react-spinners";
10+
11+
12+
console.log("Password is: DuckyCelestron76700");
13+
1014
function LockScreen() {
1115
const [showPin, setShowPin] = useState(false);
1216

@@ -30,18 +34,21 @@ function LockScreen() {
3034
const [password, setPassword] = useState("");
3135
const navigate = useNavigate();
3236

37+
const [isLoading, setIsLoading] = useState(false);
38+
3339
const handleSubmit = (e) => {
3440
if (e.key === "Enter") {
3541
if (password === "DuckyCelestron76700" || password === "42069") {
36-
3742
const elem = document.documentElement;
38-
if (elem.requestFullscreen) {
39-
elem.requestFullscreen().catch(err => {
43+
elem.requestFullscreen().catch(err => {
4044
console.error(`Error attempting to enable fullscreen: ${err.message}`);
41-
});
42-
}
45+
});
46+
47+
setIsLoading(true);
4348

44-
navigate("/desktop");
49+
setTimeout(() => {
50+
navigate("/desktop");
51+
}, 3000);
4552
}
4653
}
4754
}
@@ -71,25 +78,38 @@ function LockScreen() {
7178
<div className={"pfp"}/>
7279
<p className={"username"}>Rupnil's PC</p>
7380
{/*<p className={"enter-pass"}>Enter your password</p>*/}
74-
<input
75-
type={"text"}
76-
className={"input"}
77-
id={"password"}
78-
placeholder={"Password"}
79-
onChange={(e) => setPassword(e.target.value)}
80-
onKeyDown={handleSubmit}
81-
autoFocus={true}
82-
/>
83-
<p className={"hint"}>
84-
HINT: I love making <a
85-
className={"devlog"}
86-
href={"https://flavortown.hackclub.com/projects/13380"}
87-
target="_blank"
88-
rel="noopener noreferrer">
89-
Devlogs!
90-
</a>
91-
</p>
92-
{/*<p className={"hint"}>HINT: Check the oldest <a className={"devlog"} href={"https://flavortown.hackclub.com/projects/13380"}>Devlogs!</a></p>*/}
81+
82+
{!isLoading ? (
83+
<>
84+
<input
85+
type={"text"}
86+
className={"input"}
87+
id={"password"}
88+
placeholder={"Password"}
89+
onChange={(e) => setPassword(e.target.value)}
90+
onKeyDown={handleSubmit}
91+
autoFocus={true}
92+
/>
93+
<p className={"hint"}>
94+
Ps: Check the first <a
95+
className={"devlog"}
96+
href={"https://flavortown.hackclub.com/projects/13380"}
97+
target="_blank"
98+
rel="noopener noreferrer">
99+
Devlogs
100+
</a> or Console!
101+
</p>
102+
</>
103+
) : (
104+
<div className="loading-container">
105+
<GridLoader
106+
color="#ffffff"
107+
size={8}
108+
margin={4}
109+
speedMultiplier={1}
110+
/>
111+
</div>
112+
)}
93113
</div>
94114
<div className={"system"}>
95115
<div className={"profile"}>

src/styles/routes/lockscreen.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,4 @@
199199

200200
.hidden {
201201
display: none;
202-
}
202+
}

0 commit comments

Comments
 (0)