Skip to content

Commit

Permalink
feat: remove cursor coming soon in editor if window.FLAGS.recordMouse…
Browse files Browse the repository at this point in the history
… === false
  • Loading branch information
richiemcilroy committed Jan 21, 2025
1 parent a6332a7 commit 758b81b
Showing 1 changed file with 56 additions and 63 deletions.
119 changes: 56 additions & 63 deletions apps/desktop/src/routes/editor/ConfigSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ export function ConfigSidebar() {
</Field>
</KTabs.Content>
<KTabs.Content value="cursor" class="flex flex-col gap-6">
{window.FLAGS.recordMouse ? (
{window.FLAGS.recordMouse === false ? (
<>
<Field name="Cursor" icon={<IconCapCursor />}>
<Subfield name="Hide cursor when not moving">
Expand All @@ -551,70 +551,63 @@ export function ConfigSidebar() {
/>
</Subfield>
</Field>
<ComingSoonTooltip>
<Field name="Size" icon={<IconCapEnlarge />}>
<Slider
value={[project.cursor.size]}
onChange={(v) => setProject("cursor", "size", v[0])}
minValue={20}
maxValue={300}
step={1}
disabled
/>
</Field>
</ComingSoonTooltip>
<Field name="Size" icon={<IconCapEnlarge />}>
<Slider
value={[project.cursor.size]}
onChange={(v) => setProject("cursor", "size", v[0])}
minValue={20}
maxValue={300}
step={1}
disabled={window.FLAGS.recordMouse}
/>
</Field>
{window.FLAGS.zoom && (
<ComingSoonTooltip>
<Field name="Animation Style" icon={<IconLucideRabbit />}>
<RadioGroup
defaultValue="regular"
value={project.cursor.animationStyle}
onChange={(value) => {
console.log("Changing animation style to:", value);
setProject(
"cursor",
"animationStyle",
value as CursorAnimationStyle
);
}}
class="flex flex-col gap-2"
disabled
>
{(
Object.entries(CURSOR_ANIMATION_STYLES) as [
CursorAnimationStyle,
string
][]
).map(([value, label]) => (
<RadioGroup.Item
value={value}
class="flex items-center"
<Field name="Animation Style" icon={<IconLucideRabbit />}>
<RadioGroup
defaultValue="regular"
value={project.cursor.animationStyle}
onChange={(value) => {
console.log("Changing animation style to:", value);
setProject(
"cursor",
"animationStyle",
value as CursorAnimationStyle
);
}}
class="flex flex-col gap-2"
disabled
>
{(
Object.entries(CURSOR_ANIMATION_STYLES) as [
CursorAnimationStyle,
string
][]
).map(([value, label]) => (
<RadioGroup.Item value={value} class="flex items-center">
<RadioGroup.ItemInput class="peer sr-only" />
<RadioGroup.ItemControl
class={cx(
"w-4 h-4 rounded-full border border-gray-300 mr-2",
"relative after:absolute after:inset-0 after:m-auto after:block after:w-2 after:h-2 after:rounded-full",
"after:transition-colors after:duration-200",
"peer-checked:border-blue-500 peer-checked:after:bg-blue-400",
"peer-focus-visible:ring-2 peer-focus-visible:ring-blue-400/50",
"peer-disabled:opacity-50"
)}
/>
<span
class={cx(
"text-gray-500",
"peer-checked:text-gray-900",
"peer-disabled:opacity-50"
)}
>
<RadioGroup.ItemInput class="peer sr-only" />
<RadioGroup.ItemControl
class={cx(
"w-4 h-4 rounded-full border border-gray-300 mr-2",
"relative after:absolute after:inset-0 after:m-auto after:block after:w-2 after:h-2 after:rounded-full",
"after:transition-colors after:duration-200",
"peer-checked:border-blue-500 peer-checked:after:bg-blue-400",
"peer-focus-visible:ring-2 peer-focus-visible:ring-blue-400/50",
"peer-disabled:opacity-50"
)}
/>
<span
class={cx(
"text-gray-500",
"peer-checked:text-gray-900",
"peer-disabled:opacity-50"
)}
>
{label}
</span>
</RadioGroup.Item>
))}
</RadioGroup>
</Field>
</ComingSoonTooltip>
{label}
</span>
</RadioGroup.Item>
))}
</RadioGroup>
</Field>
)}
</>
) : (
Expand Down

1 comment on commit 758b81b

@vercel
Copy link

@vercel vercel bot commented on 758b81b Jan 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.