Files
nodeMap/docs/components/uiWidgets/VersionInfoModal.md
2025-05-28 10:17:25 +02:00

93 lines
2.8 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- /docs/components/uiWidgets/VersionInfoModal.md -->
# 🪪 VersionInfoModal.js
Das `VersionInfoModal` ist ein modales Fenster zur Anzeige von Unternehmensinformationen und der aktuellen App-Version.
Es wird meist im Footer oder als Info-Schaltfläche in der Benutzeroberfläche eingeblendet.
---
## 🔧 Pfad
```bash
/components/uiWidgets/VersionInfoModal.js
```
---
## 🎯 Zweck
Die Komponente informiert Nutzer über:
- Die **aktuelle TALAS.Map Version**
- Die **Firmenadresse und Kontaktdaten** der Littwin Systemtechnik GmbH & Co. KG
- Eine zentral platzierte Grafik mit dem TALAS-Logo
- Eine Schaltfläche zum Schließen des Modals
---
## ⚙️ Props
| Prop | Typ | Beschreibung |
| ----------------------- | ---------- | -------------------------------------------------------------- |
| `showVersionInfoModal` | `boolean` | Steuert, ob das Modal angezeigt wird |
| `closeVersionInfoModal` | `function` | Callback zum Schließen des Modals |
| `APP_VERSION` | `string` | Versionstext (z.B. `1.1.188`), meist aus `.env.local` geladen |
---
## 💡 Verhalten
- Wird `showVersionInfoModal` auf `true` gesetzt, erscheint das Modal zentriert über einem halbtransparenten Overlay
- Klick auf den Hintergrund (schwarzes Overlay) oder auf „Schließen“ führt `closeVersionInfoModal()` aus
---
## 🧩 Inhalt im Modal
```plaintext
+--------------------------+
| [Logo_TALAS.png] |
| Littwin GmbH Adresse |
| Telefon & E-Mail |
| Version: 1.1.188 |
| [Schließen] Button |
+--------------------------+
```
---
## 🎨 Gestaltung
- Modal-Layout mit Tailwind CSS (`fixed`, `z-50`, `bg-white`, `rounded`, `shadow`)
- Schaltfläche `Schließen` reagiert auf Hover mit Farbwechsel (`hover:bg-blue-700`)
- Design folgt der UI-Ästhetik von TALAS.web
---
## 🧪 Testfälle
| Bedingung | Erwartung |
| ------------------------------- | ----------------------------------------- |
| `showVersionInfoModal = true` | Modal wird angezeigt |
| Klick auf Hintergrund | Modal wird geschlossen |
| Klick auf „Schließen“-Button | Modal wird geschlossen |
| Version `APP_VERSION = 1.1.188` | Text „TALAS.Map Version 1.1.188“ sichtbar |
---
## 📦 Verknüpfte Dateien
- `.env.local` enthält z.B. `NEXT_PUBLIC_APP_VERSION=1.1.188`
- Aufruf in `Footer` oder `Layout` zur Anzeige bei Klick auf „Version“
---
## 🛠 Verbesserungsideen
- ESC-Taste als Schließen-Funktion ergänzen
- Option für dynamische Anzeige von Changelog-Link
- Automatischer Import von Version via `process.env.NEXT_PUBLIC_APP_VERSION`
---