AstraOS Ver. 1.51 - Letzte Aenderung Kasten im Dashboard
All checks were successful
Deploy AstraOS Panel / deploy (push) Successful in 13s
All checks were successful
Deploy AstraOS Panel / deploy (push) Successful in 13s
This commit is contained in:
parent
2d9a796ee5
commit
2164b23962
|
|
@ -36,15 +36,9 @@
|
||||||
<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 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>
|
||||||
<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">
|
||||||
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue