fix(webui): dev proxy keeps the browser's Host, and editor errors show beside Save
Vite's proxy shorthand sets changeOrigin, so every mutation through the dev server failed archie-ui's same-origin check. The mapping and binding editors rendered their refusal at the top of a scrolled dialog, out of view of the Save button.
This commit is contained in:
4 files changed
+16
-10
No files matched your search
@@ -66,11 +66,6 @@ const secretHint = computed(() =>
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<Alert v-if="props.error" variant="destructive">
|
||||
<AlertTitle>Could not save</AlertTitle>
|
||||
<AlertDescription>{{ props.error }}</AlertDescription>
|
||||
</Alert>
|
||||
|
||||
<form @submit.prevent="emit('save', draft)">
|
||||
<FieldGroup>
|
||||
<Field>
|
||||
@@ -139,6 +134,13 @@ const secretHint = computed(() =>
|
||||
</Field>
|
||||
</FieldGroup>
|
||||
|
||||
<!-- Beside the buttons, not at the top: the dialog scrolls, and Save is
|
||||
clicked at the bottom, where a refusal must be seen. -->
|
||||
<Alert v-if="props.error" variant="destructive" class="mt-4">
|
||||
<AlertTitle>Could not save</AlertTitle>
|
||||
<AlertDescription>{{ props.error }}</AlertDescription>
|
||||
</Alert>
|
||||
|
||||
<DialogFooter class="mt-4">
|
||||
<Button type="button" variant="outline" @click="open = false">Cancel</Button>
|
||||
<Button type="submit" :disabled="props.saving">
|
||||
|
||||
@@ -40,8 +40,6 @@ function onOpenChange(open: boolean) {
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<MappingActionError v-if="actionError" :failure="actionError" />
|
||||
|
||||
<Card>
|
||||
<CardContent>
|
||||
<MappingForm />
|
||||
@@ -73,6 +71,10 @@ function onOpenChange(open: boolean) {
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
<!-- Beside the buttons, not at the top: the dialog scrolls, and Save is
|
||||
clicked at the bottom, where a refusal must be seen. -->
|
||||
<MappingActionError v-if="actionError" :failure="actionError" />
|
||||
|
||||
<DialogFooter>
|
||||
<Button variant="outline" @click="closeEditor">Cancel</Button>
|
||||
<Button :disabled="saving" @click="saveMapping">
|
||||
|
||||
Reference in new issue
Block a user