AstraOS Ver. 1.51 - Letzte Aenderung Kasten im Dashboard
All checks were successful
Deploy AstraOS Panel / deploy (push) Successful in 13s

This commit is contained in:
elias 2026-08-30 16:27:02 +02:00
parent 2d9a796ee5
commit 2164b23962

View file

@ -36,16 +36,10 @@
<div class="grid grid-cols-1 gap-8"> <div class="grid grid-cols-1 gap-8">
<div class="glow-card opacity-0 translate-y-8 lg:col-span-2 bg-black/40 p-6 rounded-xl backdrop-blur <div class="glow-card opacity-0 translate-y-8 lg:col-span-2 bg-black/40 p-6 rounded-xl backdrop-blur
{% if maintenance_active %}border border-yellow-500/30{% else %}border border-purple-500/20{% endif %}"> {% if maintenance_active %}border border-yellow-500/30{% else %}border border-purple-500/20{% endif %}">
<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-5"> <div class="mb-5">
<div>
<h3 class="text-base font-semibold text-slate-300 uppercase tracking-wider">Schnellzugriff</h3> <h3 class="text-base font-semibold text-slate-300 uppercase tracking-wider">Schnellzugriff</h3>
<p class="text-xs text-slate-500 mt-0.5">Zuletzt verwendete Bereiche</p> <p class="text-xs text-slate-500 mt-0.5">Zuletzt verwendete Bereiche</p>
</div> </div>
<div class="text-xs text-slate-500 flex items-center gap-1.5">
<span class="w-1.5 h-1.5 rounded-full bg-green-400 inline-block"></span>
Letztes Deploy: <span class="text-slate-300 font-mono ml-1" id="last-deploy-time">wird geladen…</span>
</div>
</div>
<div class="grid grid-cols-2 sm:grid-cols-4 gap-3" id="quick-access-grid"> <div class="grid grid-cols-2 sm:grid-cols-4 gap-3" id="quick-access-grid">
<a href="/user_management" class="group flex flex-col items-center justify-center gap-2 bg-slate-900/60 hover:bg-purple-950/40 border border-slate-800 hover:border-purple-500/40 rounded-xl p-4 transition-all duration-200"> <a href="/user_management" class="group flex flex-col items-center justify-center gap-2 bg-slate-900/60 hover:bg-purple-950/40 border border-slate-800 hover:border-purple-500/40 rounded-xl p-4 transition-all duration-200">
<svg class="w-6 h-6 text-slate-400 group-hover:text-purple-400 transition" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z"/></svg> <svg class="w-6 h-6 text-slate-400 group-hover:text-purple-400 transition" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z"/></svg>
@ -67,7 +61,13 @@
</div> </div>
</div> </div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8"> <div class="glow-card opacity-0 translate-y-8 bg-black/40 rounded-xl p-6 backdrop-blur
{% if maintenance_active %}border border-yellow-500/30{% else %}border border-purple-500/20{% endif %}">
<h3 class="text-xl font-semibold mb-2 {% if maintenance_active %}text-yellow-300{% else %}text-purple-300{% endif %}">Letzte Änderung</h3>
<p class="text-base font-bold text-slate-100 truncate" id="last-commit-msg">wird geladen…</p>
<p class="text-xs text-slate-500 mt-0.5" id="last-commit-author">–</p>
<p class="text-xs text-purple-400 mt-1 font-mono" id="last-commit-time">–</p>
</div>
<div class="glow-card opacity-0 translate-y-8 bg-black/40 rounded-xl p-6 backdrop-blur <div class="glow-card opacity-0 translate-y-8 bg-black/40 rounded-xl p-6 backdrop-blur
{% if maintenance_active %}border border-yellow-500/30{% else %}border border-purple-500/20{% endif %}"> {% if maintenance_active %}border border-yellow-500/30{% else %}border border-purple-500/20{% endif %}">
<h3 class="text-xl font-semibold mb-2 {% if maintenance_active %}text-yellow-300{% else %}text-purple-300{% endif %}">Aktive Nutzer</h3> <h3 class="text-xl font-semibold mb-2 {% if maintenance_active %}text-yellow-300{% else %}text-purple-300{% endif %}">Aktive Nutzer</h3>
@ -136,21 +136,34 @@
</div> </div>
</div> </div>
<script> <script>
// Last Deploy Zeit laden // Letzte Änderung (Commit) laden
fetch('https://git.astra-os.de/api/v1/repos/MrWhiff/AstraOS-Panel/commits?limit=1&token=', {signal: AbortSignal.timeout(4000)}) fetch('https://git.astra-os.de/api/v1/repos/MrWhiff/AstraOS-Panel/commits?limit=1', {signal: AbortSignal.timeout(4000)})
.then(r => r.json()) .then(r => r.json())
.then(data => { .then(data => {
const el = document.getElementById('last-deploy-time'); const commit = data?.[0];
if (!el) return; const msgEl = document.getElementById('last-commit-msg');
const d = data?.[0]?.created; const authEl = document.getElementById('last-commit-author');
if (!d) { el.textContent = 'unbekannt'; return; } const timeEl = document.getElementById('last-commit-time');
const date = new Date(d); if (!commit || !msgEl) return;
const diff = Math.round((Date.now() - date.getTime()) / 60000); // Commit-Message (erste Zeile)
if (diff < 60) el.textContent = `vor ${diff} Min.`; msgEl.textContent = (commit.commit?.message || '–').split('\n')[0];
else if (diff < 1440) el.textContent = `vor ${Math.round(diff/60)} Std.`; // Autor
else el.textContent = date.toLocaleDateString('de-DE', {day:'2-digit', month:'short', hour:'2-digit', minute:'2-digit'}); const author = commit.commit?.author?.name || commit.author?.login || '–';
authEl.textContent = `von ${author}`;
// Relative Zeit
const d = commit.created || commit.commit?.author?.date;
if (d) {
const diff = Math.round((Date.now() - new Date(d).getTime()) / 60000);
if (diff < 60) timeEl.textContent = `vor ${diff} Min.`;
else if (diff < 1440) timeEl.textContent = `vor ${Math.round(diff/60)} Std.`;
else timeEl.textContent = new Date(d).toLocaleDateString('de-DE', {day:'2-digit', month:'short', hour:'2-digit', minute:'2-digit'});
}
}) })
.catch(() => { const el = document.getElementById('last-deploy-time'); if(el) el.textContent = 'nicht verfügbar'; }); .catch(() => {
const el = document.getElementById('last-commit-msg');
if (el) el.textContent = 'nicht verfügbar';
});
gsap.registerPlugin(ScrollTrigger); gsap.registerPlugin(ScrollTrigger);