Compare commits

..

16 Commits

Author SHA1 Message Date
2mal3 cbbf50e5a4 bump to v0.1.2 2026-01-29 20:31:46 +01:00
2mal3 934dd42866 fix(control): typo in credits 2026-01-24 11:26:51 +01:00
2mal3 d2add33a7c fix(control): couldn't upload same file multiple times 2026-01-24 11:15:23 +01:00
2mal3 b4f9215fd4 fix(control): could not upload odp files 2026-01-23 23:13:19 +01:00
2mal3 666f04e3c6 style: supported_file_types.json 2026-01-23 23:06:47 +01:00
2mal3 eea15c558f fix(nixos): xfce pop when connecting new display 2026-01-21 18:30:11 +01:00
E44 9a4e2d4919 fix(control): enable startup_button if needed 2026-01-20 17:56:15 +01:00
E44 1138842269 refactor(control): improve code structure through new function 2026-01-19 23:35:38 +01:00
E44 c7bf6fa6f7 chore(control): clear loggin messages 2026-01-19 23:31:45 +01:00
E44 befa83131b fix(control): download button wasn't enabled 2026-01-19 23:14:30 +01:00
E44 c865dbeeae fix(control): get_missing_colliding_display_ids 2026-01-19 23:11:19 +01:00
E44 a5ee1b28d9 fix(control): open_inode_action and icon is now correct 2026-01-19 23:10:53 +01:00
E44 9e325566c5 refactor(control): remove unnecessary logging 2026-01-19 22:48:20 +01:00
E44 168576db81 refactor(control): create new constantly updated list of selected_online_display_ids 2026-01-19 22:47:36 +01:00
E44 3a30aca1dc chore(control): Keyboard queue (#31)
Co-authored-by: 2mal3 <56305732+2mal3@users.noreply.github.com>
2026-01-19 22:28:24 +01:00
2mal3 f2a648b429 chore(display): cleaner file download handling (#30) 2026-01-19 21:48:09 +01:00
7 changed files with 65 additions and 67 deletions
@@ -51,11 +51,6 @@ export async function show_html(ip: string, html: string): Promise<void> {
await request_display(ip, '/showHTML', options); await request_display(ip, '/showHTML', options);
} }
export async function show_website(ip: string, url: string): Promise<void> {
const command = `screen -dmS custom_website chromium-browser --user-data-dir=$(mktemp -d) --start-fullscreen --app="${url}"`;
await run_shell_command(ip, command);
}
export async function get_file_data( export async function get_file_data(
ip: string, ip: string,
path: string path: string
+8 -8
View File
@@ -46,7 +46,7 @@
open: false, open: false,
snippet: null, snippet: null,
title: '', title: '',
title_class: '!text-xl', title_class: '!text-xl'
}); });
let remove_display_name = $state(''); let remove_display_name = $state('');
@@ -120,7 +120,7 @@
title: 'Neuen Bildschirm Hinzufügen', title: 'Neuen Bildschirm Hinzufügen',
title_icon: Monitor, title_icon: Monitor,
title_class: '!text-xl', title_class: '!text-xl',
window_class: 'w-3xl', window_class: 'w-3xl'
}; };
}; };
@@ -131,7 +131,7 @@
title: 'Einstellungen', title: 'Einstellungen',
title_icon: Settings, title_icon: Settings,
title_class: '!text-xl', title_class: '!text-xl',
window_class: 'w-3xl', window_class: 'w-3xl'
}; };
}; };
@@ -143,7 +143,7 @@
snippet_arg: display_id, snippet_arg: display_id,
title: 'Bildschirm wirklich löschen?', title: 'Bildschirm wirklich löschen?',
title_class: 'text-red-400 !text-xl', title_class: 'text-red-400 !text-xl',
title_icon: Trash2, title_icon: Trash2
}; };
}; };
@@ -161,7 +161,7 @@
snippet_arg: display_id, snippet_arg: display_id,
title: 'Bildschirm bearbeiten', title: 'Bildschirm bearbeiten',
title_icon: Monitor, title_icon: Monitor,
title_class: '!text-xl', title_class: '!text-xl'
}; };
}; };
@@ -173,7 +173,7 @@
snippet: about_popup, snippet: about_popup,
title: 'Über PLG MuDiCS', title: 'Über PLG MuDiCS',
title_icon: Info, title_icon: Info,
title_class: '!text-xl', title_class: '!text-xl'
}; };
}; };
</script> </script>
@@ -182,8 +182,8 @@
<div class="px-2"> <div class="px-2">
<h3 class="text-lg font-bold mt-4">Entwickler</h3> <h3 class="text-lg font-bold mt-4">Entwickler</h3>
<p> <p>
<a target="_blank" class="link" href="https://github.com/programmer-44">E44</a> <a target="_blank" class="link" href="https://github.com/programmer-44">E44</a>,
<a target="_blank" class="link" href="https://codeberg.org/2mal3">2mal3</a>, <a target="_blank" class="link" href="https://codeberg.org/2mal3">2mal3</a>
</p> </p>
<h3 class="text-lg font-bold mt-4">Lizenz</h3> <h3 class="text-lg font-bold mt-4">Lizenz</h3>
+10 -11
View File
@@ -21,7 +21,7 @@
show_blackscreen, show_blackscreen,
shutdown, shutdown,
startup, startup,
show_website show_html
} from '$lib/ts/api_handler'; } from '$lib/ts/api_handler';
import { import {
get_display_by_id, get_display_by_id,
@@ -44,7 +44,7 @@
let popup_content: PopupContent = $state({ let popup_content: PopupContent = $state({
open: false, open: false,
snippet: null, snippet: null,
title: '' title: '',
}); });
let current_text = $state(''); let current_text = $state('');
@@ -79,7 +79,7 @@
snippet: website_popup, snippet: website_popup,
title: 'Webseite Anzeigen', title: 'Webseite Anzeigen',
window_class: 'w-xl', window_class: 'w-xl',
title_icon: Globe title_icon: Globe,
}; };
}; };
@@ -102,7 +102,7 @@
open: true, open: true,
snippet: ask_shutdown_popup, snippet: ask_shutdown_popup,
title: 'Bildschirm Herunterfahren', title: 'Bildschirm Herunterfahren',
title_icon: PowerOff title_icon: PowerOff,
}; };
} }
@@ -110,10 +110,7 @@
popup_content.open = false; popup_content.open = false;
await run_on_all_selected_displays((d) => { await run_on_all_selected_displays((d) => {
shutdown(d.ip); // no await here because we want to be fast shutdown(d.ip); // no await here because we want to be fast
db.displays.update(d.id, { db.displays.update(d.id, { status: 'app_offline', preview: { currently_updating: false, url: null} });
status: 'app_offline',
preview: { currently_updating: false, url: null }
});
}, false); }, false);
} }
@@ -146,7 +143,9 @@
async function send_website() { async function send_website() {
popup_content.open = false; popup_content.open = false;
await run_on_all_selected_displays((d) => show_website(d.ip, website_url)); await run_on_all_selected_displays((d) =>
show_html(d.ip, `<iframe src="${website_url}"></iframe>`)
);
} }
</script> </script>
@@ -186,11 +185,11 @@
{/snippet} {/snippet}
{#snippet send_keys_popup()} {#snippet send_keys_popup()}
<KeyInput {popup_close_function} /> <KeyInput {popup_close_function}/>
{/snippet} {/snippet}
{#snippet text_popup()} {#snippet text_popup()}
<TipTapInput bind:text={current_text} /> <TipTapInput bind:text={current_text}/>
{/snippet} {/snippet}
<div class="grid grid-rows-[2.5rem_auto] bg-stone-800 rounded-2xl min-w-0"> <div class="grid grid-rows-[2.5rem_auto] bg-stone-800 rounded-2xl min-w-0">
+12 -8
View File
@@ -23,7 +23,6 @@
update_current_folder_on_selected_displays, update_current_folder_on_selected_displays,
get_displays_where_path_not_exists, get_displays_where_path_not_exists,
create_path_on_all_selected_displays create_path_on_all_selected_displays
} from '$lib/ts/stores/files'; } from '$lib/ts/stores/files';
import { slide } from 'svelte/transition'; import { slide } from 'svelte/transition';
import InodeElement from '../lib/components/InodeElement.svelte'; import InodeElement from '../lib/components/InodeElement.svelte';
@@ -69,7 +68,7 @@
let popup_content: PopupContent = $state({ let popup_content: PopupContent = $state({
open: false, open: false,
snippet: null, snippet: null,
title: '', title: ''
}); });
let file_input: HTMLInputElement; let file_input: HTMLInputElement;
@@ -119,7 +118,7 @@
snippet: edit_file_name_popup, snippet: edit_file_name_popup,
title: `${file_is_folder ? 'Ordner' : 'Datei'} umbenennen`, title: `${file_is_folder ? 'Ordner' : 'Datei'} umbenennen`,
title_icon: FolderPlus, title_icon: FolderPlus,
snippet_arg: extension, snippet_arg: extension
}; };
}; };
@@ -133,7 +132,7 @@
open: true, open: true,
snippet: new_folder_popup, snippet: new_folder_popup,
title: 'Neuen Ordner erstellen', title: 'Neuen Ordner erstellen',
title_icon: FolderPlus, title_icon: FolderPlus
}; };
}; };
@@ -142,7 +141,7 @@
open: true, open: true,
snippet: delete_request_popup, snippet: delete_request_popup,
title: `${$selected_file_ids.length} ${$selected_file_ids.length === 1 ? 'Objekt' : 'Objekte'} wirklich löschen?`, title: `${$selected_file_ids.length} ${$selected_file_ids.length === 1 ? 'Objekt' : 'Objekte'} wirklich löschen?`,
title_icon: Trash2, title_icon: Trash2
}; };
}; };
@@ -152,7 +151,9 @@
current_folder_elements: Inode[] current_folder_elements: Inode[]
) { ) {
if (current_selected_file_ids.length === 0 && current_folder_elements.length > 0) { if (current_selected_file_ids.length === 0 && current_folder_elements.length > 0) {
current_selected_file_ids = current_folder_elements.map((inode) => get_file_primary_key(inode)); current_selected_file_ids = current_folder_elements.map((inode) =>
get_file_primary_key(inode)
);
} }
if (current_selected_file_ids.length === 0) return; if (current_selected_file_ids.length === 0) return;
// Mit For-Schleife über ausgewählte Elemente gehen // Mit For-Schleife über ausgewählte Elemente gehen
@@ -276,8 +277,11 @@
bind:this={file_input} bind:this={file_input}
multiple multiple
accept={get_accepted_file_type_string()} accept={get_accepted_file_type_string()}
onchange={(e) => onchange={async (e) => {
add_upload((e.target as HTMLInputElement).files!, $selected_online_display_ids, $current_file_path)} const target = e.target as HTMLInputElement;
await add_upload(target.files!, $selected_online_display_ids, $current_file_path);
target.value = '';
}}
/> />
<div class="bg-stone-800 h-full rounded-2xl grid grid-rows-[2.5rem_1fr] min-h-0"> <div class="bg-stone-800 h-full rounded-2xl grid grid-rows-[2.5rem_1fr] min-h-0">
+1 -1
View File
@@ -95,7 +95,6 @@
xreader xreader
tree tree
jq jq
screen
# Libraries # Libraries
imagemagick imagemagick
@@ -107,6 +106,7 @@
xfconf.settings = { xfconf.settings = {
xfce4-power-manager."xfce4-power-manager/dpms-enabled" = false; xfce4-power-manager."xfce4-power-manager/dpms-enabled" = false;
xfce4-screensaver."saver/enabled" = false; xfce4-screensaver."saver/enabled" = false;
displays.Notify = 0; # disable popup when connecting new display
}; };
home.stateVersion = "25.05"; home.stateVersion = "25.05";
+32 -32
View File
@@ -1,34 +1,34 @@
{ {
".mp4": { ".mp4": {
"display_name": "MP4", "display_name": "MP4",
"mime_type": "video/mp4" "mime_type": "video/mp4"
}, },
".jpg": { ".jpg": {
"display_name": "JPG", "display_name": "JPG",
"mime_type": "image/jpg" "mime_type": "image/jpg"
}, },
".jpeg": { ".jpeg": {
"display_name": "JPG", "display_name": "JPG",
"mime_type": "image/jpeg" "mime_type": "image/jpeg"
}, },
".png": { ".png": {
"display_name": "PNG", "display_name": "PNG",
"mime_type": "image/png" "mime_type": "image/png"
}, },
".gif": { ".gif": {
"display_name": "GIF", "display_name": "GIF",
"mime_type": "image/gif" "mime_type": "image/gif"
}, },
".pptx": { ".pptx": {
"display_name": "PPTX", "display_name": "PPTX",
"mime_type": "application/vnd.openxmlformats-officedocument.presentationml.presentation" "mime_type": "application/vnd.openxmlformats-officedocument.presentationml.presentation"
}, },
".odp": { ".odp": {
"display_name": "ODP", "display_name": "ODP",
"mime_type": "application/vnd.oasis.opendocument.presentation" "mime_type": ".odp"
}, },
".pdf": { ".pdf": {
"display_name": "PDF", "display_name": "PDF",
"mime_type": "application/pdf" "mime_type": "application/pdf"
} }
} }
+1 -1
View File
@@ -1 +1 @@
v0.1.1 v0.1.2