Skip to content

Commit 24640c8

Browse files
committed
oulay over logs applied
1 parent 5cb8005 commit 24640c8

2 files changed

Lines changed: 24 additions & 12 deletions

File tree

src/component/Logs.jsx

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,32 @@ const Logs = ({ superState, dispatcher }) => {
1616

1717
useEffect(() => {
1818
if (superState.logs) {
19+
document.getElementById('outlay').style.display = 'block';
1920
document.getElementById('terminal').style.display = 'block';
2021
setOutput(superState.logsmessage);
2122
} else {
2223
document.getElementById('terminal').style.display = 'none';
24+
document.getElementById('outlay').style.display = 'none';
2325
setOutput(superState.logsmessage);
2426
}
2527
}, [superState.logs]);
2628

2729
return (
2830
<>
29-
<div className="terminal" id="terminal">
30-
<div className="terminal-header">
31-
Logs
32-
<button type="button" className="clear" onClick={clearTerminal}>Clear</button>
33-
<button type="button" className="closelogs" onClick={closeTerminal}>X</button>
34-
</div>
35-
<div className="terminal-body">
36-
{output.split('\n').map((line) => (
37-
<div className="terminal-line">
38-
{line}
39-
</div>
40-
))}
31+
<div className="outlay" id="outlay">
32+
<div className="terminal" id="terminal">
33+
<div className="terminal-header">
34+
Logs
35+
<button type="button" className="clear" onClick={clearTerminal}>Clear</button>
36+
<button type="button" className="closelogs" onClick={closeTerminal}>X</button>
37+
</div>
38+
<div className="terminal-body">
39+
{output.split('\n').map((line) => (
40+
<div className="terminal-line">
41+
{line}
42+
</div>
43+
))}
44+
</div>
4145
</div>
4246
</div>
4347
</>

src/component/logs.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
margin: 20px auto;
1717
z-index: 10000;
1818
}
19+
20+
.outlay {
21+
position: absolute;
22+
width: 100vw;
23+
height: 100vh;
24+
z-index: 999;
25+
display: none;
26+
}
1927

2028
.terminal-header {
2129
padding: 5px;

0 commit comments

Comments
 (0)