Über-Karte in der Administration, docker-publish entfernt
Some checks are pending
CI / PHP Lint (push) Waiting to run
CI / PHP Lint-1 (push) Waiting to run
CI / Unit Tests & Static Analysis (push) Waiting to run
CI / PHP Lint (pull_request) Successful in 35s
CI / PHP Lint-1 (pull_request) Successful in 46s
CI / Unit Tests & Static Analysis (pull_request) Successful in 37s
Some checks are pending
CI / PHP Lint (push) Waiting to run
CI / PHP Lint-1 (push) Waiting to run
CI / Unit Tests & Static Analysis (push) Waiting to run
CI / PHP Lint (pull_request) Successful in 35s
CI / PHP Lint-1 (pull_request) Successful in 46s
CI / Unit Tests & Static Analysis (pull_request) Successful in 37s
Die Lizenzhinweise standen bisher nur in den Dateien. Unter Integration & Wartung gibt es jetzt eine Karte "Über diese Installation" mit Version, PHP-Version, Lizenz, Entwickler und Quellcode sowie einer Tabelle der mitgelieferten Komponenten Dritter, die direkt auf die ausgelieferten Lizenztexte verlinkt. Die Liste kommt aus Ui::thirdParty(), damit Oberfläche und THIRD-PARTY-NOTICES.md nicht auseinanderlaufen; drei Tests prüfen, dass jede gelistete Komponente ihren Lizenztext wirklich mitliefert, in den Notices auftaucht und LICENSE vorhanden ist. Außerdem: - docker-publish.yml entfernt – der Workflow veröffentlichte nach ghcr.io und stammte noch aus der GitHub-Zeit - Readme: der Actions-Runner läuft jetzt, entsprechende Hinweise angepasst; Test-Badge durch das echte CI-Badge der Forgejo-Instanz ersetzt Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
9b43eee9e6
commit
f5081a4b11
8 changed files with 196 additions and 47 deletions
39
.github/workflows/docker-publish.yml
vendored
39
.github/workflows/docker-publish.yml
vendored
|
|
@ -1,39 +0,0 @@
|
|||
name: Docker Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: [ "v*" ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-push:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository }}
|
||||
tags: |
|
||||
type=ref,event=tag
|
||||
type=raw,value=latest
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
22
Readme.md
22
Readme.md
|
|
@ -11,7 +11,7 @@ Entwickelt von **[Loheide.eu](https://loheide.eu)**
|
|||

|
||||

|
||||

|
||||

|
||||
[](https://git.loheide.cloud/friloo/Unifi-Voucher-Tool/actions)
|
||||
[](https://git.loheide.cloud/friloo/Unifi-Voucher-Tool)
|
||||
|
||||
</div>
|
||||
|
|
@ -660,9 +660,10 @@ entsteht daraus ein reguläres Release mit derselben Mechanik.
|
|||
> `updater/storage/` nicht überschreiben – oder gleich den eingebauten Updater
|
||||
> verwenden, der genau diese Pfade schützt.
|
||||
|
||||
Voraussetzung ist ein registrierter **Forgejo-Actions-Runner**; ohne Runner
|
||||
bleiben die Workflows in der Warteschlange stehen. Compose-Datei und Anleitung
|
||||
dafür liegen in [`tools/runner/`](tools/runner/README.md).
|
||||
Gebaut wird das von einem **Forgejo-Actions-Runner**, der auf dem Server läuft.
|
||||
Compose-Datei und Einrichtungsanleitung liegen in
|
||||
[`tools/runner/`](tools/runner/README.md) – nötig für eine Neuinstallation oder
|
||||
wenn der Runner ersetzt wird.
|
||||
|
||||
### Mitwirken
|
||||
|
||||
|
|
@ -676,10 +677,10 @@ tea issues ls # offene Tickets ansehen
|
|||
```
|
||||
|
||||
> Die Workflows unter `.github/workflows/` werden von Forgejo Actions
|
||||
> mitgelesen; das Badge oben ist bewusst statisch, solange kein Runner
|
||||
> registriert ist. `docker-publish.yml` veröffentlicht nach `ghcr.io` und
|
||||
> stammt noch aus der GitHub-Zeit – für den Forgejo-Betrieb entweder auf die
|
||||
> eigene Registry umstellen oder entfernen.
|
||||
> mitgelesen – geblieben sind `ci.yml` (Lint, Tests, statische Analyse) und
|
||||
> `release.yml` (Release-ZIP). Das frühere `docker-publish.yml` veröffentlichte
|
||||
> nach `ghcr.io` und stammte noch aus der GitHub-Zeit; es ist entfernt. Das
|
||||
> Image wird stattdessen lokal gebaut (siehe Abschnitt **Docker**).
|
||||
|
||||
Der **Auto-Updater** ist davon unabhängig: er zieht seine Pakete über
|
||||
`update.loheide.eu` (Channels `stable` und `development`) und nicht direkt aus
|
||||
|
|
@ -711,6 +712,11 @@ Lizenztexte liegen jeweils im zugehörigen Ordner unter `assets/vendor/`:
|
|||
Teil jedes Release-ZIPs – wer die Anwendung weitergibt, gibt die Hinweise also
|
||||
automatisch mit.
|
||||
|
||||
Dieselbe Übersicht steht in der laufenden Installation unter
|
||||
**Administration → Integration & Wartung → Über diese Installation**, dort
|
||||
zusammen mit Version und PHP-Version und mit Links auf die ausgelieferten
|
||||
Lizenztexte.
|
||||
|
||||
---
|
||||
|
||||
## 🗺️ Roadmap
|
||||
|
|
|
|||
|
|
@ -203,6 +203,64 @@ $adminBase = '';
|
|||
<button class="btn btn-primary" type="submit" name="save"><?= __('btn_save') ?></button>
|
||||
</form>
|
||||
|
||||
<div class="card about-card">
|
||||
<h2><?= __('about_title') ?></h2>
|
||||
<p class="muted"><?= __('about_hint') ?></p>
|
||||
|
||||
<dl class="about-list">
|
||||
<dt><?= __('about_app') ?></dt>
|
||||
<dd>UniFi Voucher Management System</dd>
|
||||
|
||||
<dt><?= __('about_version') ?></dt>
|
||||
<dd><?= Ui::version() !== '' ? htmlspecialchars(Ui::version()) : '–' ?></dd>
|
||||
|
||||
<dt><?= __('about_php') ?></dt>
|
||||
<dd><?= htmlspecialchars(PHP_VERSION) ?></dd>
|
||||
|
||||
<dt><?= __('about_license') ?></dt>
|
||||
<dd><?= Ui::LICENSE ?> –
|
||||
<a href="<?= Ui::LICENSE_URL ?>" target="_blank" rel="noopener"><?= __('about_license_view') ?></a>
|
||||
</dd>
|
||||
|
||||
<dt><?= __('about_developer') ?></dt>
|
||||
<dd><a href="<?= Ui::CREDIT_URL ?>" target="_blank" rel="noopener"><?= Ui::CREDIT_NAME ?></a></dd>
|
||||
|
||||
<dt><?= __('about_repository') ?></dt>
|
||||
<dd><a href="<?= Ui::REPOSITORY_URL ?>" target="_blank" rel="noopener">git.loheide.cloud</a></dd>
|
||||
</dl>
|
||||
|
||||
<h3><?= __('about_third_party') ?></h3>
|
||||
<p class="muted"><?= __('about_third_party_hint') ?></p>
|
||||
<div class="table-container">
|
||||
<table class="table table-stack">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= __('about_component') ?></th>
|
||||
<th><?= __('about_version') ?></th>
|
||||
<th><?= __('about_license') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach (Ui::thirdParty() as $component): ?>
|
||||
<tr>
|
||||
<td data-label="<?= __('about_component') ?>">
|
||||
<a href="<?= htmlspecialchars($component['url']) ?>" target="_blank" rel="noopener">
|
||||
<?= htmlspecialchars($component['name']) ?>
|
||||
</a>
|
||||
</td>
|
||||
<td data-label="<?= __('about_version') ?>"><?= htmlspecialchars($component['version']) ?></td>
|
||||
<td data-label="<?= __('about_license') ?>">
|
||||
<a href="<?= htmlspecialchars('../' . $component['license_file']) ?>" target="_blank" rel="noopener">
|
||||
<?= htmlspecialchars($component['license']) ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
<script src="../assets/global.js"></script>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -1445,6 +1445,35 @@ input.search-bar, .site-selector .search-bar { min-width: 240px; width: auto; fl
|
|||
.badge-secondary { background: var(--bg-hover); color: var(--text-secondary); border-color: var(--border-color); }
|
||||
.placeholder-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
|
||||
|
||||
/* Ueber-Karte: Kennwerte als zweispaltige Liste, auf schmalen Geraeten untereinander. */
|
||||
.about-card h3 {
|
||||
margin: 26px 0 4px;
|
||||
font-size: 15px;
|
||||
font-weight: 650;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
.about-list {
|
||||
display: grid;
|
||||
grid-template-columns: max-content 1fr;
|
||||
gap: 8px 22px;
|
||||
margin: 16px 0 0;
|
||||
}
|
||||
.about-list dt {
|
||||
color: var(--text-muted);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.about-list dd {
|
||||
margin: 0;
|
||||
color: var(--text-primary);
|
||||
font-size: 13.5px;
|
||||
}
|
||||
.about-card .table-container { margin-top: 12px; }
|
||||
@media (max-width: 560px) {
|
||||
.about-list { grid-template-columns: 1fr; gap: 2px; }
|
||||
.about-list dd { margin-bottom: 10px; }
|
||||
}
|
||||
|
||||
/* Einstellungen: Tabs */
|
||||
.tab-container {
|
||||
background: var(--bg-card);
|
||||
|
|
|
|||
|
|
@ -230,6 +230,35 @@ class Ui
|
|||
. self::CREDIT_NAME . '</a></p>';
|
||||
}
|
||||
|
||||
/** Lizenz der Anwendung selbst (siehe LICENSE im Wurzelverzeichnis). */
|
||||
public const LICENSE = 'MIT';
|
||||
public const REPOSITORY_URL = 'https://git.loheide.cloud/friloo/Unifi-Voucher-Tool';
|
||||
public const LICENSE_URL = self::REPOSITORY_URL . '/src/branch/main/LICENSE';
|
||||
|
||||
/**
|
||||
* Mitgelieferte Komponenten Dritter – dieselbe Liste wie in
|
||||
* THIRD-PARTY-NOTICES.md, nur maschinenlesbar fuer die Uebersicht in der
|
||||
* Administration. 'license_file' zeigt auf den ausgelieferten Lizenztext;
|
||||
* ein Test stellt sicher, dass die Dateien wirklich vorhanden sind.
|
||||
*
|
||||
* @return array<int, array{name: string, version: string, license: string, license_file: string, url: string}>
|
||||
*/
|
||||
public static function thirdParty(): array
|
||||
{
|
||||
return [
|
||||
['name' => 'Inter', 'version' => '4.0', 'license' => 'SIL OFL 1.1',
|
||||
'license_file' => 'assets/vendor/inter/LICENSE.txt', 'url' => 'https://github.com/rsms/inter'],
|
||||
['name' => 'Font Awesome Free', 'version' => '6.4.0', 'license' => 'CC BY 4.0 / SIL OFL 1.1 / MIT',
|
||||
'license_file' => 'assets/vendor/fontawesome/LICENSE.txt', 'url' => 'https://fontawesome.com'],
|
||||
['name' => 'Chart.js', 'version' => '4.4.0', 'license' => 'MIT',
|
||||
'license_file' => 'assets/vendor/chartjs/LICENSE.txt', 'url' => 'https://www.chartjs.org'],
|
||||
['name' => 'qrcodejs', 'version' => '1.0.0', 'license' => 'MIT',
|
||||
'license_file' => 'assets/vendor/qrcodejs/LICENSE.txt', 'url' => 'https://github.com/davidshimjs/qrcodejs'],
|
||||
['name' => 'TinyMCE', 'version' => '6.8.3', 'license' => 'MIT',
|
||||
'license_file' => 'assets/vendor/tinymce/license.txt', 'url' => 'https://www.tiny.cloud'],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Standard-Druckvorlage (wird nur verwendet, solange keine eigene
|
||||
* Vorlage gespeichert ist). {QR_CODE} fuellt der Browser.
|
||||
|
|
|
|||
14
lang/de.php
14
lang/de.php
|
|
@ -333,6 +333,20 @@ return [
|
|||
'int_cleanup_expired' => 'Abgelaufene Voucher',
|
||||
'int_cleanup_audit' => 'Audit-Log',
|
||||
'int_cleanup_logins' => 'Login-Versuche',
|
||||
|
||||
// Ueber-Karte (Integration & Wartung)
|
||||
'about_title' => 'Über diese Installation',
|
||||
'about_hint' => 'Version, Lizenz und die mitgelieferten Komponenten Dritter.',
|
||||
'about_app' => 'Anwendung',
|
||||
'about_version' => 'Version',
|
||||
'about_php' => 'PHP-Version',
|
||||
'about_license' => 'Lizenz',
|
||||
'about_license_view' => 'Lizenztext ansehen',
|
||||
'about_developer' => 'Entwickelt von',
|
||||
'about_repository' => 'Quellcode',
|
||||
'about_third_party' => 'Komponenten Dritter',
|
||||
'about_third_party_hint' => 'Diese Bibliotheken werden lokal ausgeliefert und behalten ihre eigene Lizenz. Die vollständigen Texte liegen unter assets/vendor/, eine Übersicht in THIRD-PARTY-NOTICES.md.',
|
||||
'about_component' => 'Komponente',
|
||||
'int_saved' => 'Einstellungen gespeichert.',
|
||||
'int_webhook_sent' => 'Test-Webhook gesendet.',
|
||||
'int_webhook_failed' => 'Test-Webhook fehlgeschlagen.',
|
||||
|
|
|
|||
14
lang/en.php
14
lang/en.php
|
|
@ -333,6 +333,20 @@ return [
|
|||
'int_cleanup_expired' => 'Expired vouchers',
|
||||
'int_cleanup_audit' => 'Audit log',
|
||||
'int_cleanup_logins' => 'Login attempts',
|
||||
|
||||
// Ueber-Karte (Integration & Wartung)
|
||||
'about_title' => 'About this installation',
|
||||
'about_hint' => 'Version, license and the bundled third-party components.',
|
||||
'about_app' => 'Application',
|
||||
'about_version' => 'Version',
|
||||
'about_php' => 'PHP version',
|
||||
'about_license' => 'License',
|
||||
'about_license_view' => 'View license text',
|
||||
'about_developer' => 'Developed by',
|
||||
'about_repository' => 'Source code',
|
||||
'about_third_party' => 'Third-party components',
|
||||
'about_third_party_hint' => 'These libraries are served locally and keep their own license. The full texts are in assets/vendor/, an overview is in THIRD-PARTY-NOTICES.md.',
|
||||
'about_component' => 'Component',
|
||||
'int_saved' => 'Settings saved.',
|
||||
'int_webhook_sent' => 'Test webhook sent.',
|
||||
'int_webhook_failed' => 'Test webhook failed.',
|
||||
|
|
|
|||
|
|
@ -90,4 +90,42 @@ class UiTest extends TestCase
|
|||
{
|
||||
$this->assertSame('../uploads/logo.png', \Ui::mediaUrl('uploads/logo.png', '../'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Die Uebersicht in der Administration und THIRD-PARTY-NOTICES.md duerfen
|
||||
* nicht auseinanderlaufen: jede gelistete Komponente muss ihren
|
||||
* Lizenztext wirklich mitliefern.
|
||||
*/
|
||||
public function testEveryThirdPartyComponentShipsItsLicence(): void
|
||||
{
|
||||
$root = dirname(__DIR__);
|
||||
|
||||
foreach (\Ui::thirdParty() as $component) {
|
||||
$this->assertFileExists(
|
||||
$root . '/' . $component['license_file'],
|
||||
'Lizenztext fehlt fuer ' . $component['name']
|
||||
);
|
||||
$this->assertNotSame('', trim($component['license']), 'Lizenz fehlt fuer ' . $component['name']);
|
||||
$this->assertNotSame('', trim($component['version']), 'Version fehlt fuer ' . $component['name']);
|
||||
}
|
||||
}
|
||||
|
||||
public function testThirdPartyComponentsAreListedInTheNotices(): void
|
||||
{
|
||||
$notices = (string)file_get_contents(dirname(__DIR__) . '/THIRD-PARTY-NOTICES.md');
|
||||
|
||||
foreach (\Ui::thirdParty() as $component) {
|
||||
$this->assertStringContainsString(
|
||||
$component['name'],
|
||||
$notices,
|
||||
$component['name'] . ' fehlt in THIRD-PARTY-NOTICES.md'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function testProjectLicenceFileExists(): void
|
||||
{
|
||||
$this->assertFileExists(dirname(__DIR__) . '/LICENSE');
|
||||
$this->assertStringContainsString('MIT License', (string)file_get_contents(dirname(__DIR__) . '/LICENSE'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue