Update development scripts and add macOS icon assets

- Renamed backend development script from `dev:backend` to `dev:server` for clarity.
- Added new macOS icon assets and configuration files for the application.
- Enhanced App component to improve server management during production and development modes.
- Updated ConnectionForm to reset state after successful submission and conditionally render the update button.
- Implemented database initialization on application startup in the backend.
This commit is contained in:
Jamie Pine
2026-01-25 12:15:47 -08:00
parent 7b1e2295ef
commit edbdf0ce3f
19 changed files with 155 additions and 17 deletions
@@ -1,5 +1,6 @@
import { zodResolver } from '@hookform/resolvers/zod';
import { useForm } from 'react-hook-form';
import { useEffect } from 'react';
import * as z from 'zod';
import { Button } from '@/components/ui/button';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
@@ -37,8 +38,16 @@ export function ConnectionForm() {
},
});
// Sync form with store when serverUrl changes externally
useEffect(() => {
form.reset({ serverUrl });
}, [serverUrl, form]);
const { isDirty } = form.formState;
function onSubmit(data: ConnectionFormValues) {
setServerUrl(data.serverUrl);
form.reset(data); // Reset form state after successful submission
toast({
title: 'Server URL updated',
description: `Connected to ${data.serverUrl}`,
@@ -68,7 +77,9 @@ export function ConnectionForm() {
)}
/>
<Button type="submit">Update Connection</Button>
{isDirty && (
<Button type="submit">Update Connection</Button>
)}
</form>
</Form>