From b1250c62469280aed51aafa2767eac3d2134f70e Mon Sep 17 00:00:00 2001 From: Codex Agent Date: Tue, 13 Jan 2026 08:59:24 +0100 Subject: [PATCH] Collapse photobooth credentials --- .../js/admin/i18n/locales/de/management.json | 3 + .../js/admin/i18n/locales/en/management.json | 3 + .../js/admin/mobile/EventPhotoboothPage.tsx | 70 +++++++++++-------- 3 files changed, 47 insertions(+), 29 deletions(-) diff --git a/resources/js/admin/i18n/locales/de/management.json b/resources/js/admin/i18n/locales/de/management.json index f58126c..56f4253 100644 --- a/resources/js/admin/i18n/locales/de/management.json +++ b/resources/js/admin/i18n/locales/de/management.json @@ -1182,6 +1182,9 @@ "description": "Teile die Zugangsdaten mit der Fotospiel-Uploader-App.", "uploaderTitle": "Uploader-App (HTTP)", "uploaderDescription": "Trage URL, Benutzername und Passwort in die Fotospiel-Uploader-App ein. Antworten sind JSON (optional XML).", + "show": "Zugangsdaten anzeigen", + "hide": "Zugangsdaten verbergen", + "hidden": "Zugangsdaten verborgen. Tippe zum Anzeigen.", "host": "Host", "port": "Port", "username": "Benutzername", diff --git a/resources/js/admin/i18n/locales/en/management.json b/resources/js/admin/i18n/locales/en/management.json index dcd18b5..f483c95 100644 --- a/resources/js/admin/i18n/locales/en/management.json +++ b/resources/js/admin/i18n/locales/en/management.json @@ -895,6 +895,9 @@ "description": "Share these credentials with the Fotospiel uploader app.", "uploaderTitle": "Uploader App (HTTP)", "uploaderDescription": "Enter URL, username and password in the Fotospiel uploader app. Responses default to JSON (XML optional).", + "show": "Show credentials", + "hide": "Hide credentials", + "hidden": "Credentials are hidden. Tap to show them.", "host": "Host", "port": "Port", "username": "Username", diff --git a/resources/js/admin/mobile/EventPhotoboothPage.tsx b/resources/js/admin/mobile/EventPhotoboothPage.tsx index 8987ee5..a4c6318 100644 --- a/resources/js/admin/mobile/EventPhotoboothPage.tsx +++ b/resources/js/admin/mobile/EventPhotoboothPage.tsx @@ -41,6 +41,7 @@ export default function MobileEventPhotoboothPage() { const [connectCode, setConnectCode] = React.useState(null); const [connectExpiresAt, setConnectExpiresAt] = React.useState(null); const [connectLoading, setConnectLoading] = React.useState(false); + const [showCredentials, setShowCredentials] = React.useState(false); const back = useBackNavigation(slug ? adminPath(`/mobile/events/${slug}`) : adminPath('/mobile/events')); const locale = i18n.language?.startsWith('en') ? 'en-GB' : 'de-DE'; @@ -291,14 +292,23 @@ export default function MobileEventPhotoboothPage() { {t('photobooth.credentials.uploaderTitle', 'Uploader App (HTTP)')} - - - - - - {t('photobooth.uploader.hint', 'POST with media file or base64 "media" field; app uses these credentials.')} - - + + handleRotate()} + iconLeft={} + disabled={updating} + style={{ width: '100%', paddingHorizontal: 10, paddingVertical: 10 }} + /> + (isActive ? handleDisable() : handleEnable())} + tone={isActive ? 'ghost' : 'primary'} + iconLeft={isActive ? : } + disabled={updating} + style={{ width: '100%', paddingHorizontal: 10, paddingVertical: 10 }} + /> + {t('photobooth.connectCode.description', 'Create a 6-digit code for the uploader app.')} @@ -324,28 +334,30 @@ export default function MobileEventPhotoboothPage() { ) : null} + setShowCredentials((current) => !current)} + /> + {showCredentials ? ( + + + + + + ) : ( + + {t('photobooth.credentials.hidden', 'Credentials are hidden. Tap to show them.')} + + )} + + {t('photobooth.uploader.hint', 'POST with media file or base64 "media" field; app uses these credentials.')} + - - - handleRotate()} - iconLeft={} - disabled={updating} - style={{ width: '100%', paddingHorizontal: 10, paddingVertical: 10 }} - /> - - - (isActive ? handleDisable() : handleEnable())} - tone={isActive ? 'ghost' : 'primary'} - iconLeft={isActive ? : } - disabled={updating} - style={{ width: '100%', paddingHorizontal: 10, paddingVertical: 10 }} - /> - -