feat: Updated frontend/src/components/SettingsDial
This commit is contained in:
parent
226af5bf41
commit
98885299b1
@ -14,6 +14,7 @@ import { Switch } from "./ui/switch";
|
|||||||
import { Label } from "./ui/label";
|
import { Label } from "./ui/label";
|
||||||
import { Input } from "./ui/input";
|
import { Input } from "./ui/input";
|
||||||
import { Select, SelectContent, SelectItem, SelectTrigger } from "./ui/select";
|
import { Select, SelectContent, SelectItem, SelectTrigger } from "./ui/select";
|
||||||
|
import { Button } from "./ui/button";
|
||||||
import { capitalize } from "../lib/utils";
|
import { capitalize } from "../lib/utils";
|
||||||
import { IS_RUNNING_ON_CLOUD } from "../config";
|
import { IS_RUNNING_ON_CLOUD } from "../config";
|
||||||
import {
|
import {
|
||||||
@ -57,6 +58,9 @@ function SettingsDialog({ settings, setSettings }: Props) {
|
|||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
<Input
|
<Input
|
||||||
|
const handleResetSettings = () => {
|
||||||
|
localStorage.clear();
|
||||||
|
};
|
||||||
id="access-code dark:border-gray-700 dark:bg-gray-800 dark:text-white"
|
id="access-code dark:border-gray-700 dark:bg-gray-800 dark:text-white"
|
||||||
placeholder="Enter your Screenshot to Code access code"
|
placeholder="Enter your Screenshot to Code access code"
|
||||||
value={settings.accessCode || ""}
|
value={settings.accessCode || ""}
|
||||||
@ -204,3 +208,6 @@ function SettingsDialog({ settings, setSettings }: Props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default SettingsDialog;
|
export default SettingsDialog;
|
||||||
|
<div className="mt-4">
|
||||||
|
<Button onClick={handleResetSettings}>Reset to Defaults</Button>
|
||||||
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user