Browse Source

fix(webapp): allow displaying DS info for grandchildren of LPS

Peter Thomassen 1 year ago
parent
commit
07405351c7
1 changed files with 10 additions and 1 deletions
  1. 10 1
      www/webapp/src/views/DomainSetup.vue

+ 10 - 1
www/webapp/src/views/DomainSetup.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <div v-if="this.LOCAL_PUBLIC_SUFFIXES.some((suffix) => domain.endsWith('.' + suffix))">
+  <div v-if="hasAutomaticDelegationMaintenance">
     <p class="mt-4">
     <p class="mt-4">
       You're domain is fully configured.
       You're domain is fully configured.
     </p>
     </p>
@@ -178,6 +178,15 @@ export default {
     LOCAL_PUBLIC_SUFFIXES: import.meta.env.VITE_APP_LOCAL_PUBLIC_SUFFIXES.split(' '),
     LOCAL_PUBLIC_SUFFIXES: import.meta.env.VITE_APP_LOCAL_PUBLIC_SUFFIXES.split(' '),
   }),
   }),
   computed: {
   computed: {
+    hasAutomaticDelegationMaintenance: function () {
+      let self = this;
+      return self.LOCAL_PUBLIC_SUFFIXES.some(
+          (suffix) => (
+              self.domain.split('.').length == suffix.split('.').length + 1
+              && self.domain.endsWith('.' + suffix)
+          )
+      )
+    },
     tabs: function () {
     tabs: function () {
       let self = this;
       let self = this;
       return [
       return [