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
All checks were successful
Build & Push Docker Image / build (push) Successful in 4m19s
This commit is contained in:
@@ -518,7 +518,7 @@
|
||||
"addressLabel": "Benutzeradresse",
|
||||
"addressPlaceholder": "@benutzer@andere-instanz.com",
|
||||
"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",
|
||||
"emailHint": "Eine oder mehrere E-Mail-Adressen, durch Komma getrennt",
|
||||
"messageLabel": "Nachricht (optional)",
|
||||
|
||||
@@ -518,7 +518,7 @@
|
||||
"addressLabel": "User address",
|
||||
"addressPlaceholder": "@user@other-instance.com",
|
||||
"addressHint": "Format: @username@domain of the Redlight instance",
|
||||
"emailLabel": "Or invite by email",
|
||||
"emailLabel": "Invite by email",
|
||||
"emailPlaceholder": "name@example.com, name2@example.com",
|
||||
"emailHint": "Enter one or more email addresses, separated by commas",
|
||||
"messageLabel": "Message (optional)",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
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 BrandLogo from '../components/BrandLogo';
|
||||
import api from '../services/api';
|
||||
@@ -11,6 +11,7 @@ import { useBranding } from '../contexts/BrandingContext';
|
||||
export default function GuestJoin() {
|
||||
const { uid } = useParams();
|
||||
const [searchParams] = useSearchParams();
|
||||
const navigate = useNavigate();
|
||||
const { t } = useLanguage();
|
||||
const { user } = useAuth();
|
||||
const { imprintUrl, privacyUrl } = useBranding();
|
||||
@@ -60,6 +61,17 @@ export default function GuestJoin() {
|
||||
|
||||
useEffect(() => {
|
||||
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 {
|
||||
const res = await api.get(`/rooms/${uid}/public`);
|
||||
setRoomInfo(res.data.room);
|
||||
|
||||
Reference in New Issue
Block a user