Skip to content

Commit

Permalink
feat: Add a "Reset to default" button for the Configuration Download …
Browse files Browse the repository at this point in the history
…URL (DeveloperSettings) (#487)

* dev convenience, reset configuration url button

* typo fix

---------

Co-authored-by: Gaudv <[email protected]>
  • Loading branch information
Gaudv and Gaudv authored Nov 17, 2024
1 parent 680d4de commit b32dba6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/renderer/components/SettingsSection/Developer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { FC, useCallback, useEffect, useState } from 'react';
import { useSetting } from 'renderer/rendererSettings';
import { Toggle } from 'renderer/components/Toggle';
import * as packageInfo from '../../../../package.json';

const SettingsItem: FC<{ name: string }> = ({ name, children }) => (
<div className="flex flex-row items-center justify-between py-3.5">
Expand Down Expand Up @@ -44,6 +45,12 @@ export const DeveloperSettings: React.FC = () => {
onBlur={() => validateUrl()}
size={50}
/>
<input
className="ml-2"
type="button"
value="Reset to default"
onClick={() => setConfigDownloadUrl(packageInfo.configUrls.production)}
/>
</div>
</SettingsItem>
<SettingsItem name="Force Use Local Configuration">
Expand Down

0 comments on commit b32dba6

Please sign in to comment.