Skip to content

Commit

Permalink
chore: Rename Settings Reset (#64)
Browse files Browse the repository at this point in the history
* Rename "Settings Reset" to "Restore Stock Settings" in the UI.
  • Loading branch information
petejohanson authored Oct 16, 2024
1 parent 17208f5 commit 7555c0a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/AppHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ export const AppHeader = ({
const showSettingsRef = useModalRef(showSettingsReset);
const [unsaved, setUnsaved] = useConnectedDeviceData<boolean>(
{ keymap: { checkUnsavedChanges: true } },
(r) => r.keymap?.checkUnsavedChanges,
(r) => r.keymap?.checkUnsavedChanges
);

useSub("rpc_notification.keymap.unsavedChangesStatusChanged", (unsaved) =>
setUnsaved(unsaved),
setUnsaved(unsaved)
);

return (
Expand All @@ -71,7 +71,7 @@ export const AppHeader = ({
<p>Studio</p>
</div>
<GenericModal ref={showSettingsRef} className="max-w-[50vw]">
<h2 className="my-2 text-lg">Settings Reset</h2>
<h2 className="my-2 text-lg">Restore Stock Settings</h2>
<div>
<p>
Settings reset will remove any customizations previously made in ZMK
Expand All @@ -92,7 +92,7 @@ export const AppHeader = ({
onResetSettings?.();
}}
>
Reset Settings
Restore Stock Settings
</Button>
</div>
</div>
Expand All @@ -107,14 +107,17 @@ export const AppHeader = ({
</Button>
<Popover>
<Menu className="shadow-md rounded bg-base-100 text-base-content cursor-pointer overflow-hidden">
<MenuItem className="px-2 py-1 hover:bg-base-200" onAction={onDisconnect}>
<MenuItem
className="px-2 py-1 hover:bg-base-200"
onAction={onDisconnect}
>
Disconnect
</MenuItem>
<MenuItem
className="px-2 py-1 hover:bg-base-200"
onAction={() => setShowSettingsReset(true)}
>
Settings Reset
Restore Stock Settings
</MenuItem>
</Menu>
</Popover>
Expand Down

0 comments on commit 7555c0a

Please sign in to comment.