Compare commits

..

5 Commits

Author SHA1 Message Date
E44 70ca009898 bump to version v0.1.0 2026-01-19 23:39:33 +01:00
E44 320584a1de feat(control): bring newest changes from main to this branch (#32)
Co-authored-by: 2mal3 <56305732+2mal3@users.noreply.github.com>
2026-01-19 23:38:14 +01:00
E44 ffb9f21ea5 bump version to v0.0.19 2026-01-19 21:37:51 +01:00
E44 c44f009eaf chore(control): add custom website support with another chromium window 2026-01-19 21:37:43 +01:00
E44 541b626be2 chore(nixos): add screen to nixos 2026-01-19 21:09:28 +01:00
7 changed files with 68 additions and 66 deletions
@@ -51,6 +51,11 @@ 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>
+12 -11
View File
@@ -21,7 +21,7 @@
show_blackscreen, show_blackscreen,
shutdown, shutdown,
startup, startup,
show_html show_website
} 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,7 +110,10 @@
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, { status: 'app_offline', preview: { currently_updating: false, url: null} }); db.displays.update(d.id, {
status: 'app_offline',
preview: { currently_updating: false, url: null }
});
}, false); }, false);
} }
@@ -143,9 +146,7 @@
async function send_website() { async function send_website() {
popup_content.open = false; popup_content.open = false;
await run_on_all_selected_displays((d) => await run_on_all_selected_displays((d) => show_website(d.ip, website_url));
show_html(d.ip, `<iframe src="${website_url}"></iframe>`)
);
} }
</script> </script>
@@ -185,11 +186,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">
@@ -272,7 +273,7 @@
<Button <Button
className="px-3 flex gap-3 w-full xl:w-75 justify-normal" className="px-3 flex gap-3 w-full xl:w-75 justify-normal"
disabled={$all_display_states === 'on' || disabled={$all_display_states === 'on' ||
$selected_display_ids.length === 0} $selected_online_display_ids.length === 0}
click_function={startup_action} click_function={startup_action}
> >
<Power /> Bildschirm Hochfahren <Power /> Bildschirm Hochfahren
+8 -12
View File
@@ -23,6 +23,7 @@
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';
@@ -68,7 +69,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;
@@ -118,7 +119,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,
}; };
}; };
@@ -132,7 +133,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,
}; };
}; };
@@ -141,7 +142,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,
}; };
}; };
@@ -151,9 +152,7 @@
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) => current_selected_file_ids = current_folder_elements.map((inode) => get_file_primary_key(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
@@ -277,11 +276,8 @@
bind:this={file_input} bind:this={file_input}
multiple multiple
accept={get_accepted_file_type_string()} accept={get_accepted_file_type_string()}
onchange={async (e) => { onchange={(e) =>
const target = e.target as HTMLInputElement; add_upload((e.target as HTMLInputElement).files!, $selected_online_display_ids, $current_file_path)}
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,6 +95,7 @@
xreader xreader
tree tree
jq jq
screen
# Libraries # Libraries
imagemagick imagemagick
@@ -106,7 +107,6 @@
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";
+33 -33
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": ".odp" "mime_type": "application/vnd.oasis.opendocument.presentation"
}, },
".pdf": { ".pdf": {
"display_name": "PDF", "display_name": "PDF",
"mime_type": "application/pdf" "mime_type": "application/pdf"
} }
} }
+1 -1
View File
@@ -1 +1 @@
v0.1.2 v0.1.0