π¬ 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
fix: persist blur presets on toggle in both settings and overlay
Luis Ortiz371627016697
diff --git a/src/core/blur/manager.ts b/src/core/blur/manager.tsindex 0576548..ec6ce13 100644--- a/src/core/blur/manager.ts+++ b/src/core/blur/manager.ts@@ -56,9 +56,12 @@ export class BlurManager {private handleEvent = (e: Event) => {switch (e.type) {- case 'mimik-blur:update-presets':- this.scanner.updatePresets((e as CustomEvent<{ presets: PresetKey[] }>).detail.presets);+ case 'mimik-blur:update-presets': {+ const activeKeys = (e as CustomEvent<{ presets: PresetKey[] }>).detail.presets;+ this.scanner.updatePresets(activeKeys);+ this.savePresets(activeKeys);break;+ }case 'mimik-blur:start-picker':this.picker.start(() => this.picker.stop());break;@@ -72,6 +75,19 @@ export class BlurManager {}};+ private savePresets(activeKeys: PresetKey[]) {+ const presets: Record<PresetKey, boolean> = {+ email: false,+ phone: false,+ ssn: false,+ creditCard: false,+ ipAddress: false,+ macAddress: false,+ };+ for (const key of activeKeys) presets[key] = true;+ browser.storage.local.set({ blurPresets: presets });+ }+private async loadPresets(): Promise<Record<PresetKey, boolean>> {try {const stored = await browser.storage.local.get(['blurPresets']);diff --git a/src/ui/shared/SettingsView.tsx b/src/ui/shared/SettingsView.tsxindex ca5fcc8..ca84593 100644--- a/src/ui/shared/SettingsView.tsx+++ b/src/ui/shared/SettingsView.tsx@@ -121,7 +121,13 @@ export default function SettingsView({ onBack }: SettingsViewProps) {><span className="text-xs font-medium text-foreground">{label}</span><button- onClick={() => setBlurPresets((prev) => ({ ...prev, [key]: !prev[key] }))}+ onClick={() =>+ setBlurPresets((prev) => {+ const next = { ...prev, [key]: !prev[key] };+ localStorage.set({ blurPresets: next });+ return next;+ })+ }className={`w-9 h-5 rounded-full transition-colors relative ${blurPresets[key] ? 'bg-accent' : 'bg-border'}`}