diff --git a/control/frontend/src/components/ControlView.svelte b/control/frontend/src/components/ControlView.svelte index e718e63..9900a53 100644 --- a/control/frontend/src/components/ControlView.svelte +++ b/control/frontend/src/components/ControlView.svelte @@ -15,6 +15,8 @@ import PopUp from './PopUp.svelte'; import type { PopupContent } from '../ts/types'; import KeyInput from './KeyInput.svelte'; + import { send_keyboard_input, show_blackscreen } from '../ts/api_handler'; + import { run_on_all_selected_displays } from '../ts/stores/displays'; let popup_content: PopupContent = $state({ open: false, @@ -55,17 +57,42 @@
- { + run_on_all_selected_displays( + () => { + send_keyboard_input; + }, + true, + 'VK_LEFT' + ); + }}> - { + run_on_all_selected_displays( + () => { + send_keyboard_input; + }, + true, + 'VK_RIGHT' + ); + }}>
- +
diff --git a/control/frontend/src/ts/api_handler.ts b/control/frontend/src/ts/api_handler.ts index eadc262..956faa1 100644 --- a/control/frontend/src/ts/api_handler.ts +++ b/control/frontend/src/ts/api_handler.ts @@ -74,7 +74,7 @@ done return folder_element_list; } -export async function get_file_tree_data(ip: string, path: string): Promise { +export async function get_file_tree_data(ip: string, path: string): Promise { const options = { method: 'PATCH', headers: { 'content-type': 'application/json' }, @@ -84,11 +84,22 @@ export async function get_file_tree_data(ip: string, path: string): Promise
` + }) + }; + await request_display(ip, '/showHTML', options); +} + export async function ping_ip(ip: string): Promise { const raw_response = await request_control(`/ping?ip=${ip}`, { method: 'GET' });