feat: improve email invitation label for clarity and add navigation on guest join
All checks were successful
Build & Push Docker Image / build (push) Successful in 4m19s

This commit is contained in:
2026-04-02 01:03:18 +02:00
parent 1690a74c19
commit e0ce354eda
3 changed files with 15 additions and 3 deletions

View File

@@ -518,7 +518,7 @@
"addressLabel": "Benutzeradresse", "addressLabel": "Benutzeradresse",
"addressPlaceholder": "@benutzer@andere-instanz.com", "addressPlaceholder": "@benutzer@andere-instanz.com",
"addressHint": "Format: @Benutzername@Domain der Redlight-Instanz", "addressHint": "Format: @Benutzername@Domain der Redlight-Instanz",
"emailLabel": "Oder per E-Mail einladen", "emailLabel": "Per E-Mail einladen",
"emailPlaceholder": "name@beispiel.de, name2@beispiel.de", "emailPlaceholder": "name@beispiel.de, name2@beispiel.de",
"emailHint": "Eine oder mehrere E-Mail-Adressen, durch Komma getrennt", "emailHint": "Eine oder mehrere E-Mail-Adressen, durch Komma getrennt",
"messageLabel": "Nachricht (optional)", "messageLabel": "Nachricht (optional)",

View File

@@ -518,7 +518,7 @@
"addressLabel": "User address", "addressLabel": "User address",
"addressPlaceholder": "@user@other-instance.com", "addressPlaceholder": "@user@other-instance.com",
"addressHint": "Format: @username@domain of the Redlight instance", "addressHint": "Format: @username@domain of the Redlight instance",
"emailLabel": "Or invite by email", "emailLabel": "Invite by email",
"emailPlaceholder": "name@example.com, name2@example.com", "emailPlaceholder": "name@example.com, name2@example.com",
"emailHint": "Enter one or more email addresses, separated by commas", "emailHint": "Enter one or more email addresses, separated by commas",
"messageLabel": "Message (optional)", "messageLabel": "Message (optional)",

View File

@@ -1,5 +1,5 @@
import { useState, useEffect, useRef } from 'react'; import { useState, useEffect, useRef } from 'react';
import { useParams, Link, useSearchParams } from 'react-router-dom'; import { useParams, Link, useSearchParams, useNavigate } from 'react-router-dom';
import { Video, User, Lock, Shield, ArrowRight, Loader2, Users, Radio, AlertCircle, FileText, Clock, X } from 'lucide-react'; import { Video, User, Lock, Shield, ArrowRight, Loader2, Users, Radio, AlertCircle, FileText, Clock, X } from 'lucide-react';
import BrandLogo from '../components/BrandLogo'; import BrandLogo from '../components/BrandLogo';
import api from '../services/api'; import api from '../services/api';
@@ -11,6 +11,7 @@ import { useBranding } from '../contexts/BrandingContext';
export default function GuestJoin() { export default function GuestJoin() {
const { uid } = useParams(); const { uid } = useParams();
const [searchParams] = useSearchParams(); const [searchParams] = useSearchParams();
const navigate = useNavigate();
const { t } = useLanguage(); const { t } = useLanguage();
const { user } = useAuth(); const { user } = useAuth();
const { imprintUrl, privacyUrl } = useBranding(); const { imprintUrl, privacyUrl } = useBranding();
@@ -60,6 +61,17 @@ export default function GuestJoin() {
useEffect(() => { useEffect(() => {
const fetchRoom = async () => { const fetchRoom = async () => {
// If logged in, check if user owns or has access to this room
if (isLoggedIn) {
try {
await api.get(`/rooms/${uid}`);
navigate(`/rooms/${uid}`, { replace: true });
return;
} catch {
// User doesn't have access — continue as guest
}
}
try { try {
const res = await api.get(`/rooms/${uid}/public`); const res = await api.get(`/rooms/${uid}/public`);
setRoomInfo(res.data.room); setRoomInfo(res.data.room);