Upload via GUI (338 Dateien)

This commit is contained in:
2026-10-25 17:47:01 +00:00
parent b38f5b34ad
commit 63561d259f
4 changed files with 57 additions and 16 deletions
+16 -13
View File
@@ -4,10 +4,9 @@ require_once __DIR__ . '/_ui.php';
$staff = require_staff_login();
$isAdmin = ($staff['role'] ?? '') === 'admin';
if ($isAdmin) app_downloads_prepare_dir(); // Ordner anlegen und Direktzugriff sperren
$apps = [];
foreach (array_keys(app_platforms()) as $key) $apps[$key] = app_download_info($key);
$visiblePlatforms = array_filter(app_platforms(), fn($k) => $k !== 'minecraft' || app_minecraft_enabled(), ARRAY_FILTER_USE_KEY);
foreach (array_keys($visiblePlatforms) as $key) $apps[$key] = app_publisher_info($key);
$serverUrl = base_url();
$pageTitle = 'Apps';
@@ -27,20 +26,21 @@ require __DIR__ . '/_header.php';
</div>
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:20px">
<?php foreach (app_platforms() as $key => $p): $a = $apps[$key]; ?>
<?php foreach ($visiblePlatforms as $key => $p): $a = $apps[$key]; $noun = $key === "minecraft" ? "Plugin" : "App"; ?>
<div class="card" style="margin:0">
<div style="font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:8px"><?= e($p['label']) ?></div>
<?php if ($a): ?>
<div style="font-size:1.3rem;font-weight:800"><?= e($p['label']) ?>-App</div>
<div style="font-size:1.3rem;font-weight:800"><?= e($p['label']) ?>-<?= $noun ?><?= !empty($a['version']) ? ' · ' . e($a['version']) : '' ?></div>
<div class="muted" style="font-size:.82rem;margin:4px 0 12px">
<?= e(app_format_size($a['size'])) ?> · Stand <?= e(ui_date($a['modified_at'])) ?>
</div>
<a class="btn" href="/staff/app_download.php?platform=<?= e($key) ?>">⬇ <?= e($p['label']) ?>-App herunterladen</a>
<a class="btn" href="/staff/app_download.php?platform=<?= e($key) ?>">⬇ <?= e($p['label']) ?>-<?= $noun ?> herunterladen</a>
<div class="muted" style="font-size:.72rem;margin-top:10px;word-break:break-all">SHA-256: <?= e($a['sha256']) ?></div>
<?php if (!empty($a['notes'])): ?><div class="muted" style="font-size:.82rem;margin-top:8px"><?= nl2br(e($a['notes'])) ?></div><?php endif; ?>
<?php else: ?>
<div class="muted">Hier ist noch keine <?= e($p['label']) ?>-App hinterlegt.<?= $isAdmin ? '' : ' Bitte einen Administrator fragen.' ?></div>
<div class="muted">Für <?= e($p['label']) ?> ist noch keine Version auf der Plugin-Website veröffentlicht.<?= $isAdmin ? '' : ' Bitte einen Administrator fragen.' ?></div>
<?php if ($isAdmin): ?>
<div style="font-size:.85rem;margin-top:8px">Datei per FTP in den Ordner <code>app_downloads/</code> legen und genau so benennen: <code><?= e($p['stored']) ?></code></div>
<div style="font-size:.85rem;margin-top:8px">Veröffentliche die Version im Administrationsbereich der Plugin-Website.</div>
<?php endif; ?>
<?php endif; ?>
@@ -52,6 +52,13 @@ require __DIR__ . '/_header.php';
<li>Falls Windows warnt („Der Computer wurde geschützt“): <em>Weitere Informationen → Trotzdem ausführen</em>.</li>
<li>App öffnen, Serveradresse eingeben und anmelden.</li>
</ol>
<?php elseif ($key === 'minecraft'): ?>
<ol style="padding-left:18px;margin:6px 0 0;line-height:1.7">
<li>Jar herunterladen und in den Ordner <code>plugins</code> deines Spigot-, Paper- oder BungeeCord-Servers legen.</li>
<li>Server einmal starten, dann <code>plugins/DeskHub-Minecraft/config.yml</code> ausfüllen: Serveradresse (oben), API-Schlüssel und Absender-E-Mail.</li>
<li>API-Schlüssel mit dem Recht „Tickets anlegen“ erzeugst du unter Verwalten → API-Schlüssel.</li>
<li>Mit <code>/deskhubmc test</code> ein Testticket anlegen. Bei einem Ausfall des Servers legt das Plugin selbst ein Ticket an.</li>
</ol>
<?php else: ?>
<ol style="padding-left:18px;margin:6px 0 0;line-height:1.7">
<li>Datei auf dem Handy herunterladen und öffnen.</li>
@@ -65,9 +72,5 @@ require __DIR__ . '/_header.php';
<?php endforeach; ?>
</div>
<?php if ($isAdmin): ?>
<p class="muted" style="font-size:.82rem;margin-top:18px">
Hinweis für Administratoren: Zum Aktualisieren einer App die neue Datei per FTP in <code>app_downloads/</code> hochladen und die alte ersetzen (Namen: <code>DeskHub-Setup.exe</code> und <code>DeskHub.apk</code>). Die Seite zeigt automatisch Größe, Datum und Prüfsumme der neuen Datei. Die Dateien sind nur für angemeldete Mitarbeiter abrufbar.
</p>
<?php endif; ?>
<?php if ($isAdmin): ?><p class="muted" style="font-size:.82rem;margin-top:18px">Neue App-Versionen veröffentlichst du in der Plugin-Website unter „DeskHub-Apps veröffentlichen“. Downloads hier bleiben auf angemeldete Mitarbeiter beschränkt.</p><?php endif; ?>
<?php require __DIR__ . '/_footer.php'; ?>