Skip to content

Commit

Permalink
feat: Improve DNS toggle logic in Settings.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
stephdl committed Jul 31, 2024
1 parent 4c73154 commit f420a8a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions ui/src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,14 @@
<div class="title-description mg-bottom-xlg">
{{ $t("settings.DNS_description") }}
</div>
<cv-row v-if="are_dns_bound && !dnsEnableField">
<cv-row v-if="are_dns_bound && !dnsEnableField && !running">
<cv-column>
<NsInlineNotification
kind="info"
:title="$t('settings.dns_server_is_running')"
:description="$t('settings.dns_server_is_running_description')"
:description="
$t('settings.dns_server_is_running_description')
"
:showCloseButton="false"
/>
</cv-column>
Expand All @@ -177,7 +179,7 @@
v-model="dnsEnableField"
value="dnsEnableField"
formItem
:disabled="are_dns_bound && !dnsEnableField"
:disabled="are_dns_bound && !dnsEnableField && !running"
ref="dnsEnableField"
>
<template slot="text-left">{{
Expand Down Expand Up @@ -212,7 +214,9 @@
:icon="Save20"
:loading="loading.configureModule"
:disabled="
loading.getConfiguration || loading.configureModule
loading.getConfiguration ||
loading.configureModule ||
(are_dns_bound && !dnsEnableField && !running)
"
>{{ $t("settings.save") }}</NsButton
>
Expand Down

0 comments on commit f420a8a

Please sign in to comment.