Upload via GUI (23 Dateien)

This commit is contained in:
2026-11-04 07:55:00 +00:00
parent 44d3b7308d
commit 8b64172140
7 changed files with 465 additions and 283 deletions
+12 -1
View File
@@ -1,6 +1,6 @@
// Start: Begrüßung, eigener Status, Kennzahlen, als Nächstes fällige Tickets.
import { h, clear, icon, toast, errText } from '../lib/dom.js';
import { apiCall, AVAILABILITY } from '../lib/core.js';
import { apiCall, AVAILABILITY, openWeb, compareVersions } from '../lib/core.js';
import { spinner, ticketList, showError, segmented } from '../lib/ui.js';
export async function renderHome(host, ctx) {
@@ -15,6 +15,17 @@ export async function renderHome(host, ctx) {
const stack = h('div', { class: 'stack' });
stack.append(h('div', {}, h('div', { class: 'muted' }, new Date().toLocaleDateString('de-DE', { weekday: 'long', day: 'numeric', month: 'long' })), h('div', { class: 'hello' }, `Hallo ${first || ''}`.trim())));
// Neue Version der Erweiterung: Hinweis mit Weg zum Download (die Seite „Apps“ der Weboberfläche)
try {
const { update } = await chrome.storage.local.get('update');
if (update && compareVersions(update.version, chrome.runtime.getManifest().version) > 0) {
stack.append(h('div', { class: 'card' }, h('h2', {}, `Update verfügbar: ${update.version}`),
h('div', { class: 'muted' }, 'Eine neuere Version der Erweiterung liegt bereit. Auf der Seite „Apps“ laden, entpacken und unter chrome://extensions neu laden.'),
update.notes ? h('div', { class: 'muted', style: { marginTop: '6px', whiteSpace: 'pre-wrap' } }, update.notes) : null,
h('div', { style: { marginTop: '8px' } }, h('button', { class: 'btn', onclick: () => openWeb('/staff/apps.php').catch((e) => toast(errText(e), 'err')) }, 'Download-Seite öffnen'))));
}
} catch { /* ohne Hinweis weiter */ }
if (avail) {
let current = avail.myStatus;
const holder = h('div');