🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots 📖
TypeScript browser-extensionchrome-extensiondocumentationfirefox-extensionguide-generatorlocal-firstmanifest-v3privacy-firstproductivityreactscreenshotstep-by-step-guidetutorialtypescriptworkflowwxt
feat(desktop): give every settings section the same card shell
Luis Ortizeb3f66d3f298
diff --git a/AGENTS.md b/AGENTS.mdindex ab4aa96..66c675b 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -857,6 +857,14 @@ identical on both surfaces, so `AiSettings` lives in `packages/ui` and each app`validate` function — the desktop passes core's `validateApiKey` directly, and the extension goesthrough its background messaging, which is the only part that differs.+All three sections are cards with one shell: the same border, radius, padding and 28px icon header+`AiSettings` already had. Rows inside a desktop card stay label-left, control-right, which is right+at this width, while the AI card keeps the stacked 11px labels it needs in 400px of side panel — the+two are never on screen at once, and matching them would mean branching that shared component on+`client()`. The shell alone is what makes the three read as siblings. Capturing is two cards,+Screenshots and Keyboard, because the divider that separated those groups was already doing a card+boundary's job.+The pane carries no heading and no close button. The left nav already names the section, so a titlerepeating the highlighted item is the same word twice on one screen; and `TopNav` stays visible andmounted the whole time settings is open, so All Guides, Starred, Trash and the wordmark are all exitsdiff --git a/apps/desktop/src/renderer/SettingsPanel.tsx b/apps/desktop/src/renderer/SettingsPanel.tsxindex 6e1932e..72c9206 100644--- a/apps/desktop/src/renderer/SettingsPanel.tsx+++ b/apps/desktop/src/renderer/SettingsPanel.tsx@@ -3,6 +3,8 @@ import { i18n } from '@mimik/core/env';import { CURSOR_STYLES } from '@mimik/core/screenshot/types';import AiSettings from '@mimik/ui/shared/AiSettings';import { useKeyCheck } from '@mimik/ui/shared/key-status';+import { Command, Keyboard, MonitorPlay } from 'lucide-react';+import type { ReactNode } from 'react';import { useEffect, useState } from 'react';import type { CaptureSettings, CaptureShortcuts } from '../main/capture/settings';import ShortcutRecorder from './ShortcutRecorder';@@ -28,6 +30,20 @@ const KEYS: { id: keyof CaptureShortcuts; labelKey: string }[] = [const SELECT = 'h-9 rounded-[10px] border border-border bg-card px-2.5 text-sm text-foreground';+function Card({ icon: Icon, title, children }: { icon: typeof Command; title: string; children: ReactNode }) {+ return (+ <div className="space-y-3.5 rounded-[10px] border border-border bg-card p-3.5">+ <div className="flex items-center gap-2.5">+ <div className="flex h-7 w-7 items-center justify-center rounded-lg bg-secondary">+ <Icon size={14} className="text-accent" />+ </div>+ <span className="text-xs font-bold text-foreground">{title}</span>+ </div>+ {children}+ </div>+ );+}+function Toggle({checked,label,@@ -86,116 +102,121 @@ export default function SettingsPanel() {</nav><div className="min-w-0 flex-1 overflow-y-auto px-10 py-8">- <div className="mx-auto flex max-w-[640px] flex-col gap-5">+ <div className="mx-auto flex max-w-[640px] flex-col gap-4">{section === 'ai' && <AiSettings keyCheck={keyCheck} />}{section === 'capture' && settings && (<>- <label className="flex items-center gap-3 text-sm text-foreground">- <span className="mr-auto">{i18n.t('desktop_captureMode')}</span>- <select- className={SELECT}- value={settings.captureMode}- onChange={(e) => save({ captureMode: e.target.value as CaptureSettings['captureMode'] })}- >- {MODES.map((mode) => (- <option key={mode.id} value={mode.id}>- {i18n.t(mode.labelKey)}- </option>- ))}- </select>- </label>-- <Toggle- checked={settings.showCursor}- label={i18n.t('desktop_showCursor')}- onChange={(showCursor) => save({ showCursor })}- />-- <label className="flex items-center gap-3 text-sm text-foreground">- <span className="mr-auto">{i18n.t('desktop_pointerStyle')}</span>- <select- className={SELECT}- value={settings.cursorStyle}- disabled={!settings.showCursor}- onChange={(e) => save({ cursorStyle: e.target.value as CaptureSettings['cursorStyle'] })}- >- {CURSOR_STYLES.map((style) => (- <option key={style} value={style}>- {style}- </option>- ))}- </select>- </label>-- <label className="flex items-center gap-3 text-sm text-foreground">- <span className="mr-auto">{i18n.t('desktop_screenshotDelay')}</span>- <input- type="number"- min={0}- max={2000}- step={50}- className={`${SELECT} w-24`}- value={settings.screenshotDelayMs}- onChange={(e) => save({ screenshotDelayMs: Number(e.target.value) })}+ <Card icon={MonitorPlay} title={i18n.t('desktop_cardScreenshots')}>+ <label className="flex items-center gap-3 text-sm text-foreground">+ <span className="mr-auto">{i18n.t('desktop_captureMode')}</span>+ <select+ className={SELECT}+ value={settings.captureMode}+ onChange={(e) => save({ captureMode: e.target.value as CaptureSettings['captureMode'] })}+ >+ {MODES.map((mode) => (+ <option key={mode.id} value={mode.id}>+ {i18n.t(mode.labelKey)}+ </option>+ ))}+ </select>+ </label>++ <Toggle+ checked={settings.showCursor}+ label={i18n.t('desktop_showCursor')}+ onChange={(showCursor) => save({ showCursor })}/>- <span className="text-muted-foreground">{i18n.t('desktop_milliseconds')}</span>- </label>- {settings.captureMode === 'region' && (+ <label className="flex items-center gap-3 text-sm text-foreground">+ <span className="mr-auto">{i18n.t('desktop_pointerStyle')}</span>+ <select+ className={SELECT}+ value={settings.cursorStyle}+ disabled={!settings.showCursor}+ onChange={(e) => save({ cursorStyle: e.target.value as CaptureSettings['cursorStyle'] })}+ >+ {CURSOR_STYLES.map((style) => (+ <option key={style} value={style}>+ {style}+ </option>+ ))}+ </select>+ </label>++ <label className="flex items-center gap-3 text-sm text-foreground">+ <span className="mr-auto">{i18n.t('desktop_screenshotDelay')}</span>+ <input+ type="number"+ min={0}+ max={2000}+ step={50}+ className={`${SELECT} w-24`}+ value={settings.screenshotDelayMs}+ onChange={(e) => save({ screenshotDelayMs: Number(e.target.value) })}+ />+ <span className="text-muted-foreground">{i18n.t('desktop_milliseconds')}</span>+ </label>++ {settings.captureMode === 'region' && (+ <Toggle+ checked={settings.captureOutsideClicks}+ label={i18n.t('desktop_captureOutside')}+ onChange={(captureOutsideClicks) => save({ captureOutsideClicks })}+ />+ )}+ </Card>++ <Card icon={Keyboard} title={i18n.t('desktop_cardKeyboard')}>+ <Toggle+ checked={settings.captureKeys}+ label={i18n.t('desktop_captureKeys')}+ onChange={(captureKeys) => save({ captureKeys })}+ /><Toggle- checked={settings.captureOutsideClicks}- label={i18n.t('desktop_captureOutside')}- onChange={(captureOutsideClicks) => save({ captureOutsideClicks })}+ checked={settings.captureTyping}+ label={i18n.t('desktop_captureTyping')}+ onChange={(captureTyping) => save({ captureTyping })}/>- )}-- <div className="my-1 h-px bg-border" />-- <Toggle- checked={settings.captureKeys}- label={i18n.t('desktop_captureKeys')}- onChange={(captureKeys) => save({ captureKeys })}- />- <Toggle- checked={settings.captureTyping}- label={i18n.t('desktop_captureTyping')}- onChange={(captureTyping) => save({ captureTyping })}- />- <Toggle- checked={settings.typingSmartDetection}- label={i18n.t('desktop_typingSmart')}- hint={i18n.t('desktop_typingSmartHint')}- onChange={(typingSmartDetection) => save({ typingSmartDetection })}- />-- <label className="flex items-center gap-3 text-sm text-foreground">- <span className="mr-auto">{i18n.t('desktop_typingDebounce')}</span>- <input- type="number"- min={200}- max={5000}- step={100}- disabled={!settings.captureTyping}- className={`${SELECT} w-24`}- value={settings.typingDebounceMs}- onChange={(e) => save({ typingDebounceMs: Number(e.target.value) })}+ <Toggle+ checked={settings.typingSmartDetection}+ label={i18n.t('desktop_typingSmart')}+ hint={i18n.t('desktop_typingSmartHint')}+ onChange={(typingSmartDetection) => save({ typingSmartDetection })}/>- <span className="text-muted-foreground">{i18n.t('desktop_milliseconds')}</span>- </label>++ <label className="flex items-center gap-3 text-sm text-foreground">+ <span className="mr-auto">{i18n.t('desktop_typingDebounce')}</span>+ <input+ type="number"+ min={200}+ max={5000}+ step={100}+ disabled={!settings.captureTyping}+ className={`${SELECT} w-24`}+ value={settings.typingDebounceMs}+ onChange={(e) => save({ typingDebounceMs: Number(e.target.value) })}+ />+ <span className="text-muted-foreground">{i18n.t('desktop_milliseconds')}</span>+ </label>+ </Card></>)}- {section === 'shortcuts' &&- settings &&- KEYS.map((key) => (- <ShortcutRecorder- key={key.id}- label={i18n.t(key.labelKey)}- value={settings.shortcuts[key.id]}- onChange={(next) => save({ shortcuts: { ...settings.shortcuts, [key.id]: next } })}- />- ))}+ {section === 'shortcuts' && settings && (+ <Card icon={Command} title={i18n.t('desktop_cardGlobalKeys')}>+ <p className="-mt-1 text-xs text-muted-foreground">{i18n.t('desktop_cardGlobalKeysHint')}</p>+ {KEYS.map((key) => (+ <ShortcutRecorder+ key={key.id}+ label={i18n.t(key.labelKey)}+ value={settings.shortcuts[key.id]}+ onChange={(next) => save({ shortcuts: { ...settings.shortcuts, [key.id]: next } })}+ />+ ))}+ </Card>+ )}</div></div></div>diff --git a/src/locales/de.yml b/src/locales/de.ymlindex ff3e382..97c2439 100644--- a/src/locales/de.yml+++ b/src/locales/de.yml@@ -181,6 +181,10 @@ desktop:guideCount: $1 AnleitungguideCountPlural: $1 AnleitungenshortcutsSection: "Tastenkürzel"+ cardScreenshots: "Screenshots"+ cardKeyboard: "Tastatur"+ cardGlobalKeys: "Globale Tasten"+ cardGlobalKeysHint: "Werden jeder Anwendung entzogen, solange Mimik läuft."captureKeys: "Kürzel und benannte Tasten aufzeichnen"captureTyping: "Eingaben aufzeichnen"typingDebounce: "Eingabeschritt beenden nach"diff --git a/src/locales/en.yml b/src/locales/en.ymlindex a5f4819..12b997a 100644--- a/src/locales/en.yml+++ b/src/locales/en.yml@@ -181,6 +181,10 @@ desktop:guideCount: $1 guideguideCountPlural: $1 guidesshortcutsSection: "Shortcuts"+ cardScreenshots: "Screenshots"+ cardKeyboard: "Keyboard"+ cardGlobalKeys: "Global keys"+ cardGlobalKeysHint: "Taken from every application while Mimik is running."captureKeys: "Record shortcuts and named keys"captureTyping: "Record what you type"typingDebounce: "Close a typing step after"diff --git a/src/locales/es.yml b/src/locales/es.ymlindex 467a77a..cba8e2b 100644--- a/src/locales/es.yml+++ b/src/locales/es.yml@@ -181,6 +181,10 @@ desktop:guideCount: $1 guíaguideCountPlural: $1 guíasshortcutsSection: "Atajos"+ cardScreenshots: "Capturas de pantalla"+ cardKeyboard: "Teclado"+ cardGlobalKeys: "Teclas globales"+ cardGlobalKeysHint: "Se toman de todas las aplicaciones mientras Mimik está en ejecución."captureKeys: "Registrar atajos y teclas con nombre"captureTyping: "Registrar lo que escribes"typingDebounce: "Cerrar el paso de escritura tras"diff --git a/src/locales/fr.yml b/src/locales/fr.ymlindex 92fa517..986f34d 100644--- a/src/locales/fr.yml+++ b/src/locales/fr.yml@@ -181,6 +181,10 @@ desktop:guideCount: $1 guideguideCountPlural: $1 guidesshortcutsSection: "Raccourcis"+ cardScreenshots: "Captures d’écran"+ cardKeyboard: "Clavier"+ cardGlobalKeys: "Touches globales"+ cardGlobalKeysHint: "Prises à toutes les applications tant que Mimik est en cours d’exécution."captureKeys: "Enregistrer les raccourcis et touches nommées"captureTyping: "Enregistrer ce que vous tapez"typingDebounce: "Clôturer l'étape de saisie après"diff --git a/src/locales/pt-BR.yml b/src/locales/pt-BR.ymlindex f8d46c3..17b17ca 100644--- a/src/locales/pt-BR.yml+++ b/src/locales/pt-BR.yml@@ -181,6 +181,10 @@ desktop:guideCount: $1 guiaguideCountPlural: $1 guiasshortcutsSection: "Atalhos"+ cardScreenshots: "Capturas de tela"+ cardKeyboard: "Teclado"+ cardGlobalKeys: "Teclas globais"+ cardGlobalKeysHint: "Retiradas de todos os aplicativos enquanto o Mimik estiver em execução."captureKeys: "Registrar atalhos e teclas nomeadas"captureTyping: "Registrar o que você digita"typingDebounce: "Encerrar a etapa de digitação após"diff --git a/src/locales/zh-CN.yml b/src/locales/zh-CN.ymlindex 354e0e0..ef0eac0 100644--- a/src/locales/zh-CN.yml+++ b/src/locales/zh-CN.yml@@ -181,6 +181,10 @@ desktop:guideCount: $1 个指南guideCountPlural: $1 个指南shortcutsSection: "快捷键"+ cardScreenshots: "屏幕截图"+ cardKeyboard: "键盘"+ cardGlobalKeys: "全局快捷键"+ cardGlobalKeysHint: "Mimik 运行期间会从所有应用程序中接管这些按键。"captureKeys: "记录快捷键和命名按键"captureTyping: "记录输入内容"typingDebounce: "输入步骤结束延迟"