feat: add app edit page with pre-populated form
CI / lint-and-check (push) Failing after 5m3s
CI / test (push) Has been skipped
CI / docker-build (push) Has been skipped

Add /apps/[id]/edit route that loads existing app data into the form,
allowing users to update app properties. Adds edit pencil button to
AppCard (visible on hover) and i18n keys for both EN and RU.
This commit is contained in:
2026-03-25 22:42:20 +03:00
parent 44bbf7b410
commit d479726fe3
6 changed files with 134 additions and 10 deletions
+4 -3
View File
@@ -14,12 +14,13 @@
interface Props {
form: SuperValidated<AppSchema>;
action?: string;
mode?: 'create' | 'edit';
}
let { form: formData, action = '?/create' }: Props = $props();
let { form: formData, action = '?/create', mode = 'create' }: Props = $props();
const { form, errors, enhance, submitting } = superForm(formData, {
resetForm: true
resetForm: mode === 'create'
});
let showAdvanced = $state(false);
@@ -383,7 +384,7 @@
{#if $submitting}
{$t('app.saving')}
{:else}
{$t('app.save')}
{mode === 'edit' ? $t('app.update') : $t('app.save')}
{/if}
</button>
</div>