diff --git a/dashboard/frontend/index.html b/dashboard/frontend/index.html
index 91b8abd..febc182 100644
--- a/dashboard/frontend/index.html
+++ b/dashboard/frontend/index.html
@@ -2,7 +2,7 @@
-
+
NAS Dashboard
diff --git a/dashboard/frontend/src/routes/Terminal.svelte b/dashboard/frontend/src/routes/Terminal.svelte
index 4ed7054..84ebd30 100644
--- a/dashboard/frontend/src/routes/Terminal.svelte
+++ b/dashboard/frontend/src/routes/Terminal.svelte
@@ -36,6 +36,7 @@
let voiceTick = $state(0);
let isDark = $state(false);
let isFullscreen = $state(false);
+ let showActionButtons = $state(false);
let tabCounter = 0;
const tabData = new Map();
@@ -465,18 +466,27 @@
if (!document.fullscreenElement) {
elem.requestFullscreen().then(() => {
isFullscreen = true;
+ showActionButtons = true;
}).catch(err => {
console.error('Failed to enter fullscreen:', err);
});
} else {
document.exitFullscreen().then(() => {
isFullscreen = false;
+ showActionButtons = false;
}).catch(err => {
console.error('Failed to exit fullscreen:', err);
});
}
}
+ function sendKey(key) {
+ const currentWs = tabData.get(activeTab)?.ws;
+ if (currentWs?.readyState === 1) {
+ currentWs.send(new TextEncoder().encode(key));
+ }
+ }
+
onMount(() => {
syncTheme();
themeObserver.observe(document.documentElement, { attributes: true, attributeFilter: ["class"] });
@@ -486,6 +496,7 @@
// Listen for fullscreen changes
document.addEventListener('fullscreenchange', () => {
isFullscreen = !!document.fullscreenElement;
+ showActionButtons = !!document.fullscreenElement;
});
});
@@ -510,6 +521,33 @@
Terminal
{/if}
+
+ {#if showActionButtons && activeTab}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {/if}
+
{#each tabs as tab (tab.id)}