Create shorter, more manageable video links for sharing
Update video sharing URLs to use a truncated 8-character ID derived from the original UUID, impacting client-side routing and sharing components. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 2cd2c0bc-434c-4bc9-ad3f-b99d3897a0d1 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2cd2c0bc-434c-4bc9-ad3f-b99d3897a0d1/3dnI7Tc
This commit is contained in:
parent
abf99afeb0
commit
529d81649a
@ -115,7 +115,8 @@ export default function BunnyVideoModal({ video, isOpen, onClose, onEdit, videos
|
||||
if (!video?.id) return window.location.origin;
|
||||
// Use custom domain if set, otherwise current domain
|
||||
const baseUrl = import.meta.env.VITE_SHARE_DOMAIN || window.location.origin;
|
||||
return `${baseUrl}/video/${video.id}`;
|
||||
const shortId = video.id.replace(/-/g, '').substring(0, 8);
|
||||
return `${baseUrl}/video/${shortId}`;
|
||||
};
|
||||
|
||||
const copyToClipboard = async () => {
|
||||
|
||||
@ -364,7 +364,8 @@ export default function VideoModal({ video, isOpen, onClose, enableAds = true }:
|
||||
|
||||
const getShareUrl = () => {
|
||||
if (!video?.id) return window.location.origin;
|
||||
return `${window.location.origin}?video=${video.id}`;
|
||||
const shortId = video.id.replace(/-/g, '').substring(0, 8);
|
||||
return `${window.location.origin}/video/${shortId}`;
|
||||
};
|
||||
|
||||
const handleProgressClick = (e: React.MouseEvent<HTMLDivElement>) => {
|
||||
|
||||
@ -41,7 +41,8 @@ export default function FolxStadlPage() {
|
||||
|
||||
const handleVideoClick = (video: Video) => {
|
||||
// Navigate to individual video page instead of modal
|
||||
setLocation(`/video/${video.id}`);
|
||||
const shortId = video.id.replace(/-/g, '').substring(0, 8);
|
||||
setLocation(`/video/${shortId}`);
|
||||
};
|
||||
|
||||
const handleCloseModal = () => {
|
||||
|
||||
@ -43,7 +43,8 @@ export default function GeschichteLiedPage() {
|
||||
|
||||
const handleVideoClick = (video: Video) => {
|
||||
// Navigate to individual video page instead of modal
|
||||
setLocation(`/video/${video.id}`);
|
||||
const shortId = video.id.replace(/-/g, '').substring(0, 8);
|
||||
setLocation(`/video/${shortId}`);
|
||||
};
|
||||
|
||||
const handleCloseModal = () => {
|
||||
|
||||
@ -43,7 +43,8 @@ export default function GipfelstammtischPage() {
|
||||
|
||||
const handleVideoClick = (video: Video) => {
|
||||
// Navigate to individual video page instead of modal
|
||||
setLocation(`/video/${video.id}`);
|
||||
const shortId = video.id.replace(/-/g, '').substring(0, 8);
|
||||
setLocation(`/video/${shortId}`);
|
||||
};
|
||||
|
||||
const handleCloseModal = () => {
|
||||
|
||||
@ -735,7 +735,10 @@ export default function VideoPage() {
|
||||
{recommendedVideos.slice(0, 10).map((video) => (
|
||||
<div
|
||||
key={video.id}
|
||||
onClick={() => setLocation(`/video/${video.id}`)}
|
||||
onClick={() => {
|
||||
const shortId = video.id.replace(/-/g, '').substring(0, 8);
|
||||
setLocation(`/video/${shortId}`);
|
||||
}}
|
||||
className="flex gap-3 p-2 bg-bunny-gray/30 hover:bg-bunny-gray/50 rounded-lg cursor-pointer transition-colors"
|
||||
>
|
||||
<div className="relative w-24 h-16 bg-gray-700 rounded overflow-hidden flex-shrink-0">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user