Fahrzeug-Vorlage: 64 Marken mit 1.559 Modellgenerationen aus Europa im Admin ladbar
Marken/Modelle > 'Aus Vorlage laden' zeigt den Katalog (api/data/vehicle-catalog.json) zum Anhaken; angelegt wird nur, was noch fehlt (Abgleich ueber Slug und Name). Slug::make wandelt jetzt Akzente um (Škoda -> skoda statt koda). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019bUXMMTn84UnoT7ps5aXCs
This commit is contained in:
parent
838da99ca3
commit
00c67cd860
65 changed files with 7086 additions and 58 deletions
258
hifi-src/src/components/admin/VehicleCatalogDialog.jsx
Normal file
258
hifi-src/src/components/admin/VehicleCatalogDialog.jsx
Normal file
|
|
@ -0,0 +1,258 @@
|
|||
import { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { ChevronDown, ChevronRight, Search, X } from 'lucide-react';
|
||||
import { api } from '../../api/client.js';
|
||||
import useDialog from '../../hooks/useDialog.js';
|
||||
import { useToast } from '../../context/AdminUiContext.jsx';
|
||||
|
||||
// Kleinschreibung ohne Akzente, damit "skoda" auch "Škoda" findet.
|
||||
const normalize = (value) => value.normalize('NFD').replace(/[\u0300-\u036f]/g, '').toLowerCase();
|
||||
const count = (n, one, many) => `${n} ${n === 1 ? one : many}`;
|
||||
|
||||
// Auswahl aus der Fahrzeug-Vorlage (api/data/vehicle-catalog.json): Marken/Modelle anhaken
|
||||
// und anlegen. Bereits vorhandene Eintraege sind markiert und werden nie doppelt angelegt.
|
||||
export default function VehicleCatalogDialog({ open, onClose, onImported }) {
|
||||
const toast = useToast();
|
||||
const dialogRef = useRef(null);
|
||||
const [catalog, setCatalog] = useState(null);
|
||||
const [error, setError] = useState('');
|
||||
const [query, setQuery] = useState('');
|
||||
const [expanded, setExpanded] = useState(() => new Set());
|
||||
// Marke -> Set der ausgewaehlten Modellnamen
|
||||
const [selected, setSelected] = useState(() => new Map());
|
||||
const [busy, setBusy] = useState(false);
|
||||
|
||||
useDialog(dialogRef, open, onClose);
|
||||
|
||||
useEffect(() => {
|
||||
if (!open) return;
|
||||
setCatalog(null);
|
||||
setError('');
|
||||
setSelected(new Map());
|
||||
setExpanded(new Set());
|
||||
setQuery('');
|
||||
api.get('/vehicle-catalog').then(setCatalog).catch((err) => setError(err.message));
|
||||
}, [open]);
|
||||
|
||||
const brands = useMemo(() => {
|
||||
if (!catalog) return [];
|
||||
const q = normalize(query.trim());
|
||||
return catalog
|
||||
.map((entry) => {
|
||||
const newModels = entry.models.filter((m) => !m.exists);
|
||||
if (!q || normalize(entry.brand).includes(q)) return { ...entry, newModels, visibleModels: entry.models };
|
||||
const visibleModels = entry.models.filter((m) => normalize(`${entry.brand} ${m.name}`).includes(q));
|
||||
return visibleModels.length ? { ...entry, newModels, visibleModels } : null;
|
||||
})
|
||||
.filter(Boolean);
|
||||
}, [catalog, query]);
|
||||
|
||||
const totals = useMemo(() => {
|
||||
let models = 0;
|
||||
let newBrands = 0;
|
||||
selected.forEach((names, brand) => {
|
||||
models += names.size;
|
||||
if (names.size && catalog?.find((e) => e.brand === brand && !e.exists)) newBrands += 1;
|
||||
});
|
||||
return { models, newBrands };
|
||||
}, [selected, catalog]);
|
||||
|
||||
const allNew = useMemo(
|
||||
() => (catalog || []).reduce((sum, entry) => sum + entry.models.filter((m) => !m.exists).length, 0),
|
||||
[catalog]
|
||||
);
|
||||
|
||||
const setBrandModels = (brand, names) => {
|
||||
setSelected((current) => {
|
||||
const next = new Map(current);
|
||||
if (names.size) next.set(brand, names);
|
||||
else next.delete(brand);
|
||||
return next;
|
||||
});
|
||||
};
|
||||
|
||||
const toggleBrand = (entry) => {
|
||||
const current = selected.get(entry.brand) || new Set();
|
||||
// Bei einer Suche nur die sichtbaren Modelle umschalten
|
||||
const pool = entry.visibleModels.filter((m) => !m.exists).map((m) => m.name);
|
||||
const allOn = pool.every((name) => current.has(name));
|
||||
const next = new Set(current);
|
||||
pool.forEach((name) => (allOn ? next.delete(name) : next.add(name)));
|
||||
setBrandModels(entry.brand, next);
|
||||
};
|
||||
|
||||
const toggleModel = (brand, name) => {
|
||||
const next = new Set(selected.get(brand) || []);
|
||||
if (next.has(name)) next.delete(name);
|
||||
else next.add(name);
|
||||
setBrandModels(brand, next);
|
||||
};
|
||||
|
||||
const toggleExpanded = (brand) => {
|
||||
setExpanded((current) => {
|
||||
const next = new Set(current);
|
||||
if (next.has(brand)) next.delete(brand);
|
||||
else next.add(brand);
|
||||
return next;
|
||||
});
|
||||
};
|
||||
|
||||
const selectAllVisible = () => {
|
||||
const next = new Map(selected);
|
||||
brands.forEach((entry) => {
|
||||
const names = new Set(next.get(entry.brand) || []);
|
||||
entry.visibleModels.filter((m) => !m.exists).forEach((m) => names.add(m.name));
|
||||
if (names.size) next.set(entry.brand, names);
|
||||
});
|
||||
setSelected(next);
|
||||
};
|
||||
|
||||
const handleImport = async () => {
|
||||
setBusy(true);
|
||||
try {
|
||||
const items = [...selected].map(([brand, names]) => ({ brand, models: [...names] }));
|
||||
const result = await api.post('/vehicle-catalog/import', { items });
|
||||
toast.success(
|
||||
`${count(result.models, 'Modell', 'Modelle')}${result.brands ? ` und ${count(result.brands, 'Marke', 'Marken')}` : ''} angelegt.`
|
||||
+ (result.skipped ? ` ${count(result.skipped, 'Modell war', 'Modelle waren')} schon vorhanden.` : '')
|
||||
);
|
||||
onImported?.();
|
||||
onClose();
|
||||
} catch (err) {
|
||||
toast.error(`Laden fehlgeschlagen: ${err.message}`);
|
||||
} finally {
|
||||
setBusy(false);
|
||||
}
|
||||
};
|
||||
|
||||
if (!open) return null;
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-[300] flex items-center justify-center bg-black/50 p-4" onMouseDown={(e) => e.target === e.currentTarget && onClose()}>
|
||||
<div
|
||||
ref={dialogRef}
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-labelledby="vehicle-catalog-title"
|
||||
className="flex max-h-[90vh] w-full max-w-2xl flex-col rounded-xl bg-white shadow-xl dark:bg-neutral-900"
|
||||
>
|
||||
<div className="flex items-start justify-between gap-4 border-b border-neutral-200 p-5 dark:border-neutral-800">
|
||||
<div>
|
||||
<h2 id="vehicle-catalog-title" className="text-lg font-bold text-neutral-900 dark:text-white">Fahrzeuge aus Vorlage laden</h2>
|
||||
<p className="mt-1 text-sm text-neutral-500 dark:text-neutral-400">
|
||||
In Europa verbreitete Marken und Modellgenerationen. Vorhandenes bleibt unverändert und wird nicht doppelt angelegt.
|
||||
</p>
|
||||
</div>
|
||||
<button type="button" onClick={onClose} aria-label="Schließen" className="rounded-md p-1 text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-200">
|
||||
<X className="h-5 w-5" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-wrap items-center gap-2 border-b border-neutral-200 px-5 py-3 dark:border-neutral-800">
|
||||
<div className="relative min-w-0 flex-1">
|
||||
<Search className="pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-neutral-400" />
|
||||
<input
|
||||
value={query}
|
||||
onChange={(e) => setQuery(e.target.value)}
|
||||
placeholder="Marke oder Modell suchen…"
|
||||
className="w-full rounded-md border border-neutral-300 bg-white py-1.5 pl-8 pr-3 text-sm dark:border-neutral-700 dark:bg-neutral-900"
|
||||
/>
|
||||
</div>
|
||||
<button type="button" onClick={selectAllVisible} className="text-sm text-brand-600 hover:underline">
|
||||
{query.trim() ? 'Treffer auswählen' : 'Alle auswählen'}
|
||||
</button>
|
||||
{selected.size > 0 && (
|
||||
<button type="button" onClick={() => setSelected(new Map())} className="text-sm text-neutral-500 hover:underline">
|
||||
Auswahl leeren
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="min-h-0 flex-1 overflow-y-auto px-2 py-2">
|
||||
{error && <p className="px-3 py-4 text-sm text-red-600">{error}</p>}
|
||||
{!catalog && !error && <p className="px-3 py-4 text-sm text-neutral-400">Lade Vorlage…</p>}
|
||||
{catalog && brands.length === 0 && <p className="px-3 py-4 text-sm text-neutral-400">Keine Treffer.</p>}
|
||||
{brands.map((entry) => {
|
||||
const chosen = selected.get(entry.brand) || new Set();
|
||||
const pool = entry.visibleModels.filter((m) => !m.exists);
|
||||
const checked = pool.length > 0 && pool.every((m) => chosen.has(m.name));
|
||||
const partial = !checked && pool.some((m) => chosen.has(m.name));
|
||||
const isOpen = expanded.has(entry.brand) || query.trim() !== '';
|
||||
return (
|
||||
<div key={entry.brand} className="rounded-lg">
|
||||
<div className="flex items-center gap-2 rounded-lg px-2 py-1.5 hover:bg-neutral-50 dark:hover:bg-neutral-800/60">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => toggleExpanded(entry.brand)}
|
||||
aria-expanded={isOpen}
|
||||
aria-label={`${entry.brand} aufklappen`}
|
||||
className="rounded p-0.5 text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-200"
|
||||
>
|
||||
{isOpen ? <ChevronDown className="h-4 w-4" /> : <ChevronRight className="h-4 w-4" />}
|
||||
</button>
|
||||
<label className="flex min-w-0 flex-1 cursor-pointer items-center gap-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={checked}
|
||||
disabled={pool.length === 0}
|
||||
ref={(el) => { if (el) el.indeterminate = partial; }}
|
||||
onChange={() => toggleBrand(entry)}
|
||||
className="h-4 w-4 accent-brand-500"
|
||||
/>
|
||||
<span className="truncate font-medium text-neutral-800 dark:text-neutral-100">{entry.brand}</span>
|
||||
{entry.exists && <span className="rounded bg-neutral-100 px-1.5 text-xs text-neutral-500 dark:bg-neutral-800">vorhanden</span>}
|
||||
</label>
|
||||
<span className="shrink-0 text-xs text-neutral-400">
|
||||
{chosen.size > 0 ? `${chosen.size} gewählt · ` : ''}
|
||||
{entry.newModels.length === entry.models.length
|
||||
? `${entry.models.length} Modelle`
|
||||
: `${entry.newModels.length} von ${entry.models.length} neu`}
|
||||
</span>
|
||||
</div>
|
||||
{isOpen && (
|
||||
<ul className="mb-2 ml-9 grid gap-x-4 sm:grid-cols-2">
|
||||
{entry.visibleModels.map((model) => (
|
||||
<li key={model.name}>
|
||||
<label className={`flex items-center gap-2 py-0.5 text-sm ${model.exists ? 'text-neutral-400' : 'cursor-pointer text-neutral-700 dark:text-neutral-200'}`}>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={model.exists || chosen.has(model.name)}
|
||||
disabled={model.exists}
|
||||
onChange={() => toggleModel(entry.brand, model.name)}
|
||||
className="h-3.5 w-3.5 accent-brand-500"
|
||||
/>
|
||||
<span className="truncate">{model.name}</span>
|
||||
<span className="ml-auto shrink-0 text-xs text-neutral-400">{model.exists ? 'vorhanden' : model.years}</span>
|
||||
</label>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
||||
<div className="flex flex-wrap items-center justify-between gap-3 border-t border-neutral-200 p-4 dark:border-neutral-800">
|
||||
<span className="text-sm text-neutral-500 dark:text-neutral-400">
|
||||
{totals.models
|
||||
? `${count(totals.models, 'Modell', 'Modelle')}${totals.newBrands ? `, ${count(totals.newBrands, 'neue Marke', 'neue Marken')}` : ''} ausgewählt`
|
||||
: catalog ? `${catalog.length} Marken, ${count(allNew, 'Modell', 'Modelle')} noch nicht angelegt` : ''}
|
||||
</span>
|
||||
<div className="flex gap-2">
|
||||
<button type="button" onClick={onClose} className="rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700">
|
||||
Abbrechen
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleImport}
|
||||
disabled={busy || totals.models === 0}
|
||||
className="rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50"
|
||||
>
|
||||
{busy ? 'Wird angelegt…' : 'Auswahl anlegen'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ import { api } from '../../api/client.js';
|
|||
import ImageUploadField from '../../components/ImageUploadField.jsx';
|
||||
import TextStyleWidget from '../../components/TextStyleWidget.jsx';
|
||||
import SortableList, { saveReorder } from '../../components/admin/SortableList.jsx';
|
||||
import VehicleCatalogDialog from '../../components/admin/VehicleCatalogDialog.jsx';
|
||||
import { useToast, useUnsavedChanges } from '../../context/AdminUiContext.jsx';
|
||||
|
||||
const emptyForm = { name: '', image_path: '', sort_order: 0 };
|
||||
|
|
@ -15,6 +16,7 @@ export default function Brands() {
|
|||
const [initialForm, setInitialForm] = useState(emptyForm);
|
||||
const [editingId, setEditingId] = useState(null);
|
||||
const [error, setError] = useState('');
|
||||
const [catalogOpen, setCatalogOpen] = useState(false);
|
||||
const formRef = useRef(null);
|
||||
|
||||
useUnsavedChanges(JSON.stringify(form) !== JSON.stringify(initialForm), 'brands');
|
||||
|
|
@ -88,7 +90,16 @@ export default function Brands() {
|
|||
return (
|
||||
<div className="grid gap-6 lg:grid-cols-3">
|
||||
<div className="lg:col-span-2">
|
||||
<h1 className="mb-1 text-xl font-bold text-neutral-900 dark:text-white">Marken</h1>
|
||||
<div className="mb-1 flex items-center justify-between gap-3">
|
||||
<h1 className="text-xl font-bold text-neutral-900 dark:text-white">Marken</h1>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setCatalogOpen(true)}
|
||||
className="shrink-0 rounded-md border border-neutral-300 px-3 py-1.5 text-sm font-medium text-neutral-700 hover:bg-neutral-50 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800"
|
||||
>
|
||||
Aus Vorlage laden
|
||||
</button>
|
||||
</div>
|
||||
<p className="mb-4 text-sm text-neutral-500 dark:text-neutral-400">
|
||||
Reihenfolge am Griff links per Ziehen ändern – so erscheinen die Marken auf der Website.
|
||||
</p>
|
||||
|
|
@ -165,6 +176,7 @@ export default function Brands() {
|
|||
)}
|
||||
</div>
|
||||
</form>
|
||||
<VehicleCatalogDialog open={catalogOpen} onClose={() => setCatalogOpen(false)} onImported={load} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import ImageUploadField from '../../components/ImageUploadField.jsx';
|
|||
import TextStyleWidget from '../../components/TextStyleWidget.jsx';
|
||||
import SortableList, { saveReorder } from '../../components/admin/SortableList.jsx';
|
||||
import ViewOnSite from '../../components/admin/ViewOnSite.jsx';
|
||||
import VehicleCatalogDialog from '../../components/admin/VehicleCatalogDialog.jsx';
|
||||
import { useToast, useUnsavedChanges } from '../../context/AdminUiContext.jsx';
|
||||
|
||||
const emptyForm = { name: '', brand_id: '', image_path: '', sort_order: 0 };
|
||||
|
|
@ -17,6 +18,7 @@ export default function Models() {
|
|||
const [editingId, setEditingId] = useState(null);
|
||||
const [error, setError] = useState('');
|
||||
const [brandFilter, setBrandFilter] = useState('all');
|
||||
const [catalogOpen, setCatalogOpen] = useState(false);
|
||||
const formRef = useRef(null);
|
||||
|
||||
useUnsavedChanges(JSON.stringify(form) !== JSON.stringify(initialForm), 'models');
|
||||
|
|
@ -115,7 +117,16 @@ export default function Models() {
|
|||
return (
|
||||
<div className="grid gap-6 lg:grid-cols-3">
|
||||
<div className="lg:col-span-2">
|
||||
<h1 className="mb-4 text-xl font-bold text-neutral-900 dark:text-white">Modelle</h1>
|
||||
<div className="mb-4 flex items-center justify-between gap-3">
|
||||
<h1 className="text-xl font-bold text-neutral-900 dark:text-white">Modelle</h1>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setCatalogOpen(true)}
|
||||
className="shrink-0 rounded-md border border-neutral-300 px-3 py-1.5 text-sm font-medium text-neutral-700 hover:bg-neutral-50 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800"
|
||||
>
|
||||
Aus Vorlage laden
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="mb-3 flex flex-wrap items-center gap-2">
|
||||
<label className="text-sm font-medium text-neutral-600 dark:text-neutral-300">Nach Marke filtern:</label>
|
||||
|
|
@ -231,6 +242,7 @@ export default function Models() {
|
|||
)}
|
||||
</div>
|
||||
</form>
|
||||
<VehicleCatalogDialog open={catalogOpen} onClose={() => setCatalogOpen(false)} onImported={load} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
6558
hifi/api/data/vehicle-catalog.json
Normal file
6558
hifi/api/data/vehicle-catalog.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -43,6 +43,7 @@ use App\Controllers\TwoFactorController;
|
|||
use App\Controllers\UpdateController;
|
||||
use App\Controllers\LiveEditController;
|
||||
use App\Controllers\UploadController;
|
||||
use App\Controllers\VehicleCatalogController;
|
||||
use App\Middleware\AuthMiddleware;
|
||||
use App\Router;
|
||||
use App\Services\GitUpdateService;
|
||||
|
|
@ -144,6 +145,9 @@ $router->get('/models', $anyPerm(['models.manage', 'packages.manage'], fn($p) =>
|
|||
$router->post('/models', $perm('models.manage', fn($p) => ModelController::store()));
|
||||
$router->put('/models/{id}', $perm('models.manage', fn($p) => ModelController::update($p)));
|
||||
$router->delete('/models/{id}', $perm('models.manage', fn($p) => ModelController::destroy($p)));
|
||||
// Fahrzeug-Vorlage: legt Marken und Modelle an, braucht deshalb beide Rechte.
|
||||
$router->get('/vehicle-catalog', $anyPerm(['brands.manage', 'models.manage'], fn($p) => VehicleCatalogController::index()));
|
||||
$router->post('/vehicle-catalog/import', $perm('brands.manage', $perm('models.manage', fn($p) => VehicleCatalogController::import())));
|
||||
$router->get('/models/{brand_slug}/{model_slug}/packages', $maint('vehicles', fn($p) => ModelController::packagesForModel($p)));
|
||||
|
||||
$router->get('/packages', $perm('packages.manage', fn($p) => PackageController::index()));
|
||||
|
|
|
|||
173
hifi/api/src/Controllers/VehicleCatalogController.php
Normal file
173
hifi/api/src/Controllers/VehicleCatalogController.php
Normal file
|
|
@ -0,0 +1,173 @@
|
|||
<?php
|
||||
|
||||
namespace App\Controllers;
|
||||
|
||||
use App\Config\Database;
|
||||
use App\Support\Http;
|
||||
use App\Support\Slug;
|
||||
|
||||
/**
|
||||
* Fahrzeug-Vorlage: data/vehicle-catalog.json enthaelt in Europa verbreitete Marken samt
|
||||
* Modellgenerationen. Im Admin lassen sich daraus Marken/Modelle auswaehlen und anlegen -
|
||||
* Vorhandenes (gleicher Slug) wird uebersprungen, nichts wird geaendert oder geloescht.
|
||||
*/
|
||||
class VehicleCatalogController
|
||||
{
|
||||
private const FILE = __DIR__ . '/../../data/vehicle-catalog.json';
|
||||
|
||||
/** @return array<int, array{brand: string, models: array<int, array{name: string, years?: string}>}> */
|
||||
private static function catalog(): array
|
||||
{
|
||||
$data = json_decode((string) @file_get_contents(self::FILE), true);
|
||||
if (!is_array($data)) {
|
||||
Http::error('Fahrzeugkatalog nicht gefunden', 500);
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Vergleichsschluessel fuer "gibt es schon": Slug und kleingeschriebener Name - so wird auch
|
||||
* ein von Hand angelegtes "Citroën" (aelterer Slug "citro-n") wiedererkannt.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
private static function keys(string $name, ?string $slug = null): array
|
||||
{
|
||||
return array_unique(array_filter([$slug, Slug::make($name), 'n:' . mb_strtolower(trim($name))]));
|
||||
}
|
||||
|
||||
/** Vorhandene Marken (Schluessel => id) und deren Modelle (brand_id => [Schluessel => true]). */
|
||||
private static function existing(\PDO $db): array
|
||||
{
|
||||
$brands = [];
|
||||
foreach ($db->query('SELECT id, name, slug FROM brands')->fetchAll() as $row) {
|
||||
foreach (self::keys($row['name'], $row['slug']) as $key) {
|
||||
$brands[$key] = (int) $row['id'];
|
||||
}
|
||||
}
|
||||
$models = [];
|
||||
foreach ($db->query('SELECT brand_id, name, slug FROM car_models')->fetchAll() as $row) {
|
||||
foreach (self::keys($row['name'], $row['slug']) as $key) {
|
||||
$models[(int) $row['brand_id']][$key] = true;
|
||||
}
|
||||
}
|
||||
return [$brands, $models];
|
||||
}
|
||||
|
||||
private static function findBrand(array $brands, string $name): ?int
|
||||
{
|
||||
foreach (self::keys($name) as $key) {
|
||||
if (isset($brands[$key])) {
|
||||
return $brands[$key];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static function hasModel(array $models, ?int $brandId, string $name): bool
|
||||
{
|
||||
if ($brandId === null) {
|
||||
return false;
|
||||
}
|
||||
foreach (self::keys($name) as $key) {
|
||||
if (isset($models[$brandId][$key])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function index(): void
|
||||
{
|
||||
[$brands, $models] = self::existing(Database::connection());
|
||||
|
||||
$result = [];
|
||||
foreach (self::catalog() as $entry) {
|
||||
$brandId = self::findBrand($brands, $entry['brand']);
|
||||
$result[] = [
|
||||
'brand' => $entry['brand'],
|
||||
'exists' => $brandId !== null,
|
||||
'models' => array_map(fn(array $model): array => [
|
||||
'name' => $model['name'],
|
||||
'years' => $model['years'] ?? null,
|
||||
'exists' => self::hasModel($models, $brandId, $model['name']),
|
||||
], $entry['models']),
|
||||
];
|
||||
}
|
||||
Http::send($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Body: {"items": [{"brand": "Audi", "models": ["A4 B9", "A3 8Y"]}]} - angelegt wird nur,
|
||||
* was auch im Katalog steht, in der Reihenfolge des Katalogs hinter den vorhandenen Eintraegen.
|
||||
*/
|
||||
public static function import(): void
|
||||
{
|
||||
$wanted = [];
|
||||
foreach ((array) (Http::jsonBody()['items'] ?? []) as $item) {
|
||||
$brand = trim((string) ($item['brand'] ?? ''));
|
||||
if ($brand === '') {
|
||||
continue;
|
||||
}
|
||||
foreach ((array) ($item['models'] ?? []) as $name) {
|
||||
$wanted[$brand][trim((string) $name)] = true;
|
||||
}
|
||||
$wanted[$brand] ??= [];
|
||||
}
|
||||
if (!$wanted) {
|
||||
Http::error('Keine Fahrzeuge ausgewählt', 422);
|
||||
}
|
||||
|
||||
$db = Database::connection();
|
||||
[$brands, $models] = self::existing($db);
|
||||
$brandSort = (int) $db->query('SELECT COALESCE(MAX(sort_order), 0) FROM brands')->fetchColumn();
|
||||
$modelSortStmt = $db->prepare('SELECT COALESCE(MAX(sort_order), 0) FROM car_models WHERE brand_id = ?');
|
||||
$insertBrand = $db->prepare('INSERT INTO brands (name, slug, sort_order) VALUES (?, ?, ?)');
|
||||
$insertModel = $db->prepare('INSERT INTO car_models (brand_id, name, slug, sort_order) VALUES (?, ?, ?, ?)');
|
||||
|
||||
$created = ['brands' => 0, 'models' => 0, 'skipped' => 0];
|
||||
$db->beginTransaction();
|
||||
try {
|
||||
foreach (self::catalog() as $entry) {
|
||||
if (!isset($wanted[$entry['brand']])) {
|
||||
continue;
|
||||
}
|
||||
$selected = $wanted[$entry['brand']];
|
||||
$brandId = self::findBrand($brands, $entry['brand']);
|
||||
if ($brandId === null) {
|
||||
$brandSort += 10;
|
||||
$insertBrand->execute([$entry['brand'], Slug::make($entry['brand']), $brandSort]);
|
||||
$brandId = (int) $db->lastInsertId();
|
||||
foreach (self::keys($entry['brand']) as $key) {
|
||||
$brands[$key] = $brandId;
|
||||
}
|
||||
$created['brands']++;
|
||||
}
|
||||
|
||||
$modelSortStmt->execute([$brandId]);
|
||||
$modelSort = (int) $modelSortStmt->fetchColumn();
|
||||
foreach ($entry['models'] as $model) {
|
||||
if (!isset($selected[$model['name']])) {
|
||||
continue;
|
||||
}
|
||||
if (self::hasModel($models, $brandId, $model['name'])) {
|
||||
$created['skipped']++;
|
||||
continue;
|
||||
}
|
||||
$modelSort += 10;
|
||||
$insertModel->execute([$brandId, $model['name'], Slug::make($model['name']), $modelSort]);
|
||||
foreach (self::keys($model['name']) as $key) {
|
||||
$models[$brandId][$key] = true;
|
||||
}
|
||||
$created['models']++;
|
||||
}
|
||||
}
|
||||
$db->commit();
|
||||
} catch (\Throwable $e) {
|
||||
$db->rollBack();
|
||||
throw $e;
|
||||
}
|
||||
|
||||
Http::send($created);
|
||||
}
|
||||
}
|
||||
|
|
@ -9,6 +9,16 @@ class Slug
|
|||
$map = [
|
||||
'ä' => 'ae', 'ö' => 'oe', 'ü' => 'ue', 'ß' => 'ss',
|
||||
'Ä' => 'ae', 'Ö' => 'oe', 'Ü' => 'ue',
|
||||
// Akzente in Marken-/Modellnamen (Škoda, Citroën, Doblò ...) - sonst fiele der
|
||||
// Buchstabe weg ("citro-n").
|
||||
'á' => 'a', 'à' => 'a', 'â' => 'a', 'å' => 'a', 'ã' => 'a', 'Á' => 'a', 'À' => 'a', 'Â' => 'a', 'Å' => 'a',
|
||||
'é' => 'e', 'è' => 'e', 'ê' => 'e', 'ë' => 'e', 'É' => 'e', 'È' => 'e', 'Ê' => 'e', 'Ë' => 'e',
|
||||
'í' => 'i', 'ì' => 'i', 'î' => 'i', 'ï' => 'i', 'Í' => 'i', 'Î' => 'i',
|
||||
'ó' => 'o', 'ò' => 'o', 'ô' => 'o', 'õ' => 'o', 'ø' => 'o', 'Ó' => 'o', 'Ò' => 'o', 'Ô' => 'o', 'Ø' => 'o',
|
||||
'ú' => 'u', 'ù' => 'u', 'û' => 'u', 'Ú' => 'u', 'Û' => 'u',
|
||||
'ç' => 'c', 'č' => 'c', 'Ç' => 'c', 'Č' => 'c', 'ñ' => 'n', 'Ñ' => 'n', 'ý' => 'y', 'Ý' => 'y',
|
||||
'š' => 's', 'Š' => 's', 'ž' => 'z', 'Ž' => 'z', 'ř' => 'r', 'Ř' => 'r', 'ě' => 'e', 'Ě' => 'e',
|
||||
'æ' => 'ae', 'Æ' => 'ae', 'œ' => 'oe', 'Œ' => 'oe',
|
||||
];
|
||||
$text = strtr($text, $map);
|
||||
$text = strtolower($text);
|
||||
|
|
|
|||
1
hifi/assets/AGB-B7VmuQYo.js
Normal file
1
hifi/assets/AGB-B7VmuQYo.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
import{j as e}from"./index-ByR_n0g5.js";import{L as i}from"./LegalPageView-DyCn1nFB.js";function n(){return e.jsx(i,{slug:"agb",fallbackTitle:"AGB",description:"Allgemeine Geschäftsbedingungen von HifiPlanet Amorbach."})}export{n as default};
|
||||
|
|
@ -1 +0,0 @@
|
|||
import{j as e}from"./index-BlspSYV0.js";import{L as i}from"./LegalPageView-Cw-csW7_.js";function n(){return e.jsx(i,{slug:"agb",fallbackTitle:"AGB",description:"Allgemeine Geschäftsbedingungen von HifiPlanet Amorbach."})}export{n as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
hifi/assets/Brands-Dgm1mgy_.js
Normal file
1
hifi/assets/Brands-Dgm1mgy_.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{j as t}from"./index-BlspSYV0.js";import{L as e}from"./LegalPageView-Cw-csW7_.js";function n(){return t.jsx(e,{slug:"datenschutz",fallbackTitle:"Datenschutzerklärung",description:"Datenschutzerklärung von HifiPlanet Amorbach gemäß Art. 13 DSGVO."})}export{n as default};
|
||||
import{j as t}from"./index-ByR_n0g5.js";import{L as e}from"./LegalPageView-DyCn1nFB.js";function n(){return t.jsx(e,{slug:"datenschutz",fallbackTitle:"Datenschutzerklärung",description:"Datenschutzerklärung von HifiPlanet Amorbach gemäß Art. 13 DSGVO."})}export{n as default};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{r,u as y,b as v,j as e,e as S,R as D,c as I}from"./index-BlspSYV0.js";import{f as _,a as E,b as F,i as L}from"./downloads-B9pqFegV.js";import{L as C,F as p,a as R,b as T,c as U,M,D as A}from"./music-Co2R5rSR.js";const K={audio:M,video:U,pdf:p,image:T,archive:R,document:p},n="hifi-downloads-password",z=()=>{try{return localStorage.getItem(n)||""}catch{return""}},f=t=>{try{t?localStorage.setItem(n,t):localStorage.removeItem(n)}catch{}},g=t=>I.get("/downloads",t?{headers:{"X-Download-Password":encodeURIComponent(t)}}:void 0);function W(){const[t,i]=r.useState(null),[c,x]=r.useState(!1),[o,b]=r.useState(""),[j,m]=r.useState(!1),[u,h]=r.useState(!1),[d,w]=r.useState(null),{t:s,language:k}=y();r.useEffect(()=>{const a=z();g(a).then(l=>{l.locked?(a&&f(""),x(!0)):i(l.items)}).catch(l=>w(l))},[]);const N=async a=>{a.preventDefault(),h(!0),m(!1);try{const l=await g(o);l.locked?m(!0):(f(o),x(!1),i(l.items))}catch(l){w(l.message)}finally{h(!1)}};return v({title:s("downloadsPage.metaTitle"),description:s("downloadsPage.metaDescription"),path:"/downloads"}),e.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-12 sm:px-6",children:[e.jsx("h1",{className:"mb-2 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:s("downloadsPage.title")}),e.jsx("p",{className:"mb-10 max-w-2xl text-neutral-600 dark:text-neutral-300",children:s("downloadsPage.intro")}),d&&e.jsx("p",{className:"text-red-600",children:typeof d=="string"?d:S(d,s)}),!d&&!c&&t===null&&e.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:s("downloadsPage.loading")}),(t==null?void 0:t.length)===0&&e.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:s("downloadsPage.empty")}),c&&e.jsxs("form",{onSubmit:N,className:"max-w-md rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[e.jsx(C,{className:"h-5 w-5 text-brand-500","aria-hidden":"true"}),e.jsx("h2",{className:"font-semibold text-neutral-900 dark:text-white",children:s("downloadsPage.lockedTitle")})]}),e.jsx("p",{className:"mb-4 text-sm text-neutral-600 dark:text-neutral-300",children:s("downloadsPage.lockedText")}),e.jsx("label",{htmlFor:"downloads-password",className:"sr-only",children:s("downloadsPage.passwordLabel")}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsx("input",{id:"downloads-password",type:"password",required:!0,autoComplete:"off",value:o,onChange:a=>b(a.target.value),placeholder:s("downloadsPage.passwordLabel"),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm text-neutral-900 dark:border-neutral-700 dark:bg-neutral-950 dark:text-white"}),e.jsx("button",{type:"submit",disabled:u,className:"shrink-0 rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:s(u?"downloadsPage.unlocking":"downloadsPage.unlock")})]}),j&&e.jsx("p",{className:"mt-2 text-sm text-red-600",role:"alert",children:s("downloadsPage.wrongPassword")})]}),e.jsx("div",{className:"space-y-4",children:t==null?void 0:t.map((a,l)=>{const P=K[_(a.file_name)];return e.jsx(D,{index:l%4,className:"rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start",children:[e.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-brand-500/10 text-brand-600 dark:text-brand-400",children:e.jsx(P,{className:"h-6 w-6","aria-hidden":"true"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h2",{className:"font-semibold text-neutral-900 dark:text-white",children:a.title}),a.description&&e.jsx("p",{className:"mt-1 whitespace-pre-line text-sm text-neutral-600 dark:text-neutral-300",children:a.description}),e.jsxs("p",{className:"mt-1 text-xs text-neutral-400",children:[E(a.file_name).toUpperCase()," · ",F(a.file_size,k==="de"?"de-DE":"en-US")]}),L(a.file_name)&&e.jsx("audio",{controls:!0,preload:"none",src:a.file_path,className:"mt-3 w-full"})]}),e.jsxs("a",{href:a.file_path,download:a.file_name,className:"inline-flex shrink-0 items-center justify-center gap-2 rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:[e.jsx(A,{className:"h-4 w-4","aria-hidden":"true"}),s("downloadsPage.download")]})]})},a.id)})})]})}export{W as default};
|
||||
import{r,u as y,b as v,j as e,e as S,R as D,c as I}from"./index-ByR_n0g5.js";import{f as _,a as E,b as F,i as L}from"./downloads-B9pqFegV.js";import{L as C,F as p,a as R,b as T,c as U,M,D as A}from"./music-CzZVX9lt.js";const K={audio:M,video:U,pdf:p,image:T,archive:R,document:p},n="hifi-downloads-password",z=()=>{try{return localStorage.getItem(n)||""}catch{return""}},f=t=>{try{t?localStorage.setItem(n,t):localStorage.removeItem(n)}catch{}},g=t=>I.get("/downloads",t?{headers:{"X-Download-Password":encodeURIComponent(t)}}:void 0);function W(){const[t,i]=r.useState(null),[c,x]=r.useState(!1),[o,b]=r.useState(""),[j,m]=r.useState(!1),[u,h]=r.useState(!1),[d,w]=r.useState(null),{t:s,language:k}=y();r.useEffect(()=>{const a=z();g(a).then(l=>{l.locked?(a&&f(""),x(!0)):i(l.items)}).catch(l=>w(l))},[]);const N=async a=>{a.preventDefault(),h(!0),m(!1);try{const l=await g(o);l.locked?m(!0):(f(o),x(!1),i(l.items))}catch(l){w(l.message)}finally{h(!1)}};return v({title:s("downloadsPage.metaTitle"),description:s("downloadsPage.metaDescription"),path:"/downloads"}),e.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-12 sm:px-6",children:[e.jsx("h1",{className:"mb-2 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:s("downloadsPage.title")}),e.jsx("p",{className:"mb-10 max-w-2xl text-neutral-600 dark:text-neutral-300",children:s("downloadsPage.intro")}),d&&e.jsx("p",{className:"text-red-600",children:typeof d=="string"?d:S(d,s)}),!d&&!c&&t===null&&e.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:s("downloadsPage.loading")}),(t==null?void 0:t.length)===0&&e.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:s("downloadsPage.empty")}),c&&e.jsxs("form",{onSubmit:N,className:"max-w-md rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[e.jsx(C,{className:"h-5 w-5 text-brand-500","aria-hidden":"true"}),e.jsx("h2",{className:"font-semibold text-neutral-900 dark:text-white",children:s("downloadsPage.lockedTitle")})]}),e.jsx("p",{className:"mb-4 text-sm text-neutral-600 dark:text-neutral-300",children:s("downloadsPage.lockedText")}),e.jsx("label",{htmlFor:"downloads-password",className:"sr-only",children:s("downloadsPage.passwordLabel")}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsx("input",{id:"downloads-password",type:"password",required:!0,autoComplete:"off",value:o,onChange:a=>b(a.target.value),placeholder:s("downloadsPage.passwordLabel"),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm text-neutral-900 dark:border-neutral-700 dark:bg-neutral-950 dark:text-white"}),e.jsx("button",{type:"submit",disabled:u,className:"shrink-0 rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:s(u?"downloadsPage.unlocking":"downloadsPage.unlock")})]}),j&&e.jsx("p",{className:"mt-2 text-sm text-red-600",role:"alert",children:s("downloadsPage.wrongPassword")})]}),e.jsx("div",{className:"space-y-4",children:t==null?void 0:t.map((a,l)=>{const P=K[_(a.file_name)];return e.jsx(D,{index:l%4,className:"rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start",children:[e.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-brand-500/10 text-brand-600 dark:text-brand-400",children:e.jsx(P,{className:"h-6 w-6","aria-hidden":"true"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h2",{className:"font-semibold text-neutral-900 dark:text-white",children:a.title}),a.description&&e.jsx("p",{className:"mt-1 whitespace-pre-line text-sm text-neutral-600 dark:text-neutral-300",children:a.description}),e.jsxs("p",{className:"mt-1 text-xs text-neutral-400",children:[E(a.file_name).toUpperCase()," · ",F(a.file_size,k==="de"?"de-DE":"en-US")]}),L(a.file_name)&&e.jsx("audio",{controls:!0,preload:"none",src:a.file_path,className:"mt-3 w-full"})]}),e.jsxs("a",{href:a.file_path,download:a.file_name,className:"inline-flex shrink-0 items-center justify-center gap-2 rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:[e.jsx(A,{className:"h-4 w-4","aria-hidden":"true"}),s("downloadsPage.download")]})]})},a.id)})})]})}export{W as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{g as c,r as n,u as g,a as m,c as u,b as p,j as a,N as h,e as f,L as b,d as y,f as v}from"./index-BlspSYV0.js";function N(){const{brandSlug:r}=c(),[t,i]=n.useState(null),[l,d]=n.useState(null),{t:s}=g(),{gallery_card_text_x:o,gallery_card_text_y:x}=m();return n.useEffect(()=>{u.get(`/gallery-brands/${r}/projects`).then(i).catch(e=>d(e))},[r]),p({title:t?s("galleryBrandPage.metaTitle")(t.brand.name):s("galleryBrandPage.metaTitleFallback"),description:t?s("galleryBrandPage.metaDescription")(t.brand.name):void 0,path:`/galerie/${r}`}),l?l.status===404?a.jsx(h,{}):a.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:f(l,s)}):t?a.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[a.jsxs("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:[t.brand.name," – ",s("galleryBrandPage.titleSuffix")]}),t.projects.length===0&&a.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:s("galleryBrandPage.empty")}),a.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4",children:t.projects.map(e=>a.jsxs(b,{to:`/galerie/${r}/${e.slug}`,className:"group relative block aspect-[4/3] overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[e.cover_image_path?a.jsx("img",{src:e.cover_image_path,alt:e.name,className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}):a.jsx("div",{className:"flex h-full w-full items-center justify-center bg-neutral-200 dark:bg-neutral-800"}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent transition group-hover:from-black/95"}),a.jsx(y,{entity:"gallery_projects",id:e.id,field:"name",lang:"de",value:e.name,className:"absolute whitespace-nowrap p-4 text-lg font-extrabold text-white",style:v(o,x,{x:0,y:100})})]},e.id))})]}):a.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:s("galleryBrandPage.loading")})}export{N as default};
|
||||
import{g as c,r as n,u as g,a as m,c as u,b as p,j as a,N as h,e as f,L as b,d as y,f as v}from"./index-ByR_n0g5.js";function N(){const{brandSlug:r}=c(),[t,i]=n.useState(null),[l,d]=n.useState(null),{t:s}=g(),{gallery_card_text_x:o,gallery_card_text_y:x}=m();return n.useEffect(()=>{u.get(`/gallery-brands/${r}/projects`).then(i).catch(e=>d(e))},[r]),p({title:t?s("galleryBrandPage.metaTitle")(t.brand.name):s("galleryBrandPage.metaTitleFallback"),description:t?s("galleryBrandPage.metaDescription")(t.brand.name):void 0,path:`/galerie/${r}`}),l?l.status===404?a.jsx(h,{}):a.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:f(l,s)}):t?a.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[a.jsxs("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:[t.brand.name," – ",s("galleryBrandPage.titleSuffix")]}),t.projects.length===0&&a.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:s("galleryBrandPage.empty")}),a.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4",children:t.projects.map(e=>a.jsxs(b,{to:`/galerie/${r}/${e.slug}`,className:"group relative block aspect-[4/3] overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[e.cover_image_path?a.jsx("img",{src:e.cover_image_path,alt:e.name,className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}):a.jsx("div",{className:"flex h-full w-full items-center justify-center bg-neutral-200 dark:bg-neutral-800"}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent transition group-hover:from-black/95"}),a.jsx(y,{entity:"gallery_projects",id:e.id,field:"name",lang:"de",value:e.name,className:"absolute whitespace-nowrap p-4 text-lg font-extrabold text-white",style:v(o,x,{x:0,y:100})})]},e.id))})]}):a.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:s("galleryBrandPage.loading")})}export{N as default};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{r,u as d,a as g,b as u,c as m,j as e,E as i,e as p,L as v,d as h,f as y}from"./index-BlspSYV0.js";function w(){const[a,o]=r.useState(null),[l,n]=r.useState(null),{t:s}=d(),{gallery_card_text_x:c,gallery_card_text_y:x}=g();return u({title:s("galleryOverview.metaTitle"),description:s("galleryOverview.metaDescription"),path:"/galerie"}),r.useEffect(()=>{m.get("/gallery-brands").then(o).catch(t=>n(t))},[]),e.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[e.jsx(i,{k:"galleryOverview.title",as:"h1",className:"mb-2 block text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl"}),e.jsx(i,{k:"galleryOverview.intro",as:"p",className:"mb-8 block text-neutral-600 dark:text-neutral-300"}),l&&e.jsx("p",{className:"text-red-600",children:typeof l=="string"?l:p(l,s)}),!a&&!l&&e.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:s("galleryOverview.loading")}),a&&a.length===0&&e.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:s("galleryOverview.empty")}),e.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4",children:a==null?void 0:a.map(t=>e.jsxs(v,{to:`/galerie/${t.slug}`,className:"group relative block aspect-[4/3] overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[t.cover_image_path?e.jsx("img",{src:t.cover_image_path,alt:t.name,className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}):e.jsx("div",{className:"flex h-full w-full items-center justify-center bg-neutral-200 dark:bg-neutral-800"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent transition group-hover:from-black/95"}),e.jsx(h,{entity:"gallery_brands",id:t.id,field:"name",lang:"de",value:t.name,className:"absolute whitespace-nowrap p-4 text-lg font-extrabold text-white",style:y(c,x,{x:0,y:100})})]},t.id))})]})}export{w as default};
|
||||
import{r,u as d,a as g,b as u,c as m,j as e,E as i,e as p,L as v,d as h,f as y}from"./index-ByR_n0g5.js";function w(){const[a,o]=r.useState(null),[l,n]=r.useState(null),{t:s}=d(),{gallery_card_text_x:c,gallery_card_text_y:x}=g();return u({title:s("galleryOverview.metaTitle"),description:s("galleryOverview.metaDescription"),path:"/galerie"}),r.useEffect(()=>{m.get("/gallery-brands").then(o).catch(t=>n(t))},[]),e.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[e.jsx(i,{k:"galleryOverview.title",as:"h1",className:"mb-2 block text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl"}),e.jsx(i,{k:"galleryOverview.intro",as:"p",className:"mb-8 block text-neutral-600 dark:text-neutral-300"}),l&&e.jsx("p",{className:"text-red-600",children:typeof l=="string"?l:p(l,s)}),!a&&!l&&e.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:s("galleryOverview.loading")}),a&&a.length===0&&e.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:s("galleryOverview.empty")}),e.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4",children:a==null?void 0:a.map(t=>e.jsxs(v,{to:`/galerie/${t.slug}`,className:"group relative block aspect-[4/3] overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[t.cover_image_path?e.jsx("img",{src:t.cover_image_path,alt:t.name,className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}):e.jsx("div",{className:"flex h-full w-full items-center justify-center bg-neutral-200 dark:bg-neutral-800"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent transition group-hover:from-black/95"}),e.jsx(h,{entity:"gallery_brands",id:t.id,field:"name",lang:"de",value:t.name,className:"absolute whitespace-nowrap p-4 text-lg font-extrabold text-white",style:y(c,x,{x:0,y:100})})]},t.id))})]})}export{w as default};
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
import{g as z,r as l,q as B,c as d,j as t,L as C}from"./index-BlspSYV0.js";import{S as M,s as D}from"./SortableList-DwfJpzeR.js";import{V as G}from"./ViewOnSite-BPLJTKOt.js";import{r as L,M as A,f as I}from"./resizeImage-C6PvAwh0.js";import"./sortable.esm-D1g5h7xA.js";import"./grip-vertical-Bv_4pkjN.js";function J(){const{projectId:m}=z(),[u,h]=l.useState([]),[c,v]=l.useState(null),[f,j]=l.useState(""),[b,w]=l.useState(!1),[$,y]=l.useState(""),p=l.useRef(null),s=B(),x=()=>d.get(`/gallery-projects/${m}/photos`).then(h);l.useEffect(()=>{x(),d.get("/gallery-projects").then(e=>v(e.find(r=>String(r.id)===String(m))||null)).catch(()=>{})},[m]);const F=async e=>{const r=Array.from(e.target.files||[]);if(r.length===0)return;j(""),w(!0);let a=u.reduce((o,i)=>Math.max(o,Number(i.sort_order)||0),0),n=0;const g=[];for(let o=0;o<r.length;o++){y(`Foto ${o+1} von ${r.length} wird hochgeladen…`);try{const i=await L(r[o]);if(i.size>A)throw new Error(`zu groß (${I(i.size)}, max. 5 MB)`);const k=new FormData;k.append("file",i);const E=await d.post("/uploads",k);a+=10,await d.post("/gallery-photos",{gallery_project_id:Number(m),image_path:E.path,sort_order:a}),n++}catch(i){g.push(`${r[o].name}: ${i.message}`)}}w(!1),y(""),p.current&&(p.current.value=""),x(),g.length===0?s.success(n===1?"1 Foto hochgeladen.":`${n} Fotos hochgeladen.`):(j(`Nicht hochgeladen:
|
||||
import{g as z,r as l,q as B,c as d,j as t,L as C}from"./index-ByR_n0g5.js";import{S as M,s as D}from"./SortableList-fUokp5Er.js";import{V as G}from"./ViewOnSite-DuRTh7q1.js";import{r as L,M as A,f as I}from"./resizeImage-C6PvAwh0.js";import"./sortable.esm-feaRoI7N.js";import"./grip-vertical-B-w3JIIY.js";function J(){const{projectId:m}=z(),[u,h]=l.useState([]),[c,v]=l.useState(null),[f,j]=l.useState(""),[b,w]=l.useState(!1),[$,y]=l.useState(""),p=l.useRef(null),s=B(),x=()=>d.get(`/gallery-projects/${m}/photos`).then(h);l.useEffect(()=>{x(),d.get("/gallery-projects").then(e=>v(e.find(r=>String(r.id)===String(m))||null)).catch(()=>{})},[m]);const F=async e=>{const r=Array.from(e.target.files||[]);if(r.length===0)return;j(""),w(!0);let a=u.reduce((o,i)=>Math.max(o,Number(i.sort_order)||0),0),n=0;const g=[];for(let o=0;o<r.length;o++){y(`Foto ${o+1} von ${r.length} wird hochgeladen…`);try{const i=await L(r[o]);if(i.size>A)throw new Error(`zu groß (${I(i.size)}, max. 5 MB)`);const k=new FormData;k.append("file",i);const E=await d.post("/uploads",k);a+=10,await d.post("/gallery-photos",{gallery_project_id:Number(m),image_path:E.path,sort_order:a}),n++}catch(i){g.push(`${r[o].name}: ${i.message}`)}}w(!1),y(""),p.current&&(p.current.value=""),x(),g.length===0?s.success(n===1?"1 Foto hochgeladen.":`${n} Fotos hochgeladen.`):(j(`Nicht hochgeladen:
|
||||
${g.join(`
|
||||
`)}`),s.error(`${n} hochgeladen, ${g.length} fehlgeschlagen.`))},P=(e,r)=>{h(a=>a.map(n=>n.id===e.id?{...n,caption:r}:n))},N=l.useRef(null),S=async e=>{if((e.caption||"")!==N.current)try{await d.put(`/gallery-photos/${e.id}`,{caption:e.caption,sort_order:e.sort_order}),s.success("Bildunterschrift gespeichert.")}catch(r){s.error(`Speichern fehlgeschlagen: ${r.message}`)}},_=async e=>{if(confirm("Foto wirklich entfernen?"))try{await d.delete(`/gallery-photos/${e}`),s.success("Foto entfernt."),x()}catch(r){s.error(`Entfernen fehlgeschlagen: ${r.message}`)}},R=async e=>{const r=u;h(e);try{h(await D("gallery-photos",e)),s.success("Reihenfolge gespeichert.")}catch(a){h(r),s.error(`Reihenfolge konnte nicht gespeichert werden: ${a.message}`)}};return t.jsxs("div",{children:[t.jsx("p",{className:"mb-2 text-sm",children:t.jsx(C,{to:"/admin/gallery-projects",className:"text-brand-600 hover:underline",children:"← Zurück zu den Projekten"})}),t.jsxs("div",{className:"mb-4 flex items-center justify-between gap-3",children:[t.jsxs("h1",{className:"text-xl font-bold text-neutral-900 dark:text-white",children:["Fotos im Projekt",c?`: ${c.brand_name} ${c.name}`:""]}),c&&t.jsx(G,{to:`/galerie/${c.brand_slug}/${c.slug}`})]}),t.jsxs("div",{className:"mb-6 rounded-xl border border-neutral-200 bg-white p-4 dark:border-neutral-800 dark:bg-neutral-900",children:[t.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Fotos hinzufügen (Mehrfachauswahl möglich)"}),t.jsx("input",{ref:p,type:"file",multiple:!0,accept:"image/png,image/jpeg,image/webp",onChange:F,disabled:b,className:"text-sm"}),t.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:"JPG, PNG oder WebP, große Fotos werden automatisch verkleinert."}),b&&t.jsx("p",{className:"mt-2 text-sm text-neutral-500","aria-live":"polite",children:$})]}),f&&t.jsx("p",{className:"mb-4 whitespace-pre-line text-sm text-red-600",children:f}),u.length>1&&t.jsx("p",{className:"mb-3 text-xs text-neutral-500 dark:text-neutral-400",children:"Reihenfolge am Griff per Ziehen ändern."}),t.jsx(M,{items:u,onReorder:R,as:"grid",className:"grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4",children:(e,r)=>t.jsxs("div",{className:"overflow-hidden rounded-xl border border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-900",children:[t.jsx("img",{src:e.image_path,alt:e.caption||"",className:"aspect-square w-full object-cover",loading:"lazy"}),t.jsxs("div",{className:"space-y-2 p-3",children:[t.jsx("input",{value:e.caption||"",onChange:a=>P(e,a.target.value),onFocus:()=>{N.current=e.caption||""},onBlur:()=>S(e),placeholder:"Bildunterschrift (optional)",className:"w-full rounded-md border border-neutral-300 bg-white px-2 py-1 text-xs dark:border-neutral-700 dark:bg-neutral-900"}),t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[r,t.jsx("button",{onClick:()=>_(e.id),className:"text-xs text-red-600 hover:underline",children:"Entfernen"})]})]})]})}),u.length===0&&t.jsx("p",{className:"py-6 text-center text-neutral-400",children:"Noch keine Fotos in diesem Projekt."})]})}export{J as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{u as g,r as x,h as j,j as e,g as b,c as w,b as f,N as k,e as y,d as v,R as P,E as h,L as N}from"./index-BlspSYV0.js";function L({photos:o,index:s,onClose:t,onNavigate:n}){const{t:i}=g();if(x.useEffect(()=>{if(s==null)return;const a=r=>{r.key==="Escape"&&t(),r.key==="ArrowRight"&&n(1),r.key==="ArrowLeft"&&n(-1)};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[s,t,n]),s==null)return null;const d=o[s],c=a=>a.stopPropagation();return j.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[200] flex items-center justify-center bg-black/90 p-4",onClick:t,children:[e.jsx("button",{onClick:a=>{c(a),t()},"aria-label":i("lightbox.close"),className:"absolute right-4 top-4 rounded-full p-2 text-white/80 hover:bg-white/10 hover:text-white",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-7 w-7",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6l12 12M18 6 6 18"})})}),o.length>1&&e.jsx("button",{onClick:a=>{c(a),n(-1)},"aria-label":i("lightbox.previous"),className:"absolute left-2 top-1/2 -translate-y-1/2 rounded-full p-2 text-white/80 hover:bg-white/10 hover:text-white sm:left-4",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-8 w-8",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m15 18-6-6 6-6"})})}),e.jsx("img",{src:d.image_path,alt:d.caption||"",onClick:c,className:"max-h-[85vh] max-w-full rounded-lg object-contain"}),o.length>1&&e.jsx("button",{onClick:a=>{c(a),n(1)},"aria-label":i("lightbox.next"),className:"absolute right-2 top-1/2 -translate-y-1/2 rounded-full p-2 text-white/80 hover:bg-white/10 hover:text-white sm:right-4",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-8 w-8",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9 18 6-6-6-6"})})}),d.caption&&e.jsx("p",{onClick:c,className:"absolute bottom-4 left-1/2 -translate-x-1/2 rounded-full bg-black/60 px-4 py-1.5 text-sm text-white",children:d.caption})]}),document.body)}function C(){const{brandSlug:o,projectSlug:s}=b(),[t,n]=x.useState(null),[i,d]=x.useState(null),[c,a]=x.useState(null),{t:r}=g();x.useEffect(()=>{w.get(`/gallery-brands/${o}/${s}/photos`).then(n).catch(l=>d(l))},[o,s]),f({title:t?`${t.project.name} – ${t.project.brand_name}`:r("galleryProjectPage.metaTitleFallback"),description:t?r("galleryProjectPage.metaDescription")(t.project.name):void 0,path:`/galerie/${o}/${s}`});const p=l=>{a(u=>{const m=t.photos.length;return(u+l+m)%m})};return i?i.status===404?e.jsx(k,{}):e.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:y(i,r)}):t?e.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[e.jsx(v,{entity:"gallery_projects",id:t.project.id,field:"name",lang:"de",value:t.project.name,as:"h1",className:"mb-8 block text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl"}),t.photos.length===0&&e.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:r("galleryProjectPage.empty")}),e.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:t.photos.map((l,u)=>e.jsx(P,{index:u%6,shine:!0,className:"aspect-square overflow-hidden rounded-xl",children:e.jsx("button",{onClick:()=>a(u),className:"block h-full w-full","aria-label":l.caption||r("galleryProjectPage.enlargeImage"),children:e.jsx("img",{src:l.image_path,alt:l.caption||"",loading:"lazy",decoding:"async",className:"h-full w-full object-cover transition duration-300 hover:scale-105"})})},l.id))}),e.jsxs("div",{className:"mt-12 flex flex-col items-start gap-4 rounded-2xl border border-neutral-200 bg-white p-6 shadow-sm dark:border-neutral-800 dark:bg-neutral-900 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{children:[e.jsx(h,{k:"galleryProjectPage.ctaTitle",as:"h2",className:"block text-lg font-bold text-neutral-900 dark:text-white"}),e.jsx(h,{k:"galleryProjectPage.ctaText",as:"p",className:"mt-1 block text-sm text-neutral-600 dark:text-neutral-300"})]}),e.jsx(N,{to:`/kontakt?${new URLSearchParams({topic:r("galleryProjectPage.ctaTopic")(t.project.name)}).toString()}`,className:"shrink-0 rounded-md bg-brand-500 px-5 py-3 text-sm font-semibold text-white shadow-sm hover:bg-brand-600",children:e.jsx(h,{k:"galleryProjectPage.ctaButton"})})]}),e.jsx(L,{photos:t.photos,index:c,onClose:()=>a(null),onNavigate:p})]}):e.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:r("galleryProjectPage.loading")})}export{C as default};
|
||||
import{u as g,r as x,h as j,j as e,g as b,c as w,b as f,N as k,e as y,d as v,R as P,E as h,L as N}from"./index-ByR_n0g5.js";function L({photos:o,index:s,onClose:t,onNavigate:n}){const{t:i}=g();if(x.useEffect(()=>{if(s==null)return;const a=r=>{r.key==="Escape"&&t(),r.key==="ArrowRight"&&n(1),r.key==="ArrowLeft"&&n(-1)};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[s,t,n]),s==null)return null;const d=o[s],c=a=>a.stopPropagation();return j.createPortal(e.jsxs("div",{className:"fixed inset-0 z-[200] flex items-center justify-center bg-black/90 p-4",onClick:t,children:[e.jsx("button",{onClick:a=>{c(a),t()},"aria-label":i("lightbox.close"),className:"absolute right-4 top-4 rounded-full p-2 text-white/80 hover:bg-white/10 hover:text-white",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-7 w-7",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6l12 12M18 6 6 18"})})}),o.length>1&&e.jsx("button",{onClick:a=>{c(a),n(-1)},"aria-label":i("lightbox.previous"),className:"absolute left-2 top-1/2 -translate-y-1/2 rounded-full p-2 text-white/80 hover:bg-white/10 hover:text-white sm:left-4",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-8 w-8",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m15 18-6-6 6-6"})})}),e.jsx("img",{src:d.image_path,alt:d.caption||"",onClick:c,className:"max-h-[85vh] max-w-full rounded-lg object-contain"}),o.length>1&&e.jsx("button",{onClick:a=>{c(a),n(1)},"aria-label":i("lightbox.next"),className:"absolute right-2 top-1/2 -translate-y-1/2 rounded-full p-2 text-white/80 hover:bg-white/10 hover:text-white sm:right-4",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-8 w-8",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9 18 6-6-6-6"})})}),d.caption&&e.jsx("p",{onClick:c,className:"absolute bottom-4 left-1/2 -translate-x-1/2 rounded-full bg-black/60 px-4 py-1.5 text-sm text-white",children:d.caption})]}),document.body)}function C(){const{brandSlug:o,projectSlug:s}=b(),[t,n]=x.useState(null),[i,d]=x.useState(null),[c,a]=x.useState(null),{t:r}=g();x.useEffect(()=>{w.get(`/gallery-brands/${o}/${s}/photos`).then(n).catch(l=>d(l))},[o,s]),f({title:t?`${t.project.name} – ${t.project.brand_name}`:r("galleryProjectPage.metaTitleFallback"),description:t?r("galleryProjectPage.metaDescription")(t.project.name):void 0,path:`/galerie/${o}/${s}`});const p=l=>{a(u=>{const m=t.photos.length;return(u+l+m)%m})};return i?i.status===404?e.jsx(k,{}):e.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:y(i,r)}):t?e.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[e.jsx(v,{entity:"gallery_projects",id:t.project.id,field:"name",lang:"de",value:t.project.name,as:"h1",className:"mb-8 block text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl"}),t.photos.length===0&&e.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:r("galleryProjectPage.empty")}),e.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:t.photos.map((l,u)=>e.jsx(P,{index:u%6,shine:!0,className:"aspect-square overflow-hidden rounded-xl",children:e.jsx("button",{onClick:()=>a(u),className:"block h-full w-full","aria-label":l.caption||r("galleryProjectPage.enlargeImage"),children:e.jsx("img",{src:l.image_path,alt:l.caption||"",loading:"lazy",decoding:"async",className:"h-full w-full object-cover transition duration-300 hover:scale-105"})})},l.id))}),e.jsxs("div",{className:"mt-12 flex flex-col items-start gap-4 rounded-2xl border border-neutral-200 bg-white p-6 shadow-sm dark:border-neutral-800 dark:bg-neutral-900 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{children:[e.jsx(h,{k:"galleryProjectPage.ctaTitle",as:"h2",className:"block text-lg font-bold text-neutral-900 dark:text-white"}),e.jsx(h,{k:"galleryProjectPage.ctaText",as:"p",className:"mt-1 block text-sm text-neutral-600 dark:text-neutral-300"})]}),e.jsx(N,{to:`/kontakt?${new URLSearchParams({topic:r("galleryProjectPage.ctaTopic")(t.project.name)}).toString()}`,className:"shrink-0 rounded-md bg-brand-500 px-5 py-3 text-sm font-semibold text-white shadow-sm hover:bg-brand-600",children:e.jsx(h,{k:"galleryProjectPage.ctaButton"})})]}),e.jsx(L,{photos:t.photos,index:c,onClose:()=>a(null),onNavigate:p})]}):e.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:r("galleryProjectPage.loading")})}export{C as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{r,c as u,j as e}from"./index-BlspSYV0.js";function h({compact:m=!1}){const[n,i]=r.useState(!1),[s,l]=r.useState(null),[d,o]=r.useState(""),[t,c]=r.useState(null);r.useEffect(()=>{u.get("/settings/compress-status").then(a=>c(a.gd_available)).catch(()=>c(!1))},[]);const b=async()=>{i(!0),o(""),l(null);try{l(await u.post("/settings/compress-uploads",{}))}catch(a){o(a.message)}finally{i(!1)}};return e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsxs("div",{className:"mb-1 flex items-center justify-between gap-3",children:[e.jsx("h2",{className:"font-semibold text-neutral-900 dark:text-white",children:"Bilder optimieren"}),t!==null&&e.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-semibold ${t?"bg-green-100 text-green-700 dark:bg-green-900/40 dark:text-green-300":"bg-red-100 text-red-700 dark:bg-red-900/40 dark:text-red-300"}`,children:t?"Aktiv":"Nicht verfügbar"})]}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:m?"Verkleinert alle bereits hochgeladenen Fotos, damit die Seite schneller lädt. Neue Bilder werden automatisch verkleinert.":"Neu hochgeladene Bilder werden automatisch verkleinert und komprimiert. Dieser Button holt das für alle bereits vorhandenen Bilder nach – nützlich, wenn die Seite durch zu hoch aufgelöste Fotos spürbar langsam lädt."}),t===!1&&e.jsx("p",{className:"mb-4 rounded-md bg-amber-50 p-3 text-sm text-amber-800 dark:bg-amber-900/20 dark:text-amber-300",children:'Diese Funktion braucht die PHP-Erweiterung "gd", die auf diesem Server aktuell nicht aktiv ist. Bei den meisten Hostern (auch All-Inkl) ist sie Teil jeder PHP-Version – bitte beim Hoster-Support nachfragen bzw. prüfen, ob in den Hosting-Einstellungen eine andere PHP-Version ausgewählt werden muss.'}),e.jsx("button",{type:"button",onClick:b,disabled:n||t===!1,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:n?"Optimiert… bitte warten":"Bestehende Bilder optimieren"}),d&&e.jsx("p",{className:"mt-3 text-sm text-red-600",children:d}),s&&e.jsxs("p",{className:"mt-3 text-sm text-green-600 dark:text-green-400",children:[s.processed," Bild(er) verkleinert: ",(s.before_bytes/1024/1024).toFixed(1)," MB"," → ",(s.after_bytes/1024/1024).toFixed(1)," MB."]})]})}export{h as I};
|
||||
import{r,c as u,j as e}from"./index-ByR_n0g5.js";function h({compact:m=!1}){const[n,i]=r.useState(!1),[s,l]=r.useState(null),[d,o]=r.useState(""),[t,c]=r.useState(null);r.useEffect(()=>{u.get("/settings/compress-status").then(a=>c(a.gd_available)).catch(()=>c(!1))},[]);const b=async()=>{i(!0),o(""),l(null);try{l(await u.post("/settings/compress-uploads",{}))}catch(a){o(a.message)}finally{i(!1)}};return e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsxs("div",{className:"mb-1 flex items-center justify-between gap-3",children:[e.jsx("h2",{className:"font-semibold text-neutral-900 dark:text-white",children:"Bilder optimieren"}),t!==null&&e.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-semibold ${t?"bg-green-100 text-green-700 dark:bg-green-900/40 dark:text-green-300":"bg-red-100 text-red-700 dark:bg-red-900/40 dark:text-red-300"}`,children:t?"Aktiv":"Nicht verfügbar"})]}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:m?"Verkleinert alle bereits hochgeladenen Fotos, damit die Seite schneller lädt. Neue Bilder werden automatisch verkleinert.":"Neu hochgeladene Bilder werden automatisch verkleinert und komprimiert. Dieser Button holt das für alle bereits vorhandenen Bilder nach – nützlich, wenn die Seite durch zu hoch aufgelöste Fotos spürbar langsam lädt."}),t===!1&&e.jsx("p",{className:"mb-4 rounded-md bg-amber-50 p-3 text-sm text-amber-800 dark:bg-amber-900/20 dark:text-amber-300",children:'Diese Funktion braucht die PHP-Erweiterung "gd", die auf diesem Server aktuell nicht aktiv ist. Bei den meisten Hostern (auch All-Inkl) ist sie Teil jeder PHP-Version – bitte beim Hoster-Support nachfragen bzw. prüfen, ob in den Hosting-Einstellungen eine andere PHP-Version ausgewählt werden muss.'}),e.jsx("button",{type:"button",onClick:b,disabled:n||t===!1,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:n?"Optimiert… bitte warten":"Bestehende Bilder optimieren"}),d&&e.jsx("p",{className:"mt-3 text-sm text-red-600",children:d}),s&&e.jsxs("p",{className:"mt-3 text-sm text-green-600 dark:text-green-400",children:[s.processed," Bild(er) verkleinert: ",(s.before_bytes/1024/1024).toFixed(1)," MB"," → ",(s.after_bytes/1024/1024).toFixed(1)," MB."]})]})}export{h as I};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +0,0 @@
|
|||
import{j as s}from"./index-BlspSYV0.js";import{L as e}from"./LegalPageView-Cw-csW7_.js";function i(){return s.jsx(e,{slug:"impressum",fallbackTitle:"Impressum",description:"Impressum von HifiPlanet Amorbach gemäß § 5 DDG."})}export{i as default};
|
||||
1
hifi/assets/Impressum-teGCkFgH.js
Normal file
1
hifi/assets/Impressum-teGCkFgH.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
import{j as s}from"./index-ByR_n0g5.js";import{L as e}from"./LegalPageView-DyCn1nFB.js";function i(){return s.jsx(e,{slug:"impressum",fallbackTitle:"Impressum",description:"Impressum von HifiPlanet Amorbach gemäß § 5 DDG."})}export{i as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{r as l,c as n,b as r,j as a,d,i as m}from"./index-BlspSYV0.js";function c({slug:e,fallbackTitle:s,description:i}){const[t,x]=l.useState(null);return l.useEffect(()=>{n.get(`/legal-pages/${e}`).then(x).catch(()=>{})},[e]),r({title:(t==null?void 0:t.title)||s,description:i,path:`/${e}`}),t?a.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-12 sm:px-6",children:[a.jsx(d,{entity:"legal_pages",id:e,field:"title",lang:"de",value:t.title,as:"h1",className:"mb-8 block text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl"}),a.jsx(m,{entity:"legal_pages",id:e,field:"body_html",lang:"de",value:t.body_html,label:t.title,className:"legal-content text-sm text-neutral-600 dark:text-neutral-300"})]}):null}export{c as L};
|
||||
import{r as l,c as n,b as r,j as a,d,i as m}from"./index-ByR_n0g5.js";function c({slug:e,fallbackTitle:s,description:i}){const[t,x]=l.useState(null);return l.useEffect(()=>{n.get(`/legal-pages/${e}`).then(x).catch(()=>{})},[e]),r({title:(t==null?void 0:t.title)||s,description:i,path:`/${e}`}),t?a.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-12 sm:px-6",children:[a.jsx(d,{entity:"legal_pages",id:e,field:"title",lang:"de",value:t.title,as:"h1",className:"mb-8 block text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl"}),a.jsx(m,{entity:"legal_pages",id:e,field:"body_html",lang:"de",value:t.body_html,label:t.title,className:"legal-content text-sm text-neutral-600 dark:text-neutral-300"})]}):null}export{c as L};
|
||||
|
|
@ -1 +1 @@
|
|||
import{r as s,c as b,j as e}from"./index-BlspSYV0.js";import v from"./RichTextEditor-CO4xzKJO.js";const j=[{slug:"impressum",label:"Impressum"},{slug:"datenschutz",label:"Datenschutzerklärung"},{slug:"agb",label:"AGB"}];function k(){const[d,u]=s.useState(null),[r,h]=s.useState("impressum"),[c,i]=s.useState(!1),[o,n]=s.useState(""),[g,l]=s.useState(!1);if(s.useEffect(()=>{b.get("/legal-pages").then(u)},[]),!d)return e.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"});const a=d[r],m=(t,f)=>{u(x=>({...x,[r]:{...x[r],[t]:f}})),l(!1)},p=async()=>{i(!0),n(""),l(!1);try{await b.put(`/legal-pages/${r}`,{title:a.title,body_html:a.body_html}),l(!0)}catch(t){n(t.message)}finally{i(!1)}};return e.jsx("div",{className:"max-w-3xl space-y-6",children:e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Rechtstexte"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Impressum, Datenschutzerklärung und AGB direkt hier pflegen, statt einen Deploy für jede Textänderung zu brauchen. Bitte bei Rechtstexten im Zweifel rechtlich beraten lassen, bevor du größere Änderungen veröffentlichst."}),e.jsx("div",{className:"mb-4 flex flex-wrap gap-2",children:j.map(t=>e.jsx("button",{type:"button",onClick:()=>{h(t.slug),l(!1),n("")},className:`rounded-md px-3 py-1.5 text-sm font-medium transition ${r===t.slug?"bg-brand-500 text-white":"border border-neutral-300 text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,children:t.label},t.slug))}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Überschrift"}),e.jsx("input",{value:a.title,onChange:t=>m("title",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsx(v,{label:"Inhalt",value:a.body_html,onChange:t=>m("body_html",t)})]}),a.updated_at&&e.jsxs("p",{className:"mt-3 text-xs text-neutral-400",children:["Zuletzt geändert: ",new Date(a.updated_at.replace(" ","T")).toLocaleString("de-DE")]}),o&&e.jsx("p",{className:"mt-3 text-sm text-red-600",children:o}),g&&e.jsx("p",{className:"mt-3 text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),e.jsx("button",{type:"button",onClick:p,disabled:c,className:"mt-4 rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:c?"Speichere…":"Speichern"})]})})}export{k as default};
|
||||
import{r as s,c as b,j as e}from"./index-ByR_n0g5.js";import v from"./RichTextEditor-DOxjC-7q.js";const j=[{slug:"impressum",label:"Impressum"},{slug:"datenschutz",label:"Datenschutzerklärung"},{slug:"agb",label:"AGB"}];function k(){const[d,u]=s.useState(null),[r,h]=s.useState("impressum"),[c,i]=s.useState(!1),[o,n]=s.useState(""),[g,l]=s.useState(!1);if(s.useEffect(()=>{b.get("/legal-pages").then(u)},[]),!d)return e.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"});const a=d[r],m=(t,f)=>{u(x=>({...x,[r]:{...x[r],[t]:f}})),l(!1)},p=async()=>{i(!0),n(""),l(!1);try{await b.put(`/legal-pages/${r}`,{title:a.title,body_html:a.body_html}),l(!0)}catch(t){n(t.message)}finally{i(!1)}};return e.jsx("div",{className:"max-w-3xl space-y-6",children:e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Rechtstexte"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Impressum, Datenschutzerklärung und AGB direkt hier pflegen, statt einen Deploy für jede Textänderung zu brauchen. Bitte bei Rechtstexten im Zweifel rechtlich beraten lassen, bevor du größere Änderungen veröffentlichst."}),e.jsx("div",{className:"mb-4 flex flex-wrap gap-2",children:j.map(t=>e.jsx("button",{type:"button",onClick:()=>{h(t.slug),l(!1),n("")},className:`rounded-md px-3 py-1.5 text-sm font-medium transition ${r===t.slug?"bg-brand-500 text-white":"border border-neutral-300 text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,children:t.label},t.slug))}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Überschrift"}),e.jsx("input",{value:a.title,onChange:t=>m("title",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsx(v,{label:"Inhalt",value:a.body_html,onChange:t=>m("body_html",t)})]}),a.updated_at&&e.jsxs("p",{className:"mt-3 text-xs text-neutral-400",children:["Zuletzt geändert: ",new Date(a.updated_at.replace(" ","T")).toLocaleString("de-DE")]}),o&&e.jsx("p",{className:"mt-3 text-sm text-red-600",children:o}),g&&e.jsx("p",{className:"mt-3 text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),e.jsx("button",{type:"button",onClick:p,disabled:c,className:"mt-4 rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:c?"Speichere…":"Speichern"})]})})}export{k as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{k as N,m as v,r,j as e,n as y,l as C,o as S}from"./index-BlspSYV0.js";function P(){const{user:x,login:h,verifyTwoFactor:g}=N(),o=v(),[f,u]=r.useState("credentials"),[i,p]=r.useState(""),[c,w]=r.useState(""),[m,b]=r.useState(""),[s,a]=r.useState(""),[n,l]=r.useState(!1);if(x)return e.jsx(y,{to:"/admin",replace:!0});const k=async t=>{t.preventDefault(),l(!0),a("");try{(await h(i,c)).requires2fa?u("code"):o("/admin")}catch(d){a(d.message)}finally{l(!1)}},j=async t=>{t.preventDefault(),l(!0),a("");try{await g(m),o("/admin")}catch(d){a(d.message)}finally{l(!1)}};return e.jsxs("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-neutral-50 px-4 dark:bg-neutral-950",children:[e.jsx("img",{src:C,alt:"HifiPlanet",className:"h-16 w-auto dark:hidden sm:h-20"}),e.jsx("img",{src:S,alt:"HifiPlanet",className:"hidden h-16 w-auto dark:block sm:h-20"}),f==="credentials"?e.jsxs("form",{onSubmit:k,className:"w-full max-w-sm rounded-xl border border-neutral-200 bg-white p-8 shadow-sm dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h1",{className:"mb-6 text-xl font-bold text-neutral-900 dark:text-white",children:"Admin-Login"}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Benutzername"}),e.jsx("input",{value:i,onChange:t=>p(t.target.value),required:!0,autoFocus:!0,className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm focus:border-brand-500 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Passwort"}),e.jsx("input",{type:"password",value:c,onChange:t=>w(t.target.value),required:!0,className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm focus:border-brand-500 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900"})]}),s&&e.jsx("p",{className:"mb-4 text-sm text-red-600",children:s}),e.jsx("button",{type:"submit",disabled:n,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:n?"Anmelden…":"Anmelden"})]}):e.jsxs("form",{onSubmit:j,className:"w-full max-w-sm rounded-xl border border-neutral-200 bg-white p-8 shadow-sm dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Bestätigungscode"}),e.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Öffne die Google Authenticator App und gib den 6-stelligen Code ein. Alternativ kannst du auch einen deiner Wiederherstellungscodes verwenden."}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Code"}),e.jsx("input",{value:m,onChange:t=>b(t.target.value),required:!0,autoFocus:!0,inputMode:"numeric",placeholder:"123456",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-center text-lg tracking-widest focus:border-brand-500 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900"})]}),s&&e.jsx("p",{className:"mb-4 text-sm text-red-600",children:s}),e.jsx("button",{type:"submit",disabled:n,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:n?"Prüfe…":"Bestätigen"}),e.jsx("button",{type:"button",onClick:()=>{u("credentials"),b(""),a("")},className:"mt-3 w-full text-sm text-neutral-500 hover:underline dark:text-neutral-400",children:"Zurück zum Login"})]})]})}export{P as default};
|
||||
import{k as N,m as v,r,j as e,n as y,l as C,o as S}from"./index-ByR_n0g5.js";function P(){const{user:x,login:h,verifyTwoFactor:g}=N(),o=v(),[f,u]=r.useState("credentials"),[i,p]=r.useState(""),[c,w]=r.useState(""),[m,b]=r.useState(""),[s,a]=r.useState(""),[n,l]=r.useState(!1);if(x)return e.jsx(y,{to:"/admin",replace:!0});const k=async t=>{t.preventDefault(),l(!0),a("");try{(await h(i,c)).requires2fa?u("code"):o("/admin")}catch(d){a(d.message)}finally{l(!1)}},j=async t=>{t.preventDefault(),l(!0),a("");try{await g(m),o("/admin")}catch(d){a(d.message)}finally{l(!1)}};return e.jsxs("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-neutral-50 px-4 dark:bg-neutral-950",children:[e.jsx("img",{src:C,alt:"HifiPlanet",className:"h-16 w-auto dark:hidden sm:h-20"}),e.jsx("img",{src:S,alt:"HifiPlanet",className:"hidden h-16 w-auto dark:block sm:h-20"}),f==="credentials"?e.jsxs("form",{onSubmit:k,className:"w-full max-w-sm rounded-xl border border-neutral-200 bg-white p-8 shadow-sm dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h1",{className:"mb-6 text-xl font-bold text-neutral-900 dark:text-white",children:"Admin-Login"}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Benutzername"}),e.jsx("input",{value:i,onChange:t=>p(t.target.value),required:!0,autoFocus:!0,className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm focus:border-brand-500 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Passwort"}),e.jsx("input",{type:"password",value:c,onChange:t=>w(t.target.value),required:!0,className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm focus:border-brand-500 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900"})]}),s&&e.jsx("p",{className:"mb-4 text-sm text-red-600",children:s}),e.jsx("button",{type:"submit",disabled:n,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:n?"Anmelden…":"Anmelden"})]}):e.jsxs("form",{onSubmit:j,className:"w-full max-w-sm rounded-xl border border-neutral-200 bg-white p-8 shadow-sm dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Bestätigungscode"}),e.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Öffne die Google Authenticator App und gib den 6-stelligen Code ein. Alternativ kannst du auch einen deiner Wiederherstellungscodes verwenden."}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Code"}),e.jsx("input",{value:m,onChange:t=>b(t.target.value),required:!0,autoFocus:!0,inputMode:"numeric",placeholder:"123456",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-center text-lg tracking-widest focus:border-brand-500 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900"})]}),s&&e.jsx("p",{className:"mb-4 text-sm text-red-600",children:s}),e.jsx("button",{type:"submit",disabled:n,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:n?"Prüfe…":"Bestätigen"}),e.jsx("button",{type:"button",onClick:()=>{u("credentials"),b(""),a("")},className:"mt-3 w-full text-sm text-neutral-500 hover:underline dark:text-neutral-400",children:"Zurück zum Login"})]})]})}export{P as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{r as s,c as o,j as a}from"./index-BlspSYV0.js";const v={global:{enabled:!1,message:""},services:{enabled:!1,message:""},vehicles:{enabled:!1,message:""}};function N(){const[l,n]=s.useState(v),[g,h]=s.useState(!0),[i,d]=s.useState(!1),[x,r]=s.useState(!1),[c,u]=s.useState("");s.useEffect(()=>{o.get("/maintenance").then(e=>{n({global:{enabled:e.global.enabled,message:e.global.message||""},services:{enabled:e.services.enabled,message:e.services.message||""},vehicles:{enabled:e.vehicles.enabled,message:e.vehicles.message||""}})}).finally(()=>h(!1))},[]);const m=(e,t,k)=>{n(b=>({...b,[e]:{...b[e],[t]:k}})),r(!1)},p=async e=>{e.preventDefault(),d(!0),u(""),r(!1);try{const t=await o.post("/maintenance",l);n({global:{enabled:t.global.enabled,message:t.global.message||""},services:{enabled:t.services.enabled,message:t.services.message||""},vehicles:{enabled:t.vehicles.enabled,message:t.vehicles.message||""}}),r(!0)}catch(t){u(t.message)}finally{d(!1)}},f=[{key:"global",title:"Gesamte Seite",hint:"Besucher sehen nur noch eine Wartungsmeldung – egal welche Seite sie aufrufen. Das Admin-Panel bleibt für dich erreichbar."},{key:"services",title:"Nur Leistungen",hint:"Nur die Leistungen-Seite zeigt eine Wartungsmeldung, der Rest der Website funktioniert normal."},{key:"vehicles",title:"Nur Fahrzeugkatalog",hint:"Nur die Fahrzeugauswahl (Marke → Modell → Pakete) zeigt eine Wartungsmeldung, der Rest der Website funktioniert normal."}];return g?a.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}):a.jsxs("form",{onSubmit:p,className:"max-w-2xl space-y-6",children:[a.jsx("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:'Ist "Gesamte Seite" aktiv, gewinnt das immer – die beiden anderen Schalter spielen dann keine Rolle mehr.'}),f.map(e=>a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsxs("div",{className:"mb-1 flex items-center justify-between gap-3",children:[a.jsx("h2",{className:"font-semibold text-neutral-900 dark:text-white",children:e.title}),a.jsxs("label",{className:"relative inline-flex cursor-pointer items-center",children:[a.jsx("input",{type:"checkbox",checked:l[e.key].enabled,onChange:t=>m(e.key,"enabled",t.target.checked),className:"peer sr-only"}),a.jsx("div",{className:"h-6 w-11 rounded-full bg-neutral-200 transition peer-checked:bg-brand-500 dark:bg-neutral-700"}),a.jsx("div",{className:"absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition peer-checked:translate-x-5"})]})]}),a.jsx("p",{className:"mb-3 text-sm text-neutral-500 dark:text-neutral-400",children:e.hint}),a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Eigene Nachricht (optional)"}),a.jsx("textarea",{rows:2,value:l[e.key].message,onChange:t=>m(e.key,"message",t.target.value),placeholder:"z. B. Wir aktualisieren gerade unser Angebot. Schau bald wieder vorbei!",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]},e.key)),c&&a.jsx("p",{className:"text-sm text-red-600",children:c}),x&&a.jsx("p",{className:"text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),a.jsx("button",{type:"submit",disabled:i,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:i?"Speichere…":"Speichern"})]})}export{N as default};
|
||||
import{r as s,c as o,j as a}from"./index-ByR_n0g5.js";const v={global:{enabled:!1,message:""},services:{enabled:!1,message:""},vehicles:{enabled:!1,message:""}};function N(){const[l,n]=s.useState(v),[g,h]=s.useState(!0),[i,d]=s.useState(!1),[x,r]=s.useState(!1),[c,u]=s.useState("");s.useEffect(()=>{o.get("/maintenance").then(e=>{n({global:{enabled:e.global.enabled,message:e.global.message||""},services:{enabled:e.services.enabled,message:e.services.message||""},vehicles:{enabled:e.vehicles.enabled,message:e.vehicles.message||""}})}).finally(()=>h(!1))},[]);const m=(e,t,k)=>{n(b=>({...b,[e]:{...b[e],[t]:k}})),r(!1)},p=async e=>{e.preventDefault(),d(!0),u(""),r(!1);try{const t=await o.post("/maintenance",l);n({global:{enabled:t.global.enabled,message:t.global.message||""},services:{enabled:t.services.enabled,message:t.services.message||""},vehicles:{enabled:t.vehicles.enabled,message:t.vehicles.message||""}}),r(!0)}catch(t){u(t.message)}finally{d(!1)}},f=[{key:"global",title:"Gesamte Seite",hint:"Besucher sehen nur noch eine Wartungsmeldung – egal welche Seite sie aufrufen. Das Admin-Panel bleibt für dich erreichbar."},{key:"services",title:"Nur Leistungen",hint:"Nur die Leistungen-Seite zeigt eine Wartungsmeldung, der Rest der Website funktioniert normal."},{key:"vehicles",title:"Nur Fahrzeugkatalog",hint:"Nur die Fahrzeugauswahl (Marke → Modell → Pakete) zeigt eine Wartungsmeldung, der Rest der Website funktioniert normal."}];return g?a.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}):a.jsxs("form",{onSubmit:p,className:"max-w-2xl space-y-6",children:[a.jsx("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:'Ist "Gesamte Seite" aktiv, gewinnt das immer – die beiden anderen Schalter spielen dann keine Rolle mehr.'}),f.map(e=>a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsxs("div",{className:"mb-1 flex items-center justify-between gap-3",children:[a.jsx("h2",{className:"font-semibold text-neutral-900 dark:text-white",children:e.title}),a.jsxs("label",{className:"relative inline-flex cursor-pointer items-center",children:[a.jsx("input",{type:"checkbox",checked:l[e.key].enabled,onChange:t=>m(e.key,"enabled",t.target.checked),className:"peer sr-only"}),a.jsx("div",{className:"h-6 w-11 rounded-full bg-neutral-200 transition peer-checked:bg-brand-500 dark:bg-neutral-700"}),a.jsx("div",{className:"absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition peer-checked:translate-x-5"})]})]}),a.jsx("p",{className:"mb-3 text-sm text-neutral-500 dark:text-neutral-400",children:e.hint}),a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Eigene Nachricht (optional)"}),a.jsx("textarea",{rows:2,value:l[e.key].message,onChange:t=>m(e.key,"message",t.target.value),placeholder:"z. B. Wir aktualisieren gerade unser Angebot. Schau bald wieder vorbei!",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]},e.key)),c&&a.jsx("p",{className:"text-sm text-red-600",children:c}),x&&a.jsx("p",{className:"text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),a.jsx("button",{type:"submit",disabled:i,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:i?"Speichere…":"Speichern"})]})}export{N as default};
|
||||
1
hifi/assets/Models-DhJaITYo.js
Normal file
1
hifi/assets/Models-DhJaITYo.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{r as n,j as e,c as i}from"./index-BlspSYV0.js";const h={name:"",description:"",permissions:[]};function w(){const[c,b]=n.useState([]),[o,g]=n.useState([]),[r,a]=n.useState(h),[l,u]=n.useState(null),[m,x]=n.useState(""),d=()=>{i.get("/permission-groups").then(b),i.get("/permissions/catalog").then(g)};n.useEffect(d,[]);const j=t=>{u(t.id),a({name:t.name,description:t.description||"",permissions:t.permissions})},p=()=>{u(null),a(h)},N=t=>{a(s=>({...s,permissions:s.permissions.includes(t)?s.permissions.filter(y=>y!==t):[...s.permissions,t]}))},k=async t=>{t.preventDefault(),x("");try{l?await i.put(`/permission-groups/${l}`,r):await i.post("/permission-groups",r),p(),d()}catch(s){x(s.message)}},f=async t=>{confirm("Diese Berechtigungsgruppe wirklich löschen? Benutzer behalten ihre sonstigen Rechte.")&&(await i.delete(`/permission-groups/${t}`),d())};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Berechtigungsgruppen"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:'Fasse mehrere Berechtigungen zu einer Gruppe zusammen (z. B. „Werkstatt"), die du dann bequem einem oder mehreren Benutzern zuweisen kannst.'}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Name"}),e.jsx("th",{className:"px-4 py-2",children:"Berechtigungen"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[c.map(t=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsxs("td",{className:"px-4 py-2",children:[e.jsx("p",{className:"font-medium text-neutral-800 dark:text-neutral-100",children:t.name}),t.description&&e.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:t.description})]}),e.jsxs("td",{className:"px-4 py-2 text-neutral-500 dark:text-neutral-400",children:[t.permissions.length," von ",o.length]}),e.jsxs("td",{className:"px-4 py-2 text-right",children:[e.jsx("button",{onClick:()=>j(t),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),e.jsx("button",{onClick:()=>f(t.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},t.id)),c.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:3,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Berechtigungsgruppen angelegt."})})]})]})})]}),e.jsxs("form",{onSubmit:k,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:l?"Gruppe bearbeiten":"Neue Gruppe"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Name *"}),e.jsx("input",{required:!0,value:r.name,onChange:t=>a({...r,name:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Beschreibung"}),e.jsx("textarea",{rows:2,value:r.description,onChange:t=>a({...r,description:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Berechtigungen"}),e.jsx("div",{className:"space-y-1.5 rounded-md border border-neutral-200 p-3 dark:border-neutral-700",children:o.map(t=>e.jsxs("label",{className:"flex items-center gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[e.jsx("input",{type:"checkbox",checked:r.permissions.includes(t.key),onChange:()=>N(t.key),className:"h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),t.label]},t.key))})]}),m&&e.jsx("p",{className:"text-sm text-red-600",children:m}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:l?"Speichern":"Anlegen"}),l&&e.jsx("button",{type:"button",onClick:p,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}export{w as default};
|
||||
import{r as n,j as e,c as i}from"./index-ByR_n0g5.js";const h={name:"",description:"",permissions:[]};function w(){const[c,b]=n.useState([]),[o,g]=n.useState([]),[r,a]=n.useState(h),[l,u]=n.useState(null),[m,x]=n.useState(""),d=()=>{i.get("/permission-groups").then(b),i.get("/permissions/catalog").then(g)};n.useEffect(d,[]);const j=t=>{u(t.id),a({name:t.name,description:t.description||"",permissions:t.permissions})},p=()=>{u(null),a(h)},N=t=>{a(s=>({...s,permissions:s.permissions.includes(t)?s.permissions.filter(y=>y!==t):[...s.permissions,t]}))},k=async t=>{t.preventDefault(),x("");try{l?await i.put(`/permission-groups/${l}`,r):await i.post("/permission-groups",r),p(),d()}catch(s){x(s.message)}},f=async t=>{confirm("Diese Berechtigungsgruppe wirklich löschen? Benutzer behalten ihre sonstigen Rechte.")&&(await i.delete(`/permission-groups/${t}`),d())};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Berechtigungsgruppen"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:'Fasse mehrere Berechtigungen zu einer Gruppe zusammen (z. B. „Werkstatt"), die du dann bequem einem oder mehreren Benutzern zuweisen kannst.'}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Name"}),e.jsx("th",{className:"px-4 py-2",children:"Berechtigungen"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[c.map(t=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsxs("td",{className:"px-4 py-2",children:[e.jsx("p",{className:"font-medium text-neutral-800 dark:text-neutral-100",children:t.name}),t.description&&e.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:t.description})]}),e.jsxs("td",{className:"px-4 py-2 text-neutral-500 dark:text-neutral-400",children:[t.permissions.length," von ",o.length]}),e.jsxs("td",{className:"px-4 py-2 text-right",children:[e.jsx("button",{onClick:()=>j(t),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),e.jsx("button",{onClick:()=>f(t.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},t.id)),c.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:3,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Berechtigungsgruppen angelegt."})})]})]})})]}),e.jsxs("form",{onSubmit:k,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:l?"Gruppe bearbeiten":"Neue Gruppe"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Name *"}),e.jsx("input",{required:!0,value:r.name,onChange:t=>a({...r,name:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Beschreibung"}),e.jsx("textarea",{rows:2,value:r.description,onChange:t=>a({...r,description:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Berechtigungen"}),e.jsx("div",{className:"space-y-1.5 rounded-md border border-neutral-200 p-3 dark:border-neutral-700",children:o.map(t=>e.jsxs("label",{className:"flex items-center gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[e.jsx("input",{type:"checkbox",checked:r.permissions.includes(t.key),onChange:()=>N(t.key),className:"h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),t.label]},t.key))})]}),m&&e.jsx("p",{className:"text-sm text-red-600",children:m}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:l?"Speichern":"Anlegen"}),l&&e.jsx("button",{type:"button",onClick:p,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}export{w as default};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
import{r as q,y as xt,j as R,am as Gu,z as Yu}from"./index-BlspSYV0.js";var Hl={exports:{}},jl={};/**
|
||||
import{r as q,B as xt,j as R,an as Gu,F as Yu}from"./index-ByR_n0g5.js";var Hl={exports:{}},jl={};/**
|
||||
* @license React
|
||||
* use-sync-external-store-shim.production.js
|
||||
*
|
||||
|
|
@ -1 +1 @@
|
|||
import{j as e}from"./index-BlspSYV0.js";function m({dirty:t,busy:i,savedAt:a,onSave:n,label:s="Speichern",form:r}){return e.jsx("div",{className:"sticky bottom-0 z-20 -mx-4 mt-6 border-t border-neutral-200 bg-white/95 px-4 py-3 backdrop-blur dark:border-neutral-800 dark:bg-neutral-950/95 sm:-mx-6 sm:px-6",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsx("p",{className:`text-sm ${t?"font-medium text-amber-600 dark:text-amber-400":"text-neutral-500 dark:text-neutral-400"}`,children:t?"● Ungespeicherte Änderungen":a?`✓ Gespeichert um ${a.toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"})} Uhr`:"Alles gespeichert"}),e.jsx("button",{type:r?"submit":"button",form:r,onClick:r?void 0:n,disabled:i||!t,className:"rounded-md bg-brand-500 px-5 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:i?"Speichere…":s})]})})}export{m as S};
|
||||
import{j as e}from"./index-ByR_n0g5.js";function m({dirty:t,busy:i,savedAt:a,onSave:n,label:s="Speichern",form:r}){return e.jsx("div",{className:"sticky bottom-0 z-20 -mx-4 mt-6 border-t border-neutral-200 bg-white/95 px-4 py-3 backdrop-blur dark:border-neutral-800 dark:bg-neutral-950/95 sm:-mx-6 sm:px-6",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsx("p",{className:`text-sm ${t?"font-medium text-amber-600 dark:text-amber-400":"text-neutral-500 dark:text-neutral-400"}`,children:t?"● Ungespeicherte Änderungen":a?`✓ Gespeichert um ${a.toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"})} Uhr`:"Alles gespeichert"}),e.jsx("button",{type:r?"submit":"button",form:r,onClick:r?void 0:n,disabled:i||!t,className:"rounded-md bg-brand-500 px-5 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:i?"Speichere…":s})]})})}export{m as S};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{B as a,j as e,r as i,O as u}from"./index-BlspSYV0.js";const d={company:["Firmendaten","Telefon, Adresse, Öffnungszeiten, Logo und der Hinweis unter den Paketpreisen."],design:["Aussehen","Titelbild, Schriften und das Aussehen der Kacheln auf der Website."],legal:["Rechtstexte","Impressum, Datenschutzerklärung und AGB."],maintenance:["Wartungsmodus","Die ganze Website oder einzelne Bereiche vorübergehend für Besucher sperren."],countdown:["Launch-Countdown","Vor dem Start nur einen Countdown zeigen, der neugierig macht. Danach öffnet sich die Website von selbst."],email:["E-Mail-Versand","Zugangsdaten des Mail-Servers und die Texte der automatischen E-Mails."],google:["Google-Dienste","Google Analytics und Google-Bewertungen anbinden. Nur für Techniker."],database:["Datenbank","Verbindung und Struktur der Datenbank. Nur für Techniker."],"export-import":["Export & Import","Sicherung herunterladen oder auf einem anderen Server einspielen."],update:["Updates","Neue Versionen der Website installieren."],reset:["Zurücksetzen","Inhalte auf den Auslieferungszustand zurücksetzen. Vorher unbedingt exportieren."]};function l(){const{pathname:t}=a(),r=t.replace(/\/$/,"").split("/").pop(),[s,n]=d[r]||["Einstellungen",""];return e.jsxs("div",{children:[e.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:s}),n&&e.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:n}),e.jsx(i.Suspense,{fallback:e.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}),children:e.jsx(u,{})})]})}export{l as default};
|
||||
import{G as a,j as e,r as i,O as u}from"./index-ByR_n0g5.js";const d={company:["Firmendaten","Telefon, Adresse, Öffnungszeiten, Logo und der Hinweis unter den Paketpreisen."],design:["Aussehen","Titelbild, Schriften und das Aussehen der Kacheln auf der Website."],legal:["Rechtstexte","Impressum, Datenschutzerklärung und AGB."],maintenance:["Wartungsmodus","Die ganze Website oder einzelne Bereiche vorübergehend für Besucher sperren."],countdown:["Launch-Countdown","Vor dem Start nur einen Countdown zeigen, der neugierig macht. Danach öffnet sich die Website von selbst."],email:["E-Mail-Versand","Zugangsdaten des Mail-Servers und die Texte der automatischen E-Mails."],google:["Google-Dienste","Google Analytics und Google-Bewertungen anbinden. Nur für Techniker."],database:["Datenbank","Verbindung und Struktur der Datenbank. Nur für Techniker."],"export-import":["Export & Import","Sicherung herunterladen oder auf einem anderen Server einspielen."],update:["Updates","Neue Versionen der Website installieren."],reset:["Zurücksetzen","Inhalte auf den Auslieferungszustand zurücksetzen. Vorher unbedingt exportieren."]};function l(){const{pathname:t}=a(),r=t.replace(/\/$/,"").split("/").pop(),[s,n]=d[r]||["Einstellungen",""];return e.jsxs("div",{children:[e.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:s}),n&&e.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:n}),e.jsx(i.Suspense,{fallback:e.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}),children:e.jsx(u,{})})]})}export{l as default};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{j as o,c as x}from"./index-BlspSYV0.js";import{u as p,a as f,D as m,c as v,S as y,r as j,v as C,b as R,s as w,K as D,T as N,P as T,d as E,C as G}from"./sortable.esm-D1g5h7xA.js";import{G as I}from"./grip-vertical-Bv_4pkjN.js";function P({items:t,onReorder:s,children:n,as:e="ul",className:d="",disabled:i=!1}){const l=p(f(T,{activationConstraint:{distance:4}}),f(N,{activationConstraint:{delay:150,tolerance:6}}),f(D,{coordinateGetter:w})),c=({active:r,over:a})=>{if(!a||r.id===a.id)return;const h=t.findIndex(b=>b.id===r.id),S=t.findIndex(b=>b.id===a.id);s(R(t,h,S))},u=e==="tbody"?"tbody":e==="grid"?"div":"ul",g=e==="tbody"?"tr":e==="grid"?"div":"li";return o.jsx(m,{sensors:l,collisionDetection:v,onDragEnd:c,children:o.jsx(y,{items:t.map(r=>r.id),strategy:e==="grid"?j:C,disabled:i,children:o.jsx(u,{className:d,children:t.map(r=>o.jsx(K,{id:r.id,tag:g,disabled:i,children:a=>n(r,a)},r.id))})})})}function K({id:t,tag:s,disabled:n,children:e}){const{attributes:d,listeners:i,setNodeRef:l,setActivatorNodeRef:c,transform:u,transition:g,isDragging:r}=E({id:t,disabled:n}),a=n?null:o.jsx("button",{type:"button",ref:c,...d,...i,title:"Ziehen, um die Reihenfolge zu ändern","aria-label":"Reihenfolge ändern",className:"cursor-grab touch-none rounded p-1 text-neutral-400 hover:bg-neutral-100 hover:text-neutral-600 active:cursor-grabbing dark:hover:bg-neutral-800",children:o.jsx(I,{className:"h-4 w-4"})});return o.jsx(s,{ref:l,style:{transform:G.Translate.toString(u),transition:g,position:"relative",zIndex:r?10:void 0},className:r?"bg-white shadow-lg ring-1 ring-brand-500 dark:bg-neutral-900":void 0,children:e(a)})}async function A(t,s){return await x.put(`/reorder/${t}`,{ids:s.map(n=>n.id)}),s.map((n,e)=>({...n,sort_order:(e+1)*10}))}export{P as S,A as s};
|
||||
import{j as o,c as x}from"./index-ByR_n0g5.js";import{u as p,a as f,D as m,c as v,S as y,r as j,v as C,b as R,s as w,K as D,T as N,P as T,d as E,C as G}from"./sortable.esm-feaRoI7N.js";import{G as I}from"./grip-vertical-B-w3JIIY.js";function P({items:t,onReorder:s,children:n,as:e="ul",className:d="",disabled:i=!1}){const l=p(f(T,{activationConstraint:{distance:4}}),f(N,{activationConstraint:{delay:150,tolerance:6}}),f(D,{coordinateGetter:w})),c=({active:r,over:a})=>{if(!a||r.id===a.id)return;const h=t.findIndex(b=>b.id===r.id),S=t.findIndex(b=>b.id===a.id);s(R(t,h,S))},u=e==="tbody"?"tbody":e==="grid"?"div":"ul",g=e==="tbody"?"tr":e==="grid"?"div":"li";return o.jsx(m,{sensors:l,collisionDetection:v,onDragEnd:c,children:o.jsx(y,{items:t.map(r=>r.id),strategy:e==="grid"?j:C,disabled:i,children:o.jsx(u,{className:d,children:t.map(r=>o.jsx(K,{id:r.id,tag:g,disabled:i,children:a=>n(r,a)},r.id))})})})}function K({id:t,tag:s,disabled:n,children:e}){const{attributes:d,listeners:i,setNodeRef:l,setActivatorNodeRef:c,transform:u,transition:g,isDragging:r}=E({id:t,disabled:n}),a=n?null:o.jsx("button",{type:"button",ref:c,...d,...i,title:"Ziehen, um die Reihenfolge zu ändern","aria-label":"Reihenfolge ändern",className:"cursor-grab touch-none rounded p-1 text-neutral-400 hover:bg-neutral-100 hover:text-neutral-600 active:cursor-grabbing dark:hover:bg-neutral-800",children:o.jsx(I,{className:"h-4 w-4"})});return o.jsx(s,{ref:l,style:{transform:G.Translate.toString(u),transition:g,position:"relative",zIndex:r?10:void 0},className:r?"bg-white shadow-lg ring-1 ring-brand-500 dark:bg-neutral-900":void 0,children:e(a)})}async function A(t,s){return await x.put(`/reorder/${t}`,{ids:s.map(n=>n.id)}),s.map((n,e)=>({...n,sort_order:(e+1)*10}))}export{P as S,A as s};
|
||||
|
|
@ -1 +1 @@
|
|||
import{z as g,r as l,c as x,j as t}from"./index-BlspSYV0.js";const y=[{label:"Standard",value:""},{label:"S (14px)",value:"14px"},{label:"M (16px)",value:"16px"},{label:"L (18px)",value:"18px"},{label:"XL (20px)",value:"20px"},{label:"XXL (24px)",value:"24px"},{label:"XXXL (28px)",value:"28px"},{label:"Groß (36px)",value:"36px"},{label:"Riesig (48px)",value:"48px"}],s={font_family:"",font_size:"",color:""};function k({fieldKey:o,previewText:p="Beispieltext",label:c="Stil"}){const b=g(),[a,n]=l.useState(s),[m,u]=l.useState(!0),[d,i]=l.useState("");l.useEffect(()=>{u(!0),x.get(`/text-styles/one?key=${encodeURIComponent(o)}`).then(e=>n({font_family:e.font_family||"",font_size:e.font_size||"",color:e.color||""})).catch(()=>n(s)).finally(()=>u(!1))},[o]);const r=async e=>{n(e),i("");try{await x.put("/text-styles",{field_key:o,...e})}catch(v){i(v.message)}};if(m)return null;const f={fontFamily:a.font_family||void 0,fontSize:a.font_size||void 0,color:a.color||void 0};return t.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-2 rounded-md border border-neutral-200 bg-neutral-50 p-2 dark:border-neutral-700 dark:bg-neutral-800/50",children:[t.jsx("span",{className:"text-xs font-medium uppercase tracking-wide text-neutral-400",children:c}),t.jsx("select",{value:a.font_family,onChange:e=>r({...a,font_family:e.target.value}),className:"rounded-md border border-neutral-300 bg-white px-2 py-1 text-xs dark:border-neutral-700 dark:bg-neutral-900",children:b.map(e=>t.jsx("option",{value:e.value,children:e.label},e.label))}),t.jsx("select",{value:a.font_size,onChange:e=>r({...a,font_size:e.target.value}),className:"rounded-md border border-neutral-300 bg-white px-2 py-1 text-xs dark:border-neutral-700 dark:bg-neutral-900",children:y.map(e=>t.jsx("option",{value:e.value,children:e.label},e.label))}),t.jsx("input",{type:"color",value:a.color||"#000000",onChange:e=>r({...a,color:e.target.value}),className:"h-7 w-9 cursor-pointer rounded border border-neutral-300 bg-white p-0.5 dark:border-neutral-700 dark:bg-neutral-900",title:"Textfarbe"}),t.jsx("button",{type:"button",onClick:()=>r(s),className:"rounded-md border border-neutral-300 px-2 py-1 text-xs text-neutral-500 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-400 dark:hover:bg-neutral-700",children:"Zurücksetzen"}),t.jsx("span",{className:"ml-1 rounded px-2 py-1 text-sm",style:f,children:p}),d&&t.jsx("span",{className:"text-xs text-red-600",children:d})]})}export{k as T};
|
||||
import{F as g,r as l,c as x,j as t}from"./index-ByR_n0g5.js";const y=[{label:"Standard",value:""},{label:"S (14px)",value:"14px"},{label:"M (16px)",value:"16px"},{label:"L (18px)",value:"18px"},{label:"XL (20px)",value:"20px"},{label:"XXL (24px)",value:"24px"},{label:"XXXL (28px)",value:"28px"},{label:"Groß (36px)",value:"36px"},{label:"Riesig (48px)",value:"48px"}],s={font_family:"",font_size:"",color:""};function k({fieldKey:o,previewText:p="Beispieltext",label:c="Stil"}){const b=g(),[a,n]=l.useState(s),[m,u]=l.useState(!0),[d,i]=l.useState("");l.useEffect(()=>{u(!0),x.get(`/text-styles/one?key=${encodeURIComponent(o)}`).then(e=>n({font_family:e.font_family||"",font_size:e.font_size||"",color:e.color||""})).catch(()=>n(s)).finally(()=>u(!1))},[o]);const r=async e=>{n(e),i("");try{await x.put("/text-styles",{field_key:o,...e})}catch(v){i(v.message)}};if(m)return null;const f={fontFamily:a.font_family||void 0,fontSize:a.font_size||void 0,color:a.color||void 0};return t.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-2 rounded-md border border-neutral-200 bg-neutral-50 p-2 dark:border-neutral-700 dark:bg-neutral-800/50",children:[t.jsx("span",{className:"text-xs font-medium uppercase tracking-wide text-neutral-400",children:c}),t.jsx("select",{value:a.font_family,onChange:e=>r({...a,font_family:e.target.value}),className:"rounded-md border border-neutral-300 bg-white px-2 py-1 text-xs dark:border-neutral-700 dark:bg-neutral-900",children:b.map(e=>t.jsx("option",{value:e.value,children:e.label},e.label))}),t.jsx("select",{value:a.font_size,onChange:e=>r({...a,font_size:e.target.value}),className:"rounded-md border border-neutral-300 bg-white px-2 py-1 text-xs dark:border-neutral-700 dark:bg-neutral-900",children:y.map(e=>t.jsx("option",{value:e.value,children:e.label},e.label))}),t.jsx("input",{type:"color",value:a.color||"#000000",onChange:e=>r({...a,color:e.target.value}),className:"h-7 w-9 cursor-pointer rounded border border-neutral-300 bg-white p-0.5 dark:border-neutral-700 dark:bg-neutral-900",title:"Textfarbe"}),t.jsx("button",{type:"button",onClick:()=>r(s),className:"rounded-md border border-neutral-300 px-2 py-1 text-xs text-neutral-500 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-400 dark:hover:bg-neutral-700",children:"Zurücksetzen"}),t.jsx("span",{className:"ml-1 rounded px-2 py-1 text-sm",style:f,children:p}),d&&t.jsx("span",{className:"text-xs text-red-600",children:d})]})}export{k as T};
|
||||
File diff suppressed because one or more lines are too long
1
hifi/assets/VehicleCatalogDialog-Db4N0Sxf.js
Normal file
1
hifi/assets/VehicleCatalogDialog-Db4N0Sxf.js
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{j as n,x as a}from"./index-BlspSYV0.js";function i({to:e,label:r="Ansehen",className:t=""}){return e?n.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",title:"Auf der Website ansehen (neuer Tab)",className:`inline-flex items-center gap-1 text-xs font-medium text-neutral-500 hover:text-brand-600 dark:text-neutral-400 ${t}`,children:[n.jsx(a,{className:"h-3.5 w-3.5"}),r]}):null}export{i as V};
|
||||
import{j as n,z as a}from"./index-ByR_n0g5.js";function i({to:e,label:r="Ansehen",className:t=""}){return e?n.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",title:"Auf der Website ansehen (neuer Tab)",className:`inline-flex items-center gap-1 text-xs font-medium text-neutral-500 hover:text-brand-600 dark:text-neutral-400 ${t}`,children:[n.jsx(a,{className:"h-3.5 w-3.5"}),r]}):null}export{i as V};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
import{I as e}from"./index-BlspSYV0.js";/**
|
||||
import{K as e}from"./index-ByR_n0g5.js";/**
|
||||
* @license lucide-react v1.23.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import{I as c}from"./index-BlspSYV0.js";/**
|
||||
import{K as c}from"./index-ByR_n0g5.js";/**
|
||||
* @license lucide-react v1.23.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import{I as e,J as L0,K as x0,M as w0,Q as f0,T as I0,U as C0,v as N0,V as b0,w as $0,W as q0,C as s,X as z0,Y as S0,x as A0,Z as H0,_ as j0,$ as V0,a0 as P0,a1 as B0,a2 as D0,a3 as F0,a4 as R0,a5 as T0,a6 as U0,a7 as O0,P as G0,a8 as Z0,a9 as W0,aa as E0,ab as X0,ac as K0,ad as Q0,ae as J0,af as Y0,ag as ea,ah as aa,ai as ca,aj as fL,ak as IL,al as CL,j as NL}from"./index-BlspSYV0.js";import{D as ta,a as oa,b as da,c as l,F as na,L as ha,M as ia}from"./music-Co2R5rSR.js";import{a as ya,E as ra}from"./eye-BfYwiu9A.js";import{G as ka}from"./grip-vertical-Bv_4pkjN.js";import{R as pa,T as sa}from"./trash-2-BGP0wMN7.js";/**
|
||||
import{K as e,M as L0,Q as x0,T as w0,U as f0,V as I0,W as C0,C as N0,Y as b0,w as $0,Z as q0,y as s,_ as z0,$ as S0,z as A0,a0 as H0,a1 as j0,a2 as V0,a3 as P0,a4 as B0,a5 as D0,a6 as F0,a7 as R0,a8 as T0,a9 as U0,aa as O0,P as G0,ab as Z0,ac as W0,v as E0,ad as X0,ae as K0,af as Q0,ag as J0,ah as Y0,ai as ea,X as aa,aj as ca,ak as fL,al as IL,am as CL,j as NL}from"./index-ByR_n0g5.js";import{D as ta,a as oa,b as da,c as l,F as na,L as ha,M as ia}from"./music-CzZVX9lt.js";import{a as ya,E as ra}from"./eye-BhaTX13E.js";import{G as ka}from"./grip-vertical-B-w3JIIY.js";import{R as pa,T as sa}from"./trash-2-CQUo9mrD.js";/**
|
||||
* @license lucide-react v1.23.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
hifi/assets/index-UdfsXj4H.css
Normal file
1
hifi/assets/index-UdfsXj4H.css
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
import{I as a}from"./index-BlspSYV0.js";/**
|
||||
import{K as a}from"./index-ByR_n0g5.js";/**
|
||||
* @license lucide-react v1.23.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import{r as c,y as P,h as Oe}from"./index-BlspSYV0.js";function Rn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const et=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function me(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function pt(e){return"nodeType"in e}function B(e){var t,n;return e?me(e)?e:pt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function bt(e){const{Document:t}=B(e);return e instanceof t}function Be(e){return me(e)?!1:e instanceof B(e).HTMLElement}function Ut(e){return e instanceof B(e).SVGElement}function ye(e){return e?me(e)?e.document:pt(e)?bt(e)?e:Be(e)||Ut(e)?e.ownerDocument:document:document:document}const Q=et?c.useLayoutEffect:c.useEffect;function wt(e){const t=c.useRef(e);return Q(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Sn(){const e=c.useRef(null),t=c.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ke(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function Fe(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Ge(e){const t=wt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function dt(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let at={};function $e(e,t){return c.useMemo(()=>{if(t)return t;const n=at[e]==null?0:at[e]+1;return at[e]=n,e+"-"+n},[e,t])}function Wt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,s)=>{const a=Object.entries(s);for(const[l,u]of a){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const we=Wt(1),ze=Wt(-1);function En(e){return"clientX"in e&&"clientY"in e}function mt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function Mn(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function ft(e){if(Mn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return En(e)?{x:e.clientX,y:e.clientY}:null}const Je=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Je.Translate.toString(e),Je.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Ot="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function In(e){return e.matches(Ot)?e:e.querySelector(Ot)}const An={display:"none"};function On(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:An},n)}function Tn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return P.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Nn(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Ht=c.createContext(null);function Ln(e){const t=c.useContext(Ht);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function kn(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const zn={draggable:`
|
||||
import{r as c,B as P,h as Oe}from"./index-ByR_n0g5.js";function Rn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const et=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function me(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function pt(e){return"nodeType"in e}function B(e){var t,n;return e?me(e)?e:pt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function bt(e){const{Document:t}=B(e);return e instanceof t}function Be(e){return me(e)?!1:e instanceof B(e).HTMLElement}function Ut(e){return e instanceof B(e).SVGElement}function ye(e){return e?me(e)?e.document:pt(e)?bt(e)?e:Be(e)||Ut(e)?e.ownerDocument:document:document:document}const Q=et?c.useLayoutEffect:c.useEffect;function wt(e){const t=c.useRef(e);return Q(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Sn(){const e=c.useRef(null),t=c.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ke(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function Fe(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Ge(e){const t=wt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function dt(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let at={};function $e(e,t){return c.useMemo(()=>{if(t)return t;const n=at[e]==null?0:at[e]+1;return at[e]=n,e+"-"+n},[e,t])}function Wt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,s)=>{const a=Object.entries(s);for(const[l,u]of a){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const we=Wt(1),ze=Wt(-1);function En(e){return"clientX"in e&&"clientY"in e}function mt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function Mn(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function ft(e){if(Mn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return En(e)?{x:e.clientX,y:e.clientY}:null}const Je=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Je.Translate.toString(e),Je.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Ot="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function In(e){return e.matches(Ot)?e:e.querySelector(Ot)}const An={display:"none"};function On(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:An},n)}function Tn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return P.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Nn(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Ht=c.createContext(null);function Ln(e){const t=c.useContext(Ht);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function kn(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const zn={draggable:`
|
||||
To pick up a draggable item, press the space bar.
|
||||
While dragging, use the arrow keys to move the item.
|
||||
Press space again to drop the item in its new position, or press escape to cancel.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import{I as a}from"./index-BlspSYV0.js";/**
|
||||
import{K as a}from"./index-ByR_n0g5.js";/**
|
||||
* @license lucide-react v1.23.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
|
|
@ -49,8 +49,8 @@
|
|||
"sameAs": ["https://www.youtube.com/@hifiplanet2812"]
|
||||
}
|
||||
</script>
|
||||
<script type="module" crossorigin src="/assets/index-BlspSYV0.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DV1Bga93.css">
|
||||
<script type="module" crossorigin src="/assets/index-ByR_n0g5.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-UdfsXj4H.css">
|
||||
</head>
|
||||
<body class="bg-white text-slate-900 dark:bg-slate-950 dark:text-slate-100">
|
||||
<div id="root"></div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue