Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat(web): show upload progress on media comment cards

Richie McIlroy4b562ab6ea30
diff --git a/apps/web/app/s/[videoId]/_components/media-comment/VideoCommentCard.tsx b/apps/web/app/s/[videoId]/_components/media-comment/VideoCommentCard.tsx
index fefb93b10..e66d221f7 100644
--- a/apps/web/app/s/[videoId]/_components/media-comment/VideoCommentCard.tsx
+++ b/apps/web/app/s/[videoId]/_components/media-comment/VideoCommentCard.tsx
@@ -11,6 +11,7 @@ import {
releasePlayback,
suspendMainVideo,
} from "./media-playback-registry";
+import { UploadProgressIndicator } from "./UploadProgressIndicator";
const FilmGlyph = () => (
<svg
@@ -267,6 +268,8 @@ export const VideoCommentCard = ({
</motion.button>
)}
+ {/* Rides above poster and playback alike while the upload runs. */}
+ <UploadProgressIndicator commentId={comment.id} variant="overlay" />
{expanded && src && (
<CommentMiniPlayer
diff --git a/apps/web/app/s/[videoId]/_components/media-comment/VoiceNotePill.tsx b/apps/web/app/s/[videoId]/_components/media-comment/VoiceNotePill.tsx
index d2334f0de..7562b4a50 100644
--- a/apps/web/app/s/[videoId]/_components/media-comment/VoiceNotePill.tsx
+++ b/apps/web/app/s/[videoId]/_components/media-comment/VoiceNotePill.tsx
@@ -10,6 +10,7 @@ import {
releasePlayback,
suspendMainVideo,
} from "./media-playback-registry";
+import { UploadProgressIndicator } from "./UploadProgressIndicator";
import {
resolveWaveform,
WAVEFORM_BAR_COUNT,
@@ -203,6 +204,7 @@ export const VoiceNotePill = ({
</AnimatePresence>
</button>
<WaveformBars peaks={peaks} progressRef={progressRef} onSeek={seek} />
+ <UploadProgressIndicator commentId={comment.id} variant="inline" />
<span
ref={labelRef}
className="text-[11px] shrink-0 tabular-nums text-gray-10"