small fixes

This commit is contained in:
Alireza Ahmadi
2024-05-15 01:46:19 +02:00
parent db36756515
commit 5805e397af
14 changed files with 16 additions and 18 deletions
+1 -4
View File
@@ -4,7 +4,7 @@
<v-col cols="12" sm="6" md="4" v-if="optionDetour"> <v-col cols="12" sm="6" md="4" v-if="optionDetour">
<v-select <v-select
hide-details hide-details
:label="$t('listen.detourText')" :label="$t('dial.detourText')"
:items="outTags" :items="outTags"
v-model="dial.detour"> v-model="dial.detour">
</v-select> </v-select>
@@ -69,9 +69,6 @@
<v-col cols="12" sm="6" md="4"> <v-col cols="12" sm="6" md="4">
<v-select <v-select
hide-details hide-details
clearable
@click:clear="delete dial.domain_strategy"
width="100"
:label="$t('listen.domainStrategy')" :label="$t('listen.domainStrategy')"
:items="['prefer_ipv4','prefer_ipv6','ipv4_only','ipv6_only']" :items="['prefer_ipv4','prefer_ipv6','ipv4_only','ipv6_only']"
v-model="dial.domain_strategy"> v-model="dial.domain_strategy">
-1
View File
@@ -72,7 +72,6 @@
<v-col cols="12" sm="6" md="4"> <v-col cols="12" sm="6" md="4">
<v-select <v-select
hide-details hide-details
width="100"
:label="$t('listen.domainStrategy')" :label="$t('listen.domainStrategy')"
:items="['prefer_ipv4','prefer_ipv6','ipv4_only','ipv6_only']" :items="['prefer_ipv4','prefer_ipv6','ipv4_only','ipv6_only']"
v-model="inbound.domain_strategy"> v-model="inbound.domain_strategy">
-1
View File
@@ -7,7 +7,6 @@
<v-col cols="12" sm="6" md="4" v-if="tpEnable"> <v-col cols="12" sm="6" md="4" v-if="tpEnable">
<v-select <v-select
hide-details hide-details
width="100"
:label="$t('type')" :label="$t('type')"
:items="Object.keys(trspTypes).map((key,index) => ({title: key, value: Object.values(trspTypes)[index]}))" :items="Object.keys(trspTypes).map((key,index) => ({title: key, value: Object.values(trspTypes)[index]}))"
v-model="transportType"> v-model="transportType">
-1
View File
@@ -10,7 +10,6 @@
<v-col cols="12" sm="6" md="4"> <v-col cols="12" sm="6" md="4">
<v-select <v-select
hide-details hide-details
width="100"
:label="$t('type')" :label="$t('type')"
:items="Object.keys(inTypes).map((key,index) => ({title: key, value: Object.values(inTypes)[index]}))" :items="Object.keys(inTypes).map((key,index) => ({title: key, value: Object.values(inTypes)[index]}))"
v-model="inbound.type" v-model="inbound.type"
-1
View File
@@ -10,7 +10,6 @@
<v-col cols="12" sm="6" md="4"> <v-col cols="12" sm="6" md="4">
<v-select <v-select
hide-details hide-details
width="100"
:label="$t('type')" :label="$t('type')"
:items="Object.keys(outTypes).map((key,index) => ({title: key, value: Object.values(outTypes)[index]}))" :items="Object.keys(outTypes).map((key,index) => ({title: key, value: Object.values(outTypes)[index]}))"
v-model="outbound.type" v-model="outbound.type"
+1
View File
@@ -233,6 +233,7 @@ export default {
connTimeout: "Connection Timeout", connTimeout: "Connection Timeout",
fbTimeout: "Fallback Timeout", fbTimeout: "Fallback Timeout",
options: "Dial Options", options: "Dial Options",
detourText: "Forward to outbound",
}, },
transport: { transport: {
enable: "Enable Transport", enable: "Enable Transport",
+1
View File
@@ -232,6 +232,7 @@ export default {
connTimeout: "مهلت ارتباط", connTimeout: "مهلت ارتباط",
fbTimeout: "مهلت فالبک", fbTimeout: "مهلت فالبک",
options: "گزینه‌های تماس", options: "گزینه‌های تماس",
detourText: "ارسال به خروجی دیگر",
}, },
transport: { transport: {
enable: "فعال‌سازی انتقال", enable: "فعال‌سازی انتقال",
+1
View File
@@ -234,6 +234,7 @@ export default {
connTimeout: "Thời gian Chờ Kết nối", connTimeout: "Thời gian Chờ Kết nối",
fbTimeout: "Thời gian Chờ Fallback", fbTimeout: "Thời gian Chờ Fallback",
options: "Tùy chọn Gọi", options: "Tùy chọn Gọi",
detourText: "Chuyển tiếp tới thư đi",
}, },
transport: { transport: {
enable: "Kích hoạt vận chuyển", enable: "Kích hoạt vận chuyển",
+1
View File
@@ -234,6 +234,7 @@ export default {
connTimeout: "连接超时", connTimeout: "连接超时",
fbTimeout: "回退超时", fbTimeout: "回退超时",
options: "拨号选项", options: "拨号选项",
detourText: "转发至出站",
}, },
transport: { transport: {
enable: "启用传输", enable: "启用传输",
+1
View File
@@ -235,6 +235,7 @@ export default {
connTimeout: "連接超時", connTimeout: "連接超時",
fbTimeout: "回退超時", fbTimeout: "回退超時",
options: "撥號選項", options: "撥號選項",
detourText: "轉寄至出站",
}, },
transport: { transport: {
enable: "啟用傳輸", enable: "啟用傳輸",
+2 -2
View File
@@ -152,12 +152,12 @@ const v2rayStats = computed((): V2rayApiStats => {
}) })
const inbounds = computed((): Inbound[] => { const inbounds = computed((): Inbound[] => {
return <Inbound[]> appConfig.value.inbounds return <Inbound[]> appConfig.value?.inbounds
}) })
const inboundTags = computed((): string[] => { const inboundTags = computed((): string[] => {
if (!inbounds.value) return [] if (!inbounds.value) return []
return inbounds.value.filter(i => i.tag != "" && Object.hasOwn(i,'users')).map(i => i.tag) return inbounds.value?.filter(i => i.tag != "" && Object.hasOwn(i,'users')).map(i => i.tag)
}) })
const modal = ref({ const modal = ref({
+2 -2
View File
@@ -120,7 +120,7 @@ const inbounds = computed((): Inbound[] => {
}) })
const inTags = computed((): string[] => { const inTags = computed((): string[] => {
return inbounds.value.map(i => i.tag) return inbounds.value?.map(i => i.tag)
}) })
const outTags = computed((): string[] => { const outTags = computed((): string[] => {
@@ -136,7 +136,7 @@ const onlines = computed(() => {
}) })
const v2rayStats = computed((): V2rayApiStats => { const v2rayStats = computed((): V2rayApiStats => {
return <V2rayApiStats> appConfig.value.experimental.v2ray_api.stats return <V2rayApiStats> appConfig.value.experimental?.v2ray_api.stats
}) })
const modal = ref({ const modal = ref({
+2 -2
View File
@@ -108,7 +108,7 @@ const outbounds = computed((): Outbound[] => {
}) })
const outboundTags = computed((): string[] => { const outboundTags = computed((): string[] => {
return outbounds.value.map((o:Outbound) => o.tag) return outbounds.value?.map((o:Outbound) => o.tag)
}) })
const onlines = computed(() => { const onlines = computed(() => {
@@ -116,7 +116,7 @@ const onlines = computed(() => {
}) })
const v2rayStats = computed((): V2rayApiStats => { const v2rayStats = computed((): V2rayApiStats => {
return <V2rayApiStats> appConfig.value.experimental.v2ray_api.stats return <V2rayApiStats> appConfig.value.experimental?.v2ray_api.stats
}) })
const modal = ref({ const modal = ref({
+4 -4
View File
@@ -164,7 +164,7 @@ const route = computed((): any => {
const rules = computed((): any[] => { const rules = computed((): any[] => {
const data = route.value const data = route.value
if (!route || !('rules' in data) || !Array.isArray(data.rules)){ if (!data || !('rules' in data) || !Array.isArray(data.rules)){
return [] return []
} }
return data.rules return data.rules
@@ -172,7 +172,7 @@ const rules = computed((): any[] => {
const rulesets = computed((): any[] => { const rulesets = computed((): any[] => {
const data = route.value const data = route.value
if (!route || !('rule_set' in data) || !Array.isArray(data.rule_set)){ if (!data || !('rule_set' in data) || !Array.isArray(data.rule_set)){
return [] return []
} }
return data.rule_set return data.rule_set
@@ -183,11 +183,11 @@ const rulesetTags = computed((): any[] => {
}) })
const outboundTags = computed((): string[] => { const outboundTags = computed((): string[] => {
return appConfig.value.outbounds.map((o:any) => o.tag) return appConfig.value.outbounds?.map((o:any) => o.tag)
}) })
const inboundTags = computed((): string[] => { const inboundTags = computed((): string[] => {
return appConfig.value.inbounds.map((i:any) => i.tag) return appConfig.value.inbounds?.map((i:any) => i.tag)
}) })
let delRuleOverlay = ref(new Array<boolean>) let delRuleOverlay = ref(new Array<boolean>)