diff --git a/package.json b/package.json index 7635ee9..0138bf3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "sociowire-frontend", "private": true, - "version": "0.0.90", + "version": "0.0.91", "type": "module", "scripts": { "dev": "vite --host 0.0.0.0", diff --git a/src/components/Live/Live.css b/src/components/Live/Live.css index 09459f5..eec1889 100644 --- a/src/components/Live/Live.css +++ b/src/components/Live/Live.css @@ -869,6 +869,34 @@ body[data-theme="light"] .sw-video-modal-subtitle { color: #64748b; } +.sw-broadcast-ready { + display: flex; + flex-direction: column; + gap: 0.5rem; + padding: 1rem; + margin-bottom: 1rem; + border-radius: 12px; + background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.1)); + border: 1px solid rgba(34, 197, 94, 0.3); +} + +.sw-broadcast-ready .sw-broadcast-title { + font-size: 1.1rem; + font-weight: 800; + color: #f8fafc; + margin: 0; +} + +.sw-broadcast-ready .sw-broadcast-stats { + flex-direction: row; + gap: 0.75rem; +} + +.sw-broadcast-ready .sw-broadcast-hint { + margin-top: 0.5rem; + color: #4ade80; +} + .sw-broadcast-category-row { display: flex; gap: 0.75rem; diff --git a/src/components/Live/LiveKitBroadcast.jsx b/src/components/Live/LiveKitBroadcast.jsx index e7ab3e1..6167744 100644 --- a/src/components/Live/LiveKitBroadcast.jsx +++ b/src/components/Live/LiveKitBroadcast.jsx @@ -13,17 +13,20 @@ const LIVEKIT_API = "https://stream.sociowire.com"; * LiveKit-based broadcast component * Professional video streaming that works everywhere (5G, 4G, WiFi, firewalls) */ -export default function LiveKitBroadcast({ coords, onClose, onStreamCreated }) { +export default function LiveKitBroadcast({ coords, onClose, onStreamCreated, initialTitle, initialCategory, initialSubCategory }) { const { username, token: authToken } = useAuth(); const userID = username || `anon_${Date.now()}`; const [roomName] = useState(() => `live_${userID}_${Date.now()}`); - const [title, setTitle] = useState(""); + const [title, setTitle] = useState(initialTitle || ""); const [showConfirm, setShowConfirm] = useState(false); const [livePostId, setLivePostId] = useState(null); const liveCategoryOptions = FILTER_MAIN_CATEGORIES.filter((c) => c !== "All"); - const [liveCategory, setLiveCategory] = useState("Events"); - const [liveSubCategory, setLiveSubCategory] = useState("Live"); + const [liveCategory, setLiveCategory] = useState(initialCategory || "Events"); + const [liveSubCategory, setLiveSubCategory] = useState(initialSubCategory || "Live"); + + // If title was provided from PostCreateModal, skip the form + const skipForm = !!(initialTitle && initialTitle.trim()); // Timer state const [liveStartTime, setLiveStartTime] = useState(null); @@ -515,7 +518,7 @@ export default function LiveKitBroadcast({ coords, onClose, onStreamCreated }) { {/* Side panel */}