Skip to content

armgit / mimik

Public Imported from GitHub
0

🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots πŸ“–

fix(editor): keep the insert control visible and hide export while editing

Luis Ortizb98cb0ab39c5
diff --git a/src/ui/fullview/TopNav.tsx b/src/ui/fullview/TopNav.tsx
index b5f9241..ba80a2a 100644
--- a/src/ui/fullview/TopNav.tsx
+++ b/src/ui/fullview/TopNav.tsx
@@ -138,10 +138,12 @@ export default function TopNav({ route }: TopNavProps) {
<History size={14} />
{i18n.t('editor.versionHistory')}
</Button>
- <Button size="sm" onClick={() => setExportOpen(true)}>
- <Download size={14} />
- {i18n.t('common.export')}
- </Button>
+ {!editing && (
+ <Button size="sm" onClick={() => setExportOpen(true)}>
+ <Download size={14} />
+ {i18n.t('common.export')}
+ </Button>
+ )}
<ExportPreviewModal
open={exportOpen}
onOpenChange={setExportOpen}
diff --git a/src/ui/shared/InsertBlockMenu.tsx b/src/ui/shared/InsertBlockMenu.tsx
index 7e38dd1..fb75697 100644
--- a/src/ui/shared/InsertBlockMenu.tsx
+++ b/src/ui/shared/InsertBlockMenu.tsx
@@ -36,10 +36,7 @@ export default function InsertBlockMenu({ onInsert }: InsertBlockMenuProps) {
}}
className="group relative flex items-center justify-center gap-1 h-6 my-1"
>
- <span
- aria-hidden="true"
- className={`absolute inset-x-0 top-1/2 border-t border-dashed border-border transition-opacity ${open ? 'opacity-100' : 'opacity-0 group-hover:opacity-100 group-focus-within:opacity-100'}`}
- />
+ <span aria-hidden="true" className="absolute inset-x-0 top-1/2 border-t border-dashed border-border" />
<button
type="button"
ref={triggerRef}
@@ -47,7 +44,7 @@ export default function InsertBlockMenu({ onInsert }: InsertBlockMenuProps) {
title={i18n.t('blocks.add')}
aria-label={i18n.t('blocks.add')}
aria-expanded={open}
- className={`relative flex items-center justify-center w-5 h-5 rounded-full border border-border bg-card text-purple transition-opacity hover:text-accent focus-visible:opacity-100 group-hover:opacity-100 ${open ? 'opacity-100 text-accent' : 'opacity-0'}`}
+ className={`relative flex items-center justify-center w-5 h-5 rounded-full border border-border bg-card transition-colors hover:text-accent hover:border-accent ${open ? 'text-accent border-accent' : 'text-purple'}`}
>
<Plus size={13} />
</button>
diff --git a/src/ui/sidepanel/GuideEditor.tsx b/src/ui/sidepanel/GuideEditor.tsx
index b5165a4..13650ce 100644
--- a/src/ui/sidepanel/GuideEditor.tsx
+++ b/src/ui/sidepanel/GuideEditor.tsx
@@ -299,7 +299,9 @@ export default function GuideEditor({ guideId, onBack, onGuideMe }: GuideEditorP
>
{editing ? <Check size={15} /> : <Pencil size={15} />}
</button>
- <ExportMenu guideId={guideId} guide={data.guide} steps={data.steps} screenshots={data.screenshots} />
+ {!editing && (
+ <ExportMenu guideId={guideId} guide={data.guide} steps={data.steps} screenshots={data.screenshots} />
+ )}
</div>
</div>
<div className="mt-1 mb-1.5" style={{ marginLeft: '34px' }}>