From 018f5596170af0d6842878621a694bdf1f0d8ca0 Mon Sep 17 00:00:00 2001
From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com>
Date: Mon, 4 Aug 2025 20:11:57 +0000
Subject: [PATCH] Restored to 'e087324c769fdb5e778619a362ad06f5e61119bf'
Replit-Restored-To: e087324c769fdb5e778619a362ad06f5e61119bf
---
client/index.html | 21 --
client/src/App.tsx | 2 -
client/src/components/share-modal.tsx | 171 ----------------
client/src/components/video-card.tsx | 54 +-----
client/src/components/video-grid.tsx | 20 --
client/src/components/video-modal.tsx | 5 +-
client/src/index.css | 13 --
client/src/pages/video.tsx | 268 --------------------------
replit.md | 15 --
server/bunny.ts | 9 +-
server/routes.ts | 57 ------
11 files changed, 15 insertions(+), 620 deletions(-)
delete mode 100644 client/src/components/share-modal.tsx
delete mode 100644 client/src/pages/video.tsx
diff --git a/client/index.html b/client/index.html
index c928c52..4b4d09e 100644
--- a/client/index.html
+++ b/client/index.html
@@ -3,27 +3,6 @@
- VideoStream - Video Streaming Platform
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/client/src/App.tsx b/client/src/App.tsx
index 57750f6..8a6f3b6 100644
--- a/client/src/App.tsx
+++ b/client/src/App.tsx
@@ -4,14 +4,12 @@ import { QueryClientProvider } from "@tanstack/react-query";
import { Toaster } from "@/components/ui/toaster";
import { TooltipProvider } from "@/components/ui/tooltip";
import Home from "@/pages/home";
-import VideoPage from "@/pages/video";
import NotFound from "@/pages/not-found";
function Router() {
return (
-
);
diff --git a/client/src/components/share-modal.tsx b/client/src/components/share-modal.tsx
deleted file mode 100644
index 94702a7..0000000
--- a/client/src/components/share-modal.tsx
+++ /dev/null
@@ -1,171 +0,0 @@
-import { useState } from "react";
-import { X, Copy, Facebook, Twitter, Link, Share2 } from "lucide-react";
-import { type Video } from "@shared/schema";
-import { Button } from "@/components/ui/button";
-import { Input } from "@/components/ui/input";
-import { useToast } from "@/hooks/use-toast";
-
-interface ShareModalProps {
- video: Video | null;
- isOpen: boolean;
- onClose: () => void;
-}
-
-export default function ShareModal({ video, isOpen, onClose }: ShareModalProps) {
- const [copied, setCopied] = useState(false);
- const { toast } = useToast();
-
- if (!isOpen || !video) return null;
-
- // Generate shareable URL
- const shareUrl = `${window.location.origin}/video/${video.id}`;
- const encodedUrl = encodeURIComponent(shareUrl);
- const encodedTitle = encodeURIComponent(video.title);
- const encodedDescription = encodeURIComponent(video.description || `Oglej si ta video: ${video.title}`);
-
- // Social media URLs
- const facebookUrl = `https://www.facebook.com/sharer/sharer.php?u=${encodedUrl}"e=${encodedTitle}`;
- const twitterUrl = `https://twitter.com/intent/tweet?url=${encodedUrl}&text=${encodedTitle}`;
- const whatsappUrl = `https://wa.me/?text=${encodedTitle}%20${encodedUrl}`;
-
- const copyToClipboard = async () => {
- try {
- await navigator.clipboard.writeText(shareUrl);
- setCopied(true);
- toast({
- title: "Povezava kopirana!",
- description: "Povezava do videa je bila kopirana v odložišče.",
- });
- setTimeout(() => setCopied(false), 2000);
- } catch (error) {
- toast({
- title: "Napaka",
- description: "Povezave ni bilo mogoče kopirati.",
- variant: "destructive",
- });
- }
- };
-
- const handleBackdropClick = (e: React.MouseEvent) => {
- if (e.target === e.currentTarget) {
- onClose();
- }
- };
-
- return (
-
-
-
-
-
-
-
-
Deli video
-
-
-
-

-
-
- {video.title}
-
-
- {Math.floor(video.duration / 60)}:{(video.duration % 60).toString().padStart(2, '0')} min
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
-}
\ No newline at end of file
diff --git a/client/src/components/video-card.tsx b/client/src/components/video-card.tsx
index 6a29da3..73d9866 100644
--- a/client/src/components/video-card.tsx
+++ b/client/src/components/video-card.tsx
@@ -1,11 +1,9 @@
-import { Play, Share2 } from "lucide-react";
+import { Play } from "lucide-react";
import { type Video } from "@shared/schema";
-import { Button } from "@/components/ui/button";
interface VideoCardProps {
video: Video;
onClick: (video: Video) => void;
- onShare?: (video: Video) => void;
}
function formatDuration(seconds: number): string {
@@ -41,14 +39,7 @@ function formatDate(date: Date | string): string {
return `${Math.floor(diffDays / 30)} month${Math.floor(diffDays / 30) > 1 ? 's' : ''} ago`;
}
-export default function VideoCard({ video, onClick, onShare }: VideoCardProps) {
-
- const handleShareClick = (e: React.MouseEvent) => {
- e.stopPropagation();
- if (onShare) {
- onShare(video);
- }
- };
+export default function VideoCard({ video, onClick }: VideoCardProps) {
return (
-
- {onShare && (
-
-
-
- )}
@@ -97,26 +74,13 @@ export default function VideoCard({ video, onClick, onShare }: VideoCardProps) {
>
{video.title}
-
-
-
- {formatViews(video.views)}
-
-
- {formatDate(video.createdAt)}
-
-
- {onShare && (
-
- )}
+
+
+ {formatViews(video.views)}
+
+
+ {formatDate(video.createdAt)}
+
diff --git a/client/src/components/video-grid.tsx b/client/src/components/video-grid.tsx
index 48a80e7..4d9a347 100644
--- a/client/src/components/video-grid.tsx
+++ b/client/src/components/video-grid.tsx
@@ -2,7 +2,6 @@ import { useState } from "react";
import { type Video } from "@shared/schema";
import VideoCard from "./video-card";
import VideoModal from "./video-modal";
-import ShareModal from "./share-modal";
import { Button } from "@/components/ui/button";
import { ChevronDown } from "lucide-react";
@@ -17,8 +16,6 @@ interface VideoGridProps {
export default function VideoGrid({ videos, isLoading, hasMore, onLoadMore, viewMode }: VideoGridProps) {
const [selectedVideo, setSelectedVideo] = useState