Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix incorrect tool tip on file edit button
  • Loading branch information
Theodore Li committed Mar 17, 2026
commit ba84316a851710266baa77adef37c24555ddda1d
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ const PREVIEW_MODE_ICONS = {
preview: Pencil,
} satisfies Record<PreviewMode, (props: ComponentProps<typeof Eye>) => ReactNode>

const PREVIEW_MODE_LABELS: Record<PreviewMode, string> = {
editor: 'Split Mode',
split: 'Preview Mode',
preview: 'Edit Mode',
}

/**
* Builds a `type:id` -> current name lookup from live query data so resource
* tabs always reflect the latest name even after a rename.
Expand Down Expand Up @@ -399,7 +405,7 @@ export function ResourceTabs({
</Button>
</Tooltip.Trigger>
<Tooltip.Content side='bottom'>
<p>Preview mode</p>
<p>{PREVIEW_MODE_LABELS[previewMode]}</p>
</Tooltip.Content>
</Tooltip.Root>
)}
Expand Down
Loading