mirror of
https://codeberg.org/PLG-Development/PLG-MuDiCS
synced 2026-07-06 17:07:08 +00:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cbbf50e5a4 | |||
| 934dd42866 | |||
| d2add33a7c | |||
| b4f9215fd4 | |||
| 666f04e3c6 | |||
| eea15c558f | |||
| 9a4e2d4919 | |||
| 1138842269 | |||
| c7bf6fa6f7 | |||
| befa83131b | |||
| c865dbeeae | |||
| a5ee1b28d9 | |||
| 9e325566c5 | |||
| 168576db81 | |||
| 3a30aca1dc | |||
| f2a648b429 |
@@ -51,11 +51,6 @@ export async function show_html(ip: string, html: string): Promise<void> {
|
||||
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(
|
||||
ip: string,
|
||||
path: string
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
open: false,
|
||||
snippet: null,
|
||||
title: '',
|
||||
title_class: '!text-xl',
|
||||
title_class: '!text-xl'
|
||||
});
|
||||
let remove_display_name = $state('');
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
title: 'Neuen Bildschirm Hinzufügen',
|
||||
title_icon: Monitor,
|
||||
title_class: '!text-xl',
|
||||
window_class: 'w-3xl',
|
||||
window_class: 'w-3xl'
|
||||
};
|
||||
};
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
title: 'Einstellungen',
|
||||
title_icon: Settings,
|
||||
title_class: '!text-xl',
|
||||
window_class: 'w-3xl',
|
||||
window_class: 'w-3xl'
|
||||
};
|
||||
};
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
snippet_arg: display_id,
|
||||
title: 'Bildschirm wirklich löschen?',
|
||||
title_class: 'text-red-400 !text-xl',
|
||||
title_icon: Trash2,
|
||||
title_icon: Trash2
|
||||
};
|
||||
};
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
snippet_arg: display_id,
|
||||
title: 'Bildschirm bearbeiten',
|
||||
title_icon: Monitor,
|
||||
title_class: '!text-xl',
|
||||
title_class: '!text-xl'
|
||||
};
|
||||
};
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
snippet: about_popup,
|
||||
title: 'Über PLG MuDiCS',
|
||||
title_icon: Info,
|
||||
title_class: '!text-xl',
|
||||
title_class: '!text-xl'
|
||||
};
|
||||
};
|
||||
</script>
|
||||
@@ -182,8 +182,8 @@
|
||||
<div class="px-2">
|
||||
<h3 class="text-lg font-bold mt-4">Entwickler</h3>
|
||||
<p>
|
||||
<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://github.com/programmer-44">E44</a>,
|
||||
<a target="_blank" class="link" href="https://codeberg.org/2mal3">2mal3</a>
|
||||
</p>
|
||||
|
||||
<h3 class="text-lg font-bold mt-4">Lizenz</h3>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
show_blackscreen,
|
||||
shutdown,
|
||||
startup,
|
||||
show_website
|
||||
show_html
|
||||
} from '$lib/ts/api_handler';
|
||||
import {
|
||||
get_display_by_id,
|
||||
@@ -44,7 +44,7 @@
|
||||
let popup_content: PopupContent = $state({
|
||||
open: false,
|
||||
snippet: null,
|
||||
title: ''
|
||||
title: '',
|
||||
});
|
||||
|
||||
let current_text = $state('');
|
||||
@@ -79,7 +79,7 @@
|
||||
snippet: website_popup,
|
||||
title: 'Webseite Anzeigen',
|
||||
window_class: 'w-xl',
|
||||
title_icon: Globe
|
||||
title_icon: Globe,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
open: true,
|
||||
snippet: ask_shutdown_popup,
|
||||
title: 'Bildschirm Herunterfahren',
|
||||
title_icon: PowerOff
|
||||
title_icon: PowerOff,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -110,10 +110,7 @@
|
||||
popup_content.open = false;
|
||||
await run_on_all_selected_displays((d) => {
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -146,7 +143,9 @@
|
||||
|
||||
async function send_website() {
|
||||
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>
|
||||
|
||||
@@ -186,11 +185,11 @@
|
||||
{/snippet}
|
||||
|
||||
{#snippet send_keys_popup()}
|
||||
<KeyInput {popup_close_function} />
|
||||
<KeyInput {popup_close_function}/>
|
||||
{/snippet}
|
||||
|
||||
{#snippet text_popup()}
|
||||
<TipTapInput bind:text={current_text} />
|
||||
<TipTapInput bind:text={current_text}/>
|
||||
{/snippet}
|
||||
|
||||
<div class="grid grid-rows-[2.5rem_auto] bg-stone-800 rounded-2xl min-w-0">
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
update_current_folder_on_selected_displays,
|
||||
get_displays_where_path_not_exists,
|
||||
create_path_on_all_selected_displays
|
||||
|
||||
} from '$lib/ts/stores/files';
|
||||
import { slide } from 'svelte/transition';
|
||||
import InodeElement from '../lib/components/InodeElement.svelte';
|
||||
@@ -69,7 +68,7 @@
|
||||
let popup_content: PopupContent = $state({
|
||||
open: false,
|
||||
snippet: null,
|
||||
title: '',
|
||||
title: ''
|
||||
});
|
||||
|
||||
let file_input: HTMLInputElement;
|
||||
@@ -119,7 +118,7 @@
|
||||
snippet: edit_file_name_popup,
|
||||
title: `${file_is_folder ? 'Ordner' : 'Datei'} umbenennen`,
|
||||
title_icon: FolderPlus,
|
||||
snippet_arg: extension,
|
||||
snippet_arg: extension
|
||||
};
|
||||
};
|
||||
|
||||
@@ -133,7 +132,7 @@
|
||||
open: true,
|
||||
snippet: new_folder_popup,
|
||||
title: 'Neuen Ordner erstellen',
|
||||
title_icon: FolderPlus,
|
||||
title_icon: FolderPlus
|
||||
};
|
||||
};
|
||||
|
||||
@@ -142,7 +141,7 @@
|
||||
open: true,
|
||||
snippet: delete_request_popup,
|
||||
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[]
|
||||
) {
|
||||
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;
|
||||
// Mit For-Schleife über ausgewählte Elemente gehen
|
||||
@@ -276,8 +277,11 @@
|
||||
bind:this={file_input}
|
||||
multiple
|
||||
accept={get_accepted_file_type_string()}
|
||||
onchange={(e) =>
|
||||
add_upload((e.target as HTMLInputElement).files!, $selected_online_display_ids, $current_file_path)}
|
||||
onchange={async (e) => {
|
||||
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">
|
||||
|
||||
@@ -95,7 +95,6 @@
|
||||
xreader
|
||||
tree
|
||||
jq
|
||||
screen
|
||||
|
||||
# Libraries
|
||||
imagemagick
|
||||
@@ -107,6 +106,7 @@
|
||||
xfconf.settings = {
|
||||
xfce4-power-manager."xfce4-power-manager/dpms-enabled" = false;
|
||||
xfce4-screensaver."saver/enabled" = false;
|
||||
displays.Notify = 0; # disable popup when connecting new display
|
||||
};
|
||||
|
||||
home.stateVersion = "25.05";
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
{
|
||||
".mp4": {
|
||||
"display_name": "MP4",
|
||||
"mime_type": "video/mp4"
|
||||
},
|
||||
".jpg": {
|
||||
"display_name": "JPG",
|
||||
"mime_type": "image/jpg"
|
||||
},
|
||||
".jpeg": {
|
||||
"display_name": "JPG",
|
||||
"mime_type": "image/jpeg"
|
||||
},
|
||||
".png": {
|
||||
"display_name": "PNG",
|
||||
"mime_type": "image/png"
|
||||
},
|
||||
".gif": {
|
||||
"display_name": "GIF",
|
||||
"mime_type": "image/gif"
|
||||
},
|
||||
".pptx": {
|
||||
"display_name": "PPTX",
|
||||
"mime_type": "application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
||||
},
|
||||
".odp": {
|
||||
"display_name": "ODP",
|
||||
"mime_type": "application/vnd.oasis.opendocument.presentation"
|
||||
},
|
||||
".pdf": {
|
||||
"display_name": "PDF",
|
||||
"mime_type": "application/pdf"
|
||||
}
|
||||
".mp4": {
|
||||
"display_name": "MP4",
|
||||
"mime_type": "video/mp4"
|
||||
},
|
||||
".jpg": {
|
||||
"display_name": "JPG",
|
||||
"mime_type": "image/jpg"
|
||||
},
|
||||
".jpeg": {
|
||||
"display_name": "JPG",
|
||||
"mime_type": "image/jpeg"
|
||||
},
|
||||
".png": {
|
||||
"display_name": "PNG",
|
||||
"mime_type": "image/png"
|
||||
},
|
||||
".gif": {
|
||||
"display_name": "GIF",
|
||||
"mime_type": "image/gif"
|
||||
},
|
||||
".pptx": {
|
||||
"display_name": "PPTX",
|
||||
"mime_type": "application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
||||
},
|
||||
".odp": {
|
||||
"display_name": "ODP",
|
||||
"mime_type": ".odp"
|
||||
},
|
||||
".pdf": {
|
||||
"display_name": "PDF",
|
||||
"mime_type": "application/pdf"
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1 +1 @@
|
||||
v0.1.1
|
||||
v0.1.2
|
||||
Reference in New Issue
Block a user