Skip to content

Commit e28248b

Browse files
committed
add better loading dialog for auth
1 parent 125fb89 commit e28248b

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/components/app/desktop/BootUp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ const DriveInfo = (props: { state: number }) => {
178178
<Grid>
179179
<header>
180180
<Typography>
181-
Detecting Primary Drive (C) . . . . . .
181+
Detecting Primary Drive (/dev/sda1) . . . . . .
182182
{props.state >= 13 ? (
183183
<span style={{ color: "#2BC903" }}> SUCCESS </span>
184184
) : null}
@@ -190,7 +190,7 @@ const DriveInfo = (props: { state: number }) => {
190190
<Grid>
191191
<header>
192192
<Typography>
193-
Detecting Secondary Drive (D) . . . . . .
193+
Detecting Secondary Drive (/dev/sda2) . . . . . .
194194
{props.state >= 15 ? (
195195
<span style={{ color: "#2BC903" }}> SUCCESS </span>
196196
) : null}

src/components/terminal/Terminal.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ const Terminal = (
3636
const [emulatorState, setEmulatorState] = useState(props.emulatorState);
3737
const [renderedOutputs, setRenderedOutputs] = useState([]);
3838
const [_, setHistoryIndex] = useState(-1);
39-
const [visibleCursor, setVisibleCursor] = useState<boolean>(true);
39+
const [loadingDots, setLoadingDots] = useState(0);
4040

4141
let emulator = new Emulator();
4242

4343
useEffect(() => {
4444
const interval = setInterval(() => {
45-
setVisibleCursor((visible) => !visible);
45+
setLoadingDots((dots) => (dots + 1) % 4);
4646
}, 600);
4747
return () => clearInterval(interval);
4848
}, []);
@@ -267,13 +267,15 @@ const Terminal = (
267267
Password:
268268
</Box>
269269
{passwordPrompt.loading ? (
270-
<>...</>
270+
<Box component="span" style={{ color: props.theme.outputColor }}>
271+
{".".repeat(loadingDots + 1)}
272+
</Box>
271273
) : (
272274
<Box
273275
width={8}
274276
height={18}
275277
sx={{
276-
visibility: visibleCursor ? "visible" : "hidden",
278+
visibility: loadingDots % 2 === 0 ? "visible" : "hidden",
277279
background: "#FFFFFF"
278280
}}
279281
/>

0 commit comments

Comments
 (0)