mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
fix private domain dns ip and hide private domaains for wg gateways
This commit is contained in:
@@ -725,4 +725,5 @@ export default {
|
||||
802: 'Die Übersetzungen auf Betriebssystemebene sind bereits aktiv. Ein Neustart ist erforderlich, damit die Übersetzungen auf Dienstebene wirksam werden.',
|
||||
803: 'Dieses Laufwerk verwendet ext4 und wird automatisch in btrfs konvertiert. Ein Backup wird dringend empfohlen, bevor Sie fortfahren.',
|
||||
804: 'Ich habe ein Backup meiner Daten',
|
||||
805: 'Öffentliche Domain hinzufügen',
|
||||
} satisfies i18n
|
||||
|
||||
@@ -726,4 +726,5 @@ export const ENGLISH: Record<string, number> = {
|
||||
'OS-level translations are already in effect. A restart is required for service-level translations to take effect.': 802,
|
||||
'This drive uses ext4 and will be automatically converted to btrfs. A backup is strongly recommended before proceeding.': 803,
|
||||
'I have a backup of my data': 804,
|
||||
'Add Public Domain': 805,
|
||||
}
|
||||
|
||||
@@ -725,4 +725,5 @@ export default {
|
||||
802: 'Las traducciones a nivel del sistema operativo ya están en vigor. Se requiere un reinicio para que las traducciones a nivel de servicio surtan efecto.',
|
||||
803: 'Esta unidad usa ext4 y se convertirá automáticamente a btrfs. Se recomienda encarecidamente hacer una copia de seguridad antes de continuar.',
|
||||
804: 'Tengo una copia de seguridad de mis datos',
|
||||
805: 'Agregar dominio público',
|
||||
} satisfies i18n
|
||||
|
||||
@@ -723,6 +723,7 @@ export default {
|
||||
800: 'Lorsque vous y êtes invité, entrez votre mot de passe StartOS',
|
||||
801: "Votre système a Secure Boot activé, ce qui exige que tous les modules du noyau soient signés avec une clé de confiance. Certains pilotes matériels \u2014 comme ceux des GPU NVIDIA \u2014 ne sont pas signés par la clé de distribution par défaut. L'enregistrement de la clé de signature StartOS permet à votre firmware de faire confiance à ces modules afin que votre matériel puisse être pleinement utilisé.",
|
||||
802: "Les traductions au niveau du système d'exploitation sont déjà en vigueur. Un redémarrage est nécessaire pour que les traductions au niveau des services prennent effet.",
|
||||
803: "Ce disque utilise ext4 et sera automatiquement converti en btrfs. Il est fortement recommandé de faire une sauvegarde avant de continuer.",
|
||||
803: 'Ce disque utilise ext4 et sera automatiquement converti en btrfs. Il est fortement recommandé de faire une sauvegarde avant de continuer.',
|
||||
804: "J'ai une sauvegarde de mes données",
|
||||
805: 'Ajouter un domaine public',
|
||||
} satisfies i18n
|
||||
|
||||
@@ -725,4 +725,5 @@ export default {
|
||||
802: 'Tłumaczenia na poziomie systemu operacyjnego są już aktywne. Wymagane jest ponowne uruchomienie, aby tłumaczenia na poziomie usług zaczęły obowiązywać.',
|
||||
803: 'Ten dysk używa ext4 i zostanie automatycznie skonwertowany na btrfs. Zdecydowanie zaleca się wykonanie kopii zapasowej przed kontynuowaniem.',
|
||||
804: 'Mam kopię zapasową moich danych',
|
||||
805: 'Dodaj domenę publiczną',
|
||||
} satisfies i18n
|
||||
|
||||
@@ -34,23 +34,34 @@ import { InterfaceAddressItemComponent } from './item.component'
|
||||
template: `
|
||||
<header>
|
||||
{{ 'Gateway' | i18n }}: {{ gatewayGroup().gatewayName }}
|
||||
<button
|
||||
tuiDropdown
|
||||
tuiButton
|
||||
iconStart="@tui.plus"
|
||||
[style.margin-inline-start]="'auto'"
|
||||
[(tuiDropdownOpen)]="addOpen"
|
||||
>
|
||||
{{ 'Add Domain' | i18n }}
|
||||
<tui-data-list *tuiDropdown (click)="addOpen.set(false)">
|
||||
<button tuiOption (click)="addPublicDomain()">
|
||||
{{ 'Public Domain' | i18n }}
|
||||
</button>
|
||||
<button tuiOption (click)="addPrivateDomain()">
|
||||
{{ 'Private Domain' | i18n }}
|
||||
</button>
|
||||
</tui-data-list>
|
||||
</button>
|
||||
@if (gatewayGroup().isWireguard) {
|
||||
<button
|
||||
tuiButton
|
||||
iconStart="@tui.plus"
|
||||
[style.margin-inline-start]="'auto'"
|
||||
(click)="addPublicDomain()"
|
||||
>
|
||||
{{ 'Add Public Domain' | i18n }}
|
||||
</button>
|
||||
} @else {
|
||||
<button
|
||||
tuiDropdown
|
||||
tuiButton
|
||||
iconStart="@tui.plus"
|
||||
[style.margin-inline-start]="'auto'"
|
||||
[(tuiDropdownOpen)]="addOpen"
|
||||
>
|
||||
{{ 'Add Domain' | i18n }}
|
||||
<tui-data-list *tuiDropdown (click)="addOpen.set(false)">
|
||||
<button tuiOption (click)="addPublicDomain()">
|
||||
{{ 'Public Domain' | i18n }}
|
||||
</button>
|
||||
<button tuiOption (click)="addPrivateDomain()">
|
||||
{{ 'Private Domain' | i18n }}
|
||||
</button>
|
||||
</tui-data-list>
|
||||
</button>
|
||||
}
|
||||
</header>
|
||||
<table
|
||||
[appTable]="[
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
signal,
|
||||
} from '@angular/core'
|
||||
import { ErrorService, i18nPipe } from '@start9labs/shared'
|
||||
import { utils } from '@start9labs/start-sdk'
|
||||
import { TuiButton, TuiDialogContext, TuiIcon, TuiLoader } from '@taiga-ui/core'
|
||||
import { TuiButtonLoading } from '@taiga-ui/kit'
|
||||
import { injectContext, PolymorpheusComponent } from '@taiga-ui/polymorpheus'
|
||||
@@ -22,7 +23,7 @@ export type PrivateDnsValidationData = {
|
||||
template: `
|
||||
@let gatewayName =
|
||||
context.data.gateway.name || context.data.gateway.ipInfo.name;
|
||||
@let internalIp = context.data.gateway.ipInfo.lanIp[0] || ('Error' | i18n);
|
||||
@let internalIp = lanIp || ('Error' | i18n);
|
||||
|
||||
<h2>{{ 'DNS Server Config' | i18n }}</h2>
|
||||
<p>
|
||||
@@ -146,6 +147,12 @@ export class PrivateDnsValidationComponent {
|
||||
readonly context =
|
||||
injectContext<TuiDialogContext<void, PrivateDnsValidationData>>()
|
||||
|
||||
get lanIp() {
|
||||
return this.context.data.gateway.ipInfo.subnets
|
||||
.map(s => utils.IpNet.parse(s))
|
||||
.find(s => s.isIpv4())?.address
|
||||
}
|
||||
|
||||
readonly loading = signal(false)
|
||||
readonly pass = signal<boolean | undefined>(undefined)
|
||||
|
||||
|
||||
@@ -158,6 +158,7 @@ export class InterfaceService {
|
||||
return {
|
||||
gatewayId: g.id,
|
||||
gatewayName: g.name,
|
||||
isWireguard: g.ipInfo?.deviceType === 'wireguard',
|
||||
addresses,
|
||||
}
|
||||
})
|
||||
@@ -313,6 +314,7 @@ export type GatewayAddress = {
|
||||
export type GatewayAddressGroup = {
|
||||
gatewayId: string
|
||||
gatewayName: string
|
||||
isWireguard: boolean
|
||||
addresses: GatewayAddress[]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user