Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
feat: upgrade recording config selects
Richie McIlroyb57b55f89231
diff --git a/apps/desktop/src/routes/(window-chrome)/settings.tsx b/apps/desktop/src/routes/(window-chrome)/settings.tsxindex 2a5cb98a1..2e864c578 100644--- a/apps/desktop/src/routes/(window-chrome)/settings.tsx+++ b/apps/desktop/src/routes/(window-chrome)/settings.tsx@@ -27,7 +27,11 @@ export default function Settings(props: RouteSectionProps) {<Foreach={[{ href: "general", name: "General", icon: IconCapSettings },- { href: "config", name: "Config", icon: IconLucideVideo },+ {+ href: "config",+ name: "Recording Config",+ icon: IconLucideVideo,+ },{ href: "hotkeys", name: "Shortcuts", icon: IconCapHotkeys },{href: "recordings",diff --git a/apps/desktop/src/routes/(window-chrome)/settings/config.tsx b/apps/desktop/src/routes/(window-chrome)/settings/config.tsxindex a11e566d5..5068a55e8 100644--- a/apps/desktop/src/routes/(window-chrome)/settings/config.tsx+++ b/apps/desktop/src/routes/(window-chrome)/settings/config.tsx@@ -1,17 +1,37 @@import { createQuery } from "@tanstack/solid-query";import { For, Show } from "solid-js";import { commands } from "~/utils/tauri";+import { Select as KSelect } from "@kobalte/core/select";+import { cx } from "cva";+import {+ MenuItem,+ MenuItemList,+ PopperContent,+ topLeftAnimateClasses,+} from "~/routes/editor/ui";-const RESOLUTION_OPTIONS = [- { label: "720p (1280x720)", value: "720p", width: 1280, height: 720 },- { label: "1080p (1920x1080)", value: "1080p", width: 1920, height: 1080 },- { label: "4K (3840x2160)", value: "4k", width: 3840, height: 2160 },-] as const;+type ResolutionOption = {+ label: string;+ value: string;+ width: number;+ height: number;+};-const FPS_OPTIONS = [+type FpsOption = {+ label: string;+ value: number;+};++const RESOLUTION_OPTIONS: ResolutionOption[] = [+ { label: "720p", value: "720p", width: 1280, height: 720 },+ { label: "1080p", value: "1080p", width: 1920, height: 1080 },+ { label: "4K", value: "4k", width: 3840, height: 2160 },+];++const FPS_OPTIONS: FpsOption[] = [{ label: "30 FPS", value: 30 },{ label: "60 FPS", value: 60 },-] as const;+];export default function Config() {const config = createQuery(() => ({@@ -37,22 +57,20 @@ export default function Config() {<div class="flex flex-col w-full h-full divide-y divide-[--gray-200] pt-1 pb-12"><div class="p-4"><div class="mb-6">- <label class="text-sm font-medium mb-2 block">+ <label class="text-sm font-medium mb-2 block text-gray-500 dark:text-gray-400">Output Resolution</label>- <select- class="w-full p-2 border rounded"- value={- RESOLUTION_OPTIONS.find(- (opt) =>- opt.width === config.data?.outputResolution?.width &&- opt.height === config.data?.outputResolution?.height- )?.value- }- onChange={(e) => {- const option = RESOLUTION_OPTIONS.find(- (opt) => opt.value === e.currentTarget.value- );+ <KSelect<(typeof RESOLUTION_OPTIONS)[number]>+ options={RESOLUTION_OPTIONS}+ optionValue="value"+ optionTextValue="label"+ placeholder="Select Resolution"+ value={RESOLUTION_OPTIONS.find(+ (opt) =>+ opt.width === config.data?.outputResolution?.width &&+ opt.height === config.data?.outputResolution?.height+ )}+ onChange={(option) => {if (option) {updateConfig({outputResolution: {@@ -62,26 +80,89 @@ export default function Config() {});}}}+ itemComponent={(props) => (+ <MenuItem<typeof KSelect.Item>+ as={KSelect.Item}+ item={props.item}+ >+ <KSelect.ItemLabel class="flex-1">+ {props.item.rawValue.label}+ </KSelect.ItemLabel>+ </MenuItem>+ )}>- <For each={RESOLUTION_OPTIONS}>- {(option) => <option value={option.value}>{option.label}</option>}- </For>- </select>+ <KSelect.Trigger class="flex flex-row items-center h-[2rem] px-[0.375rem] gap-[0.375rem] border rounded-lg border-gray-200 w-full disabled:text-gray-400 transition-colors KSelect">+ <KSelect.Value<+ (typeof RESOLUTION_OPTIONS)[number]+ > class="flex-1 text-sm text-left truncate text-[--gray-500]">+ {(state) => <span>{state.selectedOption()?.label}</span>}+ </KSelect.Value>+ <KSelect.Icon>+ <IconCapChevronDown class="size-4 shrink-0 transform transition-transform ui-expanded:rotate-180 text-[--gray-500]" />+ </KSelect.Icon>+ </KSelect.Trigger>+ <KSelect.Portal>+ <PopperContent<typeof KSelect.Content>+ as={KSelect.Content}+ class={cx(topLeftAnimateClasses, "z-50")}+ >+ <MenuItemList<typeof KSelect.Listbox>+ class="max-h-32 overflow-y-auto"+ as={KSelect.Listbox}+ />+ </PopperContent>+ </KSelect.Portal>+ </KSelect></div><div class="mb-6">- <label class="text-sm font-medium mb-2 block">Frame Rate</label>- <select- class="w-full p-2 border rounded"- value={config.data?.fps}- onChange={(e) => {- updateConfig({ fps: Number(e.currentTarget.value) });+ <label class="text-sm font-medium mb-2 block text-gray-500 dark:text-gray-400">+ Frame Rate+ </label>+ <KSelect<(typeof FPS_OPTIONS)[number]>+ options={FPS_OPTIONS}+ optionValue="value"+ optionTextValue="label"+ placeholder="Select FPS"+ value={FPS_OPTIONS.find((opt) => opt.value === config.data?.fps)}+ onChange={(option) => {+ if (option) {+ updateConfig({ fps: option.value });+ }}}+ itemComponent={(props) => (+ <MenuItem<typeof KSelect.Item>+ as={KSelect.Item}+ item={props.item}+ >+ <KSelect.ItemLabel class="flex-1">+ {props.item.rawValue.label}+ </KSelect.ItemLabel>+ </MenuItem>+ )}>- <For each={FPS_OPTIONS}>- {(option) => <option value={option.value}>{option.label}</option>}- </For>- </select>+ <KSelect.Trigger class="flex flex-row items-center h-[2rem] px-[0.375rem] gap-[0.375rem] border rounded-lg border-gray-200 w-full disabled:text-gray-400 transition-colors KSelect">+ <KSelect.Value<+ (typeof FPS_OPTIONS)[number]+ > class="flex-1 text-sm text-left truncate text-[--gray-500]">+ {(state) => <span>{state.selectedOption()?.label}</span>}+ </KSelect.Value>+ <KSelect.Icon>+ <IconCapChevronDown class="size-4 shrink-0 transform transition-transform ui-expanded:rotate-180 text-[--gray-500]" />+ </KSelect.Icon>+ </KSelect.Trigger>+ <KSelect.Portal>+ <PopperContent<typeof KSelect.Content>+ as={KSelect.Content}+ class={cx(topLeftAnimateClasses, "z-50")}+ >+ <MenuItemList<typeof KSelect.Listbox>+ class="max-h-32 overflow-y-auto"+ as={KSelect.Listbox}+ />+ </PopperContent>+ </KSelect.Portal>+ </KSelect></div></div></div>diff --git a/apps/desktop/src/routes/editor/ConfigSidebar.tsx b/apps/desktop/src/routes/editor/ConfigSidebar.tsxindex e5a0eb373..86cbe622a 100644--- a/apps/desktop/src/routes/editor/ConfigSidebar.tsx+++ b/apps/desktop/src/routes/editor/ConfigSidebar.tsx@@ -551,61 +551,70 @@ export function ConfigSidebar() {/></Subfield></Field>- <Field name="Size" icon={<IconCapEnlarge />}>- <Slider- value={[project.cursor.size]}- onChange={(v) => setProject("cursor", "size", v[0])}- minValue={20}- maxValue={300}- step={1}- />- </Field>+ <ComingSoonTooltip>+ <Field name="Size" icon={<IconCapEnlarge />}>+ <Slider+ value={[project.cursor.size]}+ onChange={(v) => setProject("cursor", "size", v[0])}+ minValue={20}+ maxValue={300}+ step={1}+ disabled+ />+ </Field>+ </ComingSoonTooltip>{window.FLAGS.zoom && (- <Field name="Animation Style" icon={<IconLucideRabbit />}>- <RadioGroup- defaultValue="regular"- value={project.cursor.animationStyle}- onChange={(value) => {- console.log("Changing animation style to:", value);- setProject(- "cursor",- "animationStyle",- value as CursorAnimationStyle- );- }}- class="flex flex-col gap-2"- >- {(- Object.entries(CURSOR_ANIMATION_STYLES) as [- CursorAnimationStyle,- string- ][]- ).map(([value, label]) => (- <RadioGroup.Item value={value} class="flex items-center">- <RadioGroup.ItemInput class="peer sr-only" />- <RadioGroup.ItemControl- class={cx(- "w-4 h-4 rounded-full border border-gray-300 mr-2",- "relative after:absolute after:inset-0 after:m-auto after:block after:w-2 after:h-2 after:rounded-full",- "after:transition-colors after:duration-200",- "peer-checked:border-blue-500 peer-checked:after:bg-blue-400",- "peer-focus-visible:ring-2 peer-focus-visible:ring-blue-400/50",- "peer-disabled:opacity-50"- )}- />- <span- class={cx(- "text-gray-500",- "peer-checked:text-gray-900",- "peer-disabled:opacity-50"- )}+ <ComingSoonTooltip>+ <Field name="Animation Style" icon={<IconLucideRabbit />}>+ <RadioGroup+ defaultValue="regular"+ value={project.cursor.animationStyle}+ onChange={(value) => {+ console.log("Changing animation style to:", value);+ setProject(+ "cursor",+ "animationStyle",+ value as CursorAnimationStyle+ );+ }}+ class="flex flex-col gap-2"+ disabled+ >+ {(+ Object.entries(CURSOR_ANIMATION_STYLES) as [+ CursorAnimationStyle,+ string+ ][]+ ).map(([value, label]) => (+ <RadioGroup.Item+ value={value}+ class="flex items-center">- {label}- </span>- </RadioGroup.Item>- ))}- </RadioGroup>- </Field>+ <RadioGroup.ItemInput class="peer sr-only" />+ <RadioGroup.ItemControl+ class={cx(+ "w-4 h-4 rounded-full border border-gray-300 mr-2",+ "relative after:absolute after:inset-0 after:m-auto after:block after:w-2 after:h-2 after:rounded-full",+ "after:transition-colors after:duration-200",+ "peer-checked:border-blue-500 peer-checked:after:bg-blue-400",+ "peer-focus-visible:ring-2 peer-focus-visible:ring-blue-400/50",+ "peer-disabled:opacity-50"+ )}+ />+ <span+ class={cx(+ "text-gray-500",+ "peer-checked:text-gray-900",+ "peer-disabled:opacity-50"+ )}+ >+ {label}+ </span>+ </RadioGroup.Item>+ ))}+ </RadioGroup>+ </Field>+ </ComingSoonTooltip>)}</>) : (diff --git a/apps/web/content/changelog/31.mdx b/apps/web/content/changelog/31.mdxindex 5fae74fdd..7c801f2db 100644--- a/apps/web/content/changelog/31.mdx+++ b/apps/web/content/changelog/31.mdx@@ -6,15 +6,18 @@ version: 0.3.11image:----- New "Config" setitngs tab, allowing you to choose your recording resolution and framerate+- New "Recording Config" setitngs tab, allowing you to choose your recording resolution and framerate- New "Export Options" in Editor, allowing you to choose your export resolution and framerate- New "Manual Zoom" in Editor, allowing you to zoom in and out on your recording. Auto zoom/ustom cursor coming soon.- New custom MP4 muxer- New metadata display in export+- FREE Shareable links for everyone (recordings under 5 mins + watermarked)+- Removed requirement for auth on app download- Removed FFmpeg CLI, removing at least ~30mb from app download size- Fix for preventing export progress from freezing at 102%- Fix for enforcing main window size constraints- Fix for camera mirroring+- Fix for thumbnail generation- Multiple fixes for Windows version- Multiple dark mode styling fixes- Multiple fixes for exporting