Skip to content

Commit

Permalink
oulay over logs applied
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahuljagwani committed Aug 4, 2023
1 parent 5cb8005 commit 24640c8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 12 deletions.
28 changes: 16 additions & 12 deletions src/component/Logs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,32 @@ const Logs = ({ superState, dispatcher }) => {

useEffect(() => {
if (superState.logs) {
document.getElementById('outlay').style.display = 'block';
document.getElementById('terminal').style.display = 'block';
setOutput(superState.logsmessage);
} else {
document.getElementById('terminal').style.display = 'none';
document.getElementById('outlay').style.display = 'none';
setOutput(superState.logsmessage);
}
}, [superState.logs]);

return (
<>
<div className="terminal" id="terminal">
<div className="terminal-header">
Logs
<button type="button" className="clear" onClick={clearTerminal}>Clear</button>
<button type="button" className="closelogs" onClick={closeTerminal}>X</button>
</div>
<div className="terminal-body">
{output.split('\n').map((line) => (
<div className="terminal-line">
{line}
</div>
))}
<div className="outlay" id="outlay">
<div className="terminal" id="terminal">
<div className="terminal-header">
Logs
<button type="button" className="clear" onClick={clearTerminal}>Clear</button>
<button type="button" className="closelogs" onClick={closeTerminal}>X</button>
</div>
<div className="terminal-body">
{output.split('\n').map((line) => (
<div className="terminal-line">
{line}
</div>
))}
</div>
</div>
</div>
</>
Expand Down
8 changes: 8 additions & 0 deletions src/component/logs.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
margin: 20px auto;
z-index: 10000;
}

.outlay {
position: absolute;
width: 100vw;
height: 100vh;
z-index: 999;
display: none;
}

.terminal-header {
padding: 5px;
Expand Down

0 comments on commit 24640c8

Please sign in to comment.