Skip to content

Commit

Permalink
fix(frontend): hide terminal when not logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
ravenclaw900 committed Nov 20, 2021
1 parent 109ddc7 commit 274ed46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/frontend/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@
<Route path="software"
><Software {socketData} {socketSend} /></Route
>
<Route path="terminal"><Terminal /></Route>
<Route path="terminal"><Terminal {loginDialog} /></Route>
<Route path="management"
><Management {socketSend} {socketData} /></Route
>
Expand Down
3 changes: 2 additions & 1 deletion src/frontend/src/pages/Terminal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import "xterm/css/xterm.css";
export let loginDialog: boolean;
let termDiv;
let proto = window.location.protocol == "https:" ? "wss" : "ws";
Expand Down Expand Up @@ -41,4 +42,4 @@
onDestroy(() => socket.close(1000));
</script>

<div bind:this={termDiv} class="h-full" />
<div bind:this={termDiv} class="h-full{loginDialog ? ' hidden' : ''}" />

0 comments on commit 274ed46

Please sign in to comment.