feat(frontend): Kiosk-App-Download in ProfilePage (nur Admins)
Analog zur Mobile-App-Sektion, aber auf COMPANY_ADMIN/SUPER_ADMIN beschränkt – Kiosk-Geräte werden von Admins per CLI eingerichtet, keine Endnutzer-Selbstbedienung wie bei der Employee-App. Liest kiosk-version.txt aus dem gleichen static/downloads/-Verzeichnis. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dzdm3EWeNdYFUuXFRJryA1
This commit is contained in:
1 parent
370358d117
commit
3c427dcb15
1 file changed
+34
@@ -195,6 +195,37 @@ function MobileAppSection() {
|
||||
)
|
||||
}
|
||||
|
||||
// ── Kiosk App (nur Admins – Geräte-Einrichtung, keine Endnutzer-App) ───────────
|
||||
|
||||
function KioskAppSection() {
|
||||
const [version, setVersion] = useState<string | null>(null)
|
||||
|
||||
useEffect(() => {
|
||||
fetch('/static/downloads/kiosk-version.txt')
|
||||
.then(r => (r.ok ? r.text() : Promise.reject()))
|
||||
.then(v => setVersion(v.trim()))
|
||||
.catch(() => setVersion(null))
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className='bg-white rounded-xl shadow-sm border border-gray-200 p-6'>
|
||||
<h2 className='font-semibold text-gray-700 mb-1'>
|
||||
Kiosk App (Android-Tablet){version && <span className='ml-2 text-xs font-normal text-gray-400'>v{version}</span>}
|
||||
</h2>
|
||||
<p className='text-xs text-gray-400 mb-4'>
|
||||
Stempeluhr für gemeinsam genutzte Tablets. Gerät zuerst per CLI anlegen
|
||||
(<code className='text-gray-500'>kiosk add --auth-mode bearer</code>),
|
||||
dann hier freigeben (siehe „Kiosk-Geräte"). Bearer-Token wird nur einmal
|
||||
angezeigt – in der App unter „Ersteinrichtung" eintragen.
|
||||
</p>
|
||||
<a href='/static/downloads/timemaster-kiosk.apk' download
|
||||
className='inline-block px-4 py-2 bg-indigo-600 text-white rounded-lg text-sm font-medium hover:bg-indigo-700'>
|
||||
Kiosk-APK herunterladen
|
||||
</a>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
// ── iCal-Abo ──────────────────────────────────────────────────────────────────
|
||||
|
||||
function IcalSection() {
|
||||
@@ -431,6 +462,9 @@ export function ProfilePage() {
|
||||
{/* Mobile App */}
|
||||
<MobileAppSection />
|
||||
|
||||
{/* Kiosk App (nur Admins) */}
|
||||
{(me?.role === 'COMPANY_ADMIN' || me?.role === 'SUPER_ADMIN') && <KioskAppSection />}
|
||||
|
||||
{/* Passwort ändern */}
|
||||
<div className='bg-white rounded-xl shadow-sm border border-gray-200 p-6'>
|
||||
<h2 className='font-semibold text-gray-700 mb-4'>Passwort ändern</h2>
|
||||
|
||||
Reference in new issue
Block a user