@setoelkahfi / svara / commits / de860fe

feat: added buttont to clear terminal

Signed-off-by: mellobacon <mellodev@outlook.com>

mellobacon committed Feb 10, 2024 at 15:00 UTC de860fe43ecf3d96897478c459edc0f2009b0e5c
1 file changed +8 -8
src/lib/ToolView.svelte
+8 -8
@@ -1,22 +1,22 @@
1 <script lang="ts">
2 - import { showBottomPanel } from "./Statusbar.svelte";
2 + import { hideBottomPanel } from "./Statusbar.svelte";
3 import Ellipsis from "carbon-icons-svelte/lib/OverflowMenuHorizontal.svelte";
4 import Menu from "./utility/Menu.svelte";
5 + import { clearTerminal } from "./Terminal.svelte";
6
7 export let content = null;
8 export let name = "Tool";
8 -
9 - function hidePanel() {
10 - showBottomPanel.set(false);
11 - }
9 </script>
10 <div id="toolview">
11 <div class="header">{name}
12 <div class="header-tools">
13 <div class="tool-buttons">
17 - <Menu right menu={{icon: Ellipsis, children: [{name: "Kill Terminal", action: () => {}},]}}></Menu>
14 + <Menu right menu={{icon: Ellipsis, children: [
15 + {name: "Clear Terminal", action: () => {
16 + clearTerminal();
17 + }},]}}></Menu>
18 </div>
19 - <span class="close" on:click={hidePanel}></span>
19 + <span class="close" on:click={hideBottomPanel}></span>
20 </div>
21 </div>
22 <div class="toolview-container">
@@ -69,4 +69,4 @@
69 }
70 }
71 }
72 -</style>
\ No newline at end of file
72 +</style>