diff --git a/frontend/src/components/Dial.vue b/frontend/src/components/Dial.vue index 8bc617c..49a7503 100644 --- a/frontend/src/components/Dial.vue +++ b/frontend/src/components/Dial.vue @@ -2,10 +2,12 @@ - + + export default { - props: ['dial'], + props: ['dial', 'outTags'], data() { return { menu: false @@ -154,7 +156,7 @@ export default { }, optionDetour: { get(): boolean { return this.$props.dial.detour != undefined }, - set(v:boolean) { v ? this.$props.dial.detour = '' : delete this.$props.dial.detour } + set(v:boolean) { v ? this.$props.dial.detour = this.outTags[0]?? '' : delete this.$props.dial.detour } }, optionBind: { get(): boolean { return this.$props.dial.bind_interface != undefined }, diff --git a/frontend/src/components/Listen.vue b/frontend/src/components/Listen.vue index 987d93a..621f23d 100644 --- a/frontend/src/components/Listen.vue +++ b/frontend/src/components/Listen.vue @@ -20,10 +20,12 @@ - + :items="inTags" + v-model="inbound.detour"> + @@ -106,7 +108,7 @@ \ No newline at end of file diff --git a/frontend/src/views/Inbounds.vue b/frontend/src/views/Inbounds.vue index b17df30..96e3cc4 100644 --- a/frontend/src/views/Inbounds.vue +++ b/frontend/src/views/Inbounds.vue @@ -5,6 +5,8 @@ :id="modal.id" :stats="modal.stats" :data="modal.data" + :inTags="inTags" + :outTags="outTags" @close="closeModal" @save="saveModal" /> @@ -115,6 +117,14 @@ const inbounds = computed((): Inbound[] => { return appConfig.value.inbounds }) +const inTags = computed((): string[] => { + return appConfig.value.inbounds.map(i => i.tag) +}) + +const outTags = computed((): string[] => { + return appConfig.value.outbounds.map(i => i.tag) +}) + const clients = computed((): Client[] => { return Data().clients })