mirror of
https://codeberg.org/PLG-Development/PLG-MuDiCS
synced 2026-07-06 00:47:09 +00:00
refactor(frontend)
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
disabled = false,
|
disabled = false,
|
||||||
title = '',
|
title = '',
|
||||||
click_function = () => {},
|
click_function = () => {},
|
||||||
menu_options = null,
|
menu_options = [],
|
||||||
menu_class = 'right-0',
|
menu_class = 'right-0',
|
||||||
div_class = '',
|
div_class = '',
|
||||||
children
|
children
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
title?: string;
|
title?: string;
|
||||||
click_function?: (e: MouseEvent) => void;
|
click_function?: (e: MouseEvent) => void;
|
||||||
menu_options?: MenuOption[] | null;
|
menu_options?: MenuOption[];
|
||||||
menu_class?: string;
|
menu_class?: string;
|
||||||
div_class?: string;
|
div_class?: string;
|
||||||
children?: any;
|
children?: any;
|
||||||
|
|||||||
@@ -52,20 +52,20 @@
|
|||||||
{#if content.title}
|
{#if content.title}
|
||||||
<div class="font-bold bg-stone-700 p-1.5 flex flex-row justify-between gap-8 w-full">
|
<div class="font-bold bg-stone-700 p-1.5 flex flex-row justify-between gap-8 w-full">
|
||||||
<div
|
<div
|
||||||
class="flex flex-row flex-1 gap-3 pl-2 py-1 items-center grow whitespace-nowrap min-w-0 flex-shrink-0 text-lg {content.title_class ??
|
class="flex flex-row flex-1 gap-3 pl-2 py-1 items-center grow whitespace-nowrap min-w-0 shrink-0 text-lg {content.title_class ??
|
||||||
''}"
|
''}"
|
||||||
>
|
>
|
||||||
{#if content.title_icon}
|
{#if content.title_icon}
|
||||||
{@const Icon = content.title_icon}
|
{@const Icon = content.title_icon}
|
||||||
<Icon strokeWidth="2" class="flex-shrink-0" />
|
<Icon strokeWidth="2" class="shrink-0" />
|
||||||
{/if}
|
{/if}
|
||||||
<div class="flex-shrink-0">
|
<div class="shrink-0">
|
||||||
{content.title}
|
{content.title}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex aspect-square flex-shrink-0">
|
<div class="flex aspect-square shrink-0">
|
||||||
{#if content.closable}
|
{#if content.closable}
|
||||||
<Button className="aspect-square !p-1.5" click_function={try_to_close}>
|
<Button className="aspect-square p-1.5!" click_function={try_to_close}>
|
||||||
<X />
|
<X />
|
||||||
</Button>
|
</Button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -122,7 +122,7 @@
|
|||||||
onkeydown={handle_keydown}
|
onkeydown={handle_keydown}
|
||||||
oninput={validate_input}
|
oninput={validate_input}
|
||||||
type="text"
|
type="text"
|
||||||
class=" outline-none py-2 px-3 transition-all duration-100 flex-grow group"
|
class=" outline-none py-2 px-3 transition-all duration-100 grow group"
|
||||||
{placeholder}
|
{placeholder}
|
||||||
/>
|
/>
|
||||||
{#if extension}
|
{#if extension}
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
is_display_name_taken,
|
is_display_name_taken,
|
||||||
remove_display
|
remove_display
|
||||||
} from '$lib/ts/stores/displays';
|
} from '$lib/ts/stores/displays';
|
||||||
import { text } from '@sveltejs/kit';
|
|
||||||
import { notifications } from '$lib/ts/stores/notification';
|
import { notifications } from '$lib/ts/stores/notification';
|
||||||
import { ping_ip } from '$lib/ts/api_handler';
|
import { ping_ip } from '$lib/ts/api_handler';
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
TextAlignStart,
|
TextAlignStart,
|
||||||
TrafficCone
|
TrafficCone
|
||||||
} from 'lucide-svelte';
|
} from 'lucide-svelte';
|
||||||
import { onMount } from 'svelte';
|
|
||||||
import Button from '$lib/components/Button.svelte';
|
import Button from '$lib/components/Button.svelte';
|
||||||
import PopUp from '$lib/components/PopUp.svelte';
|
import PopUp from '$lib/components/PopUp.svelte';
|
||||||
import type { PopupContent } from '$lib/ts/types';
|
import type { PopupContent } from '$lib/ts/types';
|
||||||
|
|||||||
@@ -150,7 +150,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
className="aspect-square !p-1"
|
className="aspect-square p-1!"
|
||||||
bg="bg-stone-600"
|
bg="bg-stone-600"
|
||||||
click_function={(e) => {
|
click_function={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
@@ -162,7 +162,7 @@
|
|||||||
|
|
||||||
<Button
|
<Button
|
||||||
title="Bildschirm nicht mehr anpinnen"
|
title="Bildschirm nicht mehr anpinnen"
|
||||||
className="aspect-square !p-1"
|
className="aspect-square p-1!"
|
||||||
bg="bg-stone-600"
|
bg="bg-stone-600"
|
||||||
click_function={close_pinned_display}
|
click_function={close_pinned_display}
|
||||||
>
|
>
|
||||||
@@ -218,7 +218,7 @@
|
|||||||
<div class="flex flex-row">
|
<div class="flex flex-row">
|
||||||
<Button
|
<Button
|
||||||
title="Bildschirme größer darstellen"
|
title="Bildschirme größer darstellen"
|
||||||
className="aspect-square !p-1 rounded-r-none"
|
className="aspect-square p-1! rounded-r-none"
|
||||||
bg="bg-stone-600"
|
bg="bg-stone-600"
|
||||||
disabled={!Boolean(next_height_step_size('display', $current_height, 1))}
|
disabled={!Boolean(next_height_step_size('display', $current_height, 1))}
|
||||||
click_function={() => {
|
click_function={() => {
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
title="Bildschirme kleiner darstellen"
|
title="Bildschirme kleiner darstellen"
|
||||||
className="aspect-square !p-1 rounded-l-none"
|
className="aspect-square p-1! rounded-l-none"
|
||||||
bg="bg-stone-600"
|
bg="bg-stone-600"
|
||||||
disabled={!Boolean(next_height_step_size('display', $current_height, -1))}
|
disabled={!Boolean(next_height_step_size('display', $current_height, -1))}
|
||||||
click_function={() => {
|
click_function={() => {
|
||||||
@@ -263,7 +263,7 @@
|
|||||||
{#if ($display_groups || []).length === 0}
|
{#if ($display_groups || []).length === 0}
|
||||||
<div class="text-stone-500 px-10 py-6 leading-relaxed text-center">
|
<div class="text-stone-500 px-10 py-6 leading-relaxed text-center">
|
||||||
Es wurden noch keine Bildschirme hinzugefügt. Klicke oben rechts auf
|
Es wurden noch keine Bildschirme hinzugefügt. Klicke oben rechts auf
|
||||||
<HighlightedText fg="text-stone-450" className="!p-1"
|
<HighlightedText fg="text-stone-450" className="p-1!"
|
||||||
><Settings class="inline pb-1" /></HighlightedText
|
><Settings class="inline pb-1" /></HighlightedText
|
||||||
>
|
>
|
||||||
und
|
und
|
||||||
|
|||||||
@@ -246,7 +246,7 @@
|
|||||||
<div class="flex flex-ro">
|
<div class="flex flex-ro">
|
||||||
<Button
|
<Button
|
||||||
title="Dateien größer darstellen"
|
title="Dateien größer darstellen"
|
||||||
className="aspect-square !p-1 rounded-r-none"
|
className="aspect-square p-1! rounded-r-none"
|
||||||
bg="bg-stone-600"
|
bg="bg-stone-600"
|
||||||
disabled={!Boolean(next_height_step_size('file', $current_height, 1))}
|
disabled={!Boolean(next_height_step_size('file', $current_height, 1))}
|
||||||
click_function={() => {
|
click_function={() => {
|
||||||
@@ -257,7 +257,7 @@
|
|||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
title="Dateien kleiner darstellen"
|
title="Dateien kleiner darstellen"
|
||||||
className="aspect-square !p-1 rounded-l-none"
|
className="aspect-square p-1! rounded-l-none"
|
||||||
bg="bg-stone-600"
|
bg="bg-stone-600"
|
||||||
disabled={!Boolean(next_height_step_size('file', $current_height, -1))}
|
disabled={!Boolean(next_height_step_size('file', $current_height, -1))}
|
||||||
click_function={() => {
|
click_function={() => {
|
||||||
@@ -349,7 +349,7 @@
|
|||||||
: 'den ausgewählten Bildschirmen'} im aktuellen Ordner. Klicke auf <HighlightedText
|
: 'den ausgewählten Bildschirmen'} im aktuellen Ordner. Klicke auf <HighlightedText
|
||||||
bg="bg-stone-700"
|
bg="bg-stone-700"
|
||||||
fg="text-stone-400"
|
fg="text-stone-400"
|
||||||
className="!p-1"><Upload class="inline pb-1" /></HighlightedText
|
className="p-1!"><Upload class="inline pb-1" /></HighlightedText
|
||||||
> um Datei(en) hochzuladen.
|
> um Datei(en) hochzuladen.
|
||||||
</span>
|
</span>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user