fix showing dns records

This commit is contained in:
Matt Hill
2025-08-26 13:08:24 -06:00
parent 9eaaa85625
commit ec72fb4bfd
2 changed files with 4 additions and 3 deletions

View File

@@ -123,7 +123,7 @@ export class DnsComponent {
] ]
} }
const segments = subdomain.split('.') const segments = subdomain.split('.').slice(1)
const subdomains = this.i18n.transform('subdomains of') const subdomains = this.i18n.transform('subdomains of')
@@ -133,7 +133,7 @@ export class DnsComponent {
purpose: `only ${subdomain}`, purpose: `only ${subdomain}`,
}, },
...segments.map((_, i) => { ...segments.map((_, i) => {
const parent = segments.slice(i + 1).join('.') const parent = segments.slice(i).join('.')
return { return {
host: `*.${parent}`, host: `*.${parent}`,
purpose: `${subdomains} ${parent}`, purpose: `${subdomains} ${parent}`,

View File

@@ -157,7 +157,7 @@ export class PublicDomainService {
gatewayId: string, gatewayId: string,
authority: 'local' | string, authority: 'local' | string,
) { ) {
const gateway = this.data()!.gateways.find(g => (g.id = gatewayId))! const gateway = this.data()!.gateways.find(g => g.id === gatewayId)!
const loader = this.loader.open('Saving').subscribe() const loader = this.loader.open('Saving').subscribe()
const params = { const params = {
@@ -178,6 +178,7 @@ export class PublicDomainService {
} }
const wanIp = gateway.ipInfo.wanIp const wanIp = gateway.ipInfo.wanIp
let message = this.i18n.transform( let message = this.i18n.transform(
'Create one of the DNS records below.', 'Create one of the DNS records below.',
) as i18nKey ) as i18nKey