diff --git a/src/lib/components/app-account-select.svelte b/src/lib/components/app-account-select.svelte index 7c107ba..83d8428 100644 --- a/src/lib/components/app-account-select.svelte +++ b/src/lib/components/app-account-select.svelte @@ -15,6 +15,7 @@ import { browser } from '$app/environment'; import { deleteCookiesOnNonBrowser } from '$lib/helpers/cookie'; import { socketStore } from '$lib/core/stores/websocketStore'; + import { GlobalEventBus } from '$lib/core/utils/eventBus'; const sidebar = useSidebar(); @@ -37,7 +38,7 @@ if (instance) { try { await adb.executeCmd('rm /sdcard/coffeevending/ignore_pass'); - await adb.executeCmd('reboot'); + // await adb.executeCmd('reboot'); await adb.disconnect(); } catch (e) { console.error('error disconnect device while logging out', e); @@ -45,6 +46,7 @@ } authStore.set(null); + GlobalEventBus.clear(); let socket = get(socketStore); diff --git a/src/lib/components/recipe-editor-dialog.svelte b/src/lib/components/recipe-editor-dialog.svelte index 3fac5c8..cd8b52f 100644 --- a/src/lib/components/recipe-editor-dialog.svelte +++ b/src/lib/components/recipe-editor-dialog.svelte @@ -362,11 +362,11 @@ updateMachineStatus(''); } - console.log( - 'machine status pinging recipe editor dialog', - getMachineStatus(), - $machineInfoStore?.status - ); + // console.log( + // 'machine status pinging recipe editor dialog', + // getMachineStatus(), + // $machineInfoStore?.status + // ); // update machine status // check-connection diff --git a/src/lib/components/terminal-drawer.svelte b/src/lib/components/terminal-drawer.svelte new file mode 100644 index 0000000..195a065 --- /dev/null +++ b/src/lib/components/terminal-drawer.svelte @@ -0,0 +1,705 @@ + + + + + + +{#if isOpen} +
+{/if} + + + +Admin permissions required
+Terminal commands are restricted to admin users
+$ {expandedOutput.command}
+ {expandedOutput.fullOutput}
+ {:else}
+ (no output)
+ {/if} +No command history yet
+$ {selectedHistoryOutput.command}
+ {selectedHistoryOutput.lines} line{selectedHistoryOutput.lines !== 1
+ ? 's'
+ : ''}
+ {:else}
+ Select a command to view output
+ {/if}
+ {selectedHistoryOutput.fullOutput}
+ {:else}
+ Select a command from the left panel
+to view its full output here
+