Skip to content

Commit

Permalink
refactor: enhance configuration url handle (#499)
Browse files Browse the repository at this point in the history
(cherry picked from commit e652665)
  • Loading branch information
Revyn112 authored and frankkopp committed Nov 17, 2024
1 parent 6760fd5 commit 204e088
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/renderer/components/SettingsSection/Developer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ 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';
import { Button, ButtonType } from 'renderer/components/Button';
import { ipcRenderer } from 'electron';
import channels from 'common/channels';

const SettingsItem: FC<{ name: string }> = ({ name, children }) => (
<div className="flex flex-row items-center justify-between py-3.5">
Expand Down Expand Up @@ -45,12 +48,20 @@ export const DeveloperSettings: React.FC = () => {
onBlur={() => validateUrl()}
size={50}
/>
<input
className="ml-2"
type="button"
value="Reset to default"
<Button
type={ButtonType.Neutral}
className="ml-2 h-fit min-h-10 text-lg"
onClick={() => ipcRenderer.send(channels.window.reload)}
>
Reload Installer
</Button>
<Button
type={ButtonType.Neutral}
className="ml-2 h-fit min-h-10 text-lg"
onClick={() => setConfigDownloadUrl(packageInfo.configUrls.production)}
/>
>
Reset to default
</Button>
</div>
</SettingsItem>
<SettingsItem name="Force Use Local Configuration">
Expand Down

0 comments on commit 204e088

Please sign in to comment.