diff --git a/packages/ui/src/lib/backend/projects.ts b/packages/ui/src/lib/backend/projects.ts index ac919d9df..4f072c995 100644 --- a/packages/ui/src/lib/backend/projects.ts +++ b/packages/ui/src/lib/backend/projects.ts @@ -24,6 +24,7 @@ export type Project = { path: string; api?: CloudProject & { sync: boolean }; preferred_key: Key; + ok_with_force_push: boolean; }; export class ProjectService { @@ -59,6 +60,7 @@ export class ProjectService { title?: string; api?: CloudProject & { sync: boolean }; preferred_key?: Key; + okWithForcePush?: boolean; }) { await invoke('update_project', { project: params }); this.reload(); diff --git a/packages/ui/src/routes/[projectId]/settings/+page.svelte b/packages/ui/src/routes/[projectId]/settings/+page.svelte index 72780e3d8..dde99d05c 100644 --- a/packages/ui/src/routes/[projectId]/settings/+page.svelte +++ b/packages/ui/src/routes/[projectId]/settings/+page.svelte @@ -4,6 +4,7 @@ import CloudForm from './CloudForm.svelte'; import DetailsForm from './DetailsForm.svelte'; import KeysForm from './KeysForm.svelte'; + import PreferencesForm from './PreferencesForm.svelte'; import type { PageData } from './$types'; import Modal from '$lib/components/Modal.svelte'; import Button from '$lib/components/Button.svelte'; @@ -39,6 +40,8 @@ projectService.updateProject({ ...$project$, ...e.detail }); const onCloudUpdated = (e: { detail: Project }) => projectService.updateProject({ ...$project$, ...e.detail }); + const onPreferencesUpdated = (e: { detail: { ok_with_force_push: boolean } }) => + projectService.updateProject({ ...$project$, ...e.detail }); const onDetailsUpdated = async (e: { detail: Project }) => { const api = $user$ && e.detail.api @@ -71,6 +74,8 @@ + +