Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions apps/desktop/src/routes/editor/ExportPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,29 @@ export function ExportPage() {
</>
)}
</Button>
<Show when={renderEstimate()}>
{(est) => {
const estimate = est();
const rawSec =
(estimate.frameRenderTimeMs * estimate.totalFrames) /
1000;
const sec = Number.isFinite(rawSec)
? Math.max(1, Math.ceil(rawSec))
: 1;
const timeStr =
sec < 60
? `~${sec}s`
: `~${Math.floor(sec / 60)}m ${sec % 60}s`;
const sizeStr = Number.isFinite(estimate.estimatedSizeMb)
? estimate.estimatedSizeMb.toFixed(1)
: "?";
return (
<p class="text-xs text-gray-10 text-center mt-0.5">
Est. size: {sizeStr} MB • Est. time: {timeStr}
</p>
);
}}
</Show>
</div>
)}
</div>
Expand Down
23 changes: 22 additions & 1 deletion apps/desktop/src/routes/recordings-overlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -374,14 +374,35 @@ export default function () {
>
<IconCapUpload class="size-4" />
</TooltipIconButton>
<div class="flex absolute inset-0 justify-center items-center">
<div class="flex flex-col absolute inset-0 justify-center items-center gap-1">
<Button
variant="white"
size="sm"
onClick={() => save.mutate()}
>
Export
</Button>
<Show when={metadata.latest}>
{(metadata) => {
const rawSec = metadata().estimatedExportTime;
const sec = Number.isFinite(rawSec)
? Math.max(1, Math.ceil(rawSec))
: 1;
const timeStr =
sec < 60
? `~${sec}s`
: `~${Math.floor(sec / 60)}m ${sec % 60}s`;
const sizeVal = metadata().size;
const sizeStr = Number.isFinite(sizeVal)
? sizeVal.toFixed(1)
: "?";
return (
<span class="text-[10px] text-gray-200 font-medium bg-black/50 px-2 py-0.5 rounded backdrop-blur-sm">
Est. {sizeStr} MB • {timeStr}
</span>
);
}}
</Show>
</div>
</div>
<Show when={metadata.latest}>
Expand Down