Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
Refactor defaultCaptionSettings export and usage
Richie McIlroy8562d481603a
diff --git a/apps/desktop/src/routes/editor/CaptionsTab.tsx b/apps/desktop/src/routes/editor/CaptionsTab.tsxindex 12e474576..daf120e13 100644--- a/apps/desktop/src/routes/editor/CaptionsTab.tsx+++ b/apps/desktop/src/routes/editor/CaptionsTab.tsx@@ -16,6 +16,7 @@ import {import { createStore } from "solid-js/store";import toast from "solid-toast";import { Toggle } from "~/components/Toggle";+import { defaultCaptionSettings } from "~/store/captions";import type { CaptionSegment, CaptionSettings } from "~/utils/tauri";import { commands, events } from "~/utils/tauri";import IconLucideCheck from "~icons/lucide/check";@@ -125,23 +126,6 @@ const fontOptions = [{ value: "System Monospace", label: "System Monospace" },];-const defaultCaptionSettings: CaptionSettings = {- enabled: false,- font: "System Sans-Serif",- size: 24,- color: "#FFFFFF",- backgroundColor: "#000000",- backgroundOpacity: 90,- position: "bottom-center",- bold: true,- italic: false,- outline: true,- outlineColor: "#000000",- exportWithSubtitles: false,- highlightColor: "#FFFF00",- fadeDuration: 0.15,-};-// Add type definitions at the topinterface CaptionsResponse {segments: CaptionSegment[];@@ -974,7 +958,7 @@ export function CaptionsTab() {<div class="flex flex-col gap-2"><span class="text-gray-500 text-sm">Highlight Color</span><RgbInput- value={captionSettings.highlightColor || "#FFFF00"}+ value={captionSettings.highlightColor || "#FFFFFF"}onChange={(value) =>updateCaptionSetting("highlightColor", value)}diff --git a/apps/desktop/src/store/captions.ts b/apps/desktop/src/store/captions.tsindex d57ded241..07c5742cb 100644--- a/apps/desktop/src/store/captions.ts+++ b/apps/desktop/src/store/captions.ts@@ -12,7 +12,7 @@ export type CaptionsState = {currentCaption: string | null;};-const defaultCaptionSettings: CaptionSettings = {+export const defaultCaptionSettings: CaptionSettings = {enabled: false,font: "System Sans-Serif",size: 24,