fix(dns): reset add nameserver dialog on close

Closes #635.
This commit is contained in:
Aarnav Tale
2026-10-16 10:21:42 -07:00
parent 858ba114bd
commit 255be7b271
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -3,6 +3,7 @@
## Fixes
- Fixed several broken actions (such as creating auth keys) that began failing with "Bad Request" or "Unexpected Server Error" after Headplane 0.8.0 when sitting behind a reverse proxy that terminates TLS. If you added a proxy rule rewriting the `Origin` header as a workaround, it's safe to remove (closes [#657](https://github.com/tale/headplane/issues/657), [#658](https://github.com/tale/headplane/issues/658)).
- Fixed a bug where the **Add nameserver** dialog would not show the **Restrict to domain** switch in the correct state when closing and reopening the dialog after adding or canceling a split DNS nameserver (closes [#635](https://github.com/tale/headplane/issues/635)).
# 0.8.0 (October 13, 2026)
+2 -1
View File
@@ -45,7 +45,7 @@ export default function AddNameserver({ nameservers }: Props) {
const split = (form.values.split_name as string) !== "global";
return (
<Dialog>
<Dialog onOpenChange={(isOpen) => !isOpen && form.reset()}>
<Button>Add nameserver</Button>
<DialogPanel>
<Title className="mb-4">Add nameserver</Title>
@@ -73,6 +73,7 @@ export default function AddNameserver({ nameservers }: Props) {
</div>
<Switch
label="Split DNS"
checked={split}
onCheckedChange={(checked) => {
form.setValue("split_name", checked ? "" : "global");
}}