style: wrap service editor in collapsible card and make it narrower
All checks were successful
Build & Push Docker Image to Gitea Registry / build-and-push (push) Successful in 12s
All checks were successful
Build & Push Docker Image to Gitea Registry / build-and-push (push) Successful in 12s
This commit is contained in:
22
admin.html
22
admin.html
@@ -38,13 +38,7 @@
|
|||||||
<div class="admin-panel-head">
|
<div class="admin-panel-head">
|
||||||
<div>
|
<div>
|
||||||
<p class="section-kicker">Konfiguration</p>
|
<p class="section-kicker">Konfiguration</p>
|
||||||
<h2>Dienste & Kategorien</h2>
|
<h2>System-Administration</h2>
|
||||||
</div>
|
|
||||||
<div class="admin-actions compact">
|
|
||||||
<button class="ghost-button" id="checkAllButton" type="button">Status pruefen</button>
|
|
||||||
<button class="ghost-button" id="saveLocalButton" type="button">Lokal speichern</button>
|
|
||||||
<button class="ghost-button" id="resetLocalButton" type="button">Lokale Aenderungen verwerfen</button>
|
|
||||||
<button class="ghost-button" id="downloadConfigButton" type="button">JSON exportieren</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -86,10 +80,22 @@
|
|||||||
<div id="containerStatus" class="ops-list">Noch nicht geladen.</div>
|
<div id="containerStatus" class="ops-list">Noch nicht geladen.</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<section class="ops-card ops-card-wide is-collapsed" id="editorCard" style="margin-top: 14px;">
|
||||||
|
<div class="ops-card-head">
|
||||||
|
<span>Dienste & Kategorien (Konfiguration)</span>
|
||||||
|
</div>
|
||||||
|
<div class="admin-actions-bar">
|
||||||
|
<button class="ghost-button mini" id="checkAllButton" type="button">Alle Status pruefen</button>
|
||||||
|
<button class="ghost-button mini" id="saveLocalButton" type="button">Lokal speichern</button>
|
||||||
|
<button class="ghost-button mini" id="resetLocalButton" type="button">Aenderungen verwerfen</button>
|
||||||
|
<button class="ghost-button mini" id="downloadConfigButton" type="button">JSON exportieren</button>
|
||||||
|
</div>
|
||||||
<div class="admin-table" id="serviceEditor"></div>
|
<div class="admin-table" id="serviceEditor"></div>
|
||||||
</section>
|
</section>
|
||||||
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<script src="/admin.js?v=16" defer></script>
|
<script src="/admin.js?v=17" defer></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
11
admin.js
11
admin.js
@@ -718,12 +718,19 @@ function initCollapsibleCards() {
|
|||||||
const card = head.closest('.ops-card');
|
const card = head.closest('.ops-card');
|
||||||
if (!card) return;
|
if (!card) return;
|
||||||
|
|
||||||
const bodyEl = card.querySelector('.services-status-board, .ops-list');
|
const bodyEl = card.querySelector('.services-status-board, .ops-list, .admin-table');
|
||||||
const id = bodyEl ? bodyEl.id : null;
|
const id = bodyEl ? bodyEl.id : null;
|
||||||
const storageKey = id ? `ops-card-collapsed-${id}` : null;
|
const storageKey = id ? `ops-card-collapsed-${id}` : null;
|
||||||
|
|
||||||
if (storageKey) {
|
if (storageKey) {
|
||||||
const isCollapsed = localStorage.getItem(storageKey) === 'true';
|
let isCollapsed;
|
||||||
|
const stored = localStorage.getItem(storageKey);
|
||||||
|
if (stored === null) {
|
||||||
|
// Default to collapsed for the service editor, expanded for others
|
||||||
|
isCollapsed = (id === 'serviceEditor');
|
||||||
|
} else {
|
||||||
|
isCollapsed = (stored === 'true');
|
||||||
|
}
|
||||||
card.classList.toggle('is-collapsed', isCollapsed);
|
card.classList.toggle('is-collapsed', isCollapsed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user