mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-02-28 13:13:00 +00:00
Compare commits
2 commits
a7303df92b
...
f6e1a8b17b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6e1a8b17b | ||
|
|
68e37604e2 |
1 changed files with 12 additions and 1 deletions
|
|
@ -48,7 +48,7 @@
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label='{{ i18n "pages.xray.outbound.city" }}' v-if="nordModal.cities.length > 0">
|
<a-form-item label='{{ i18n "pages.xray.outbound.city" }}' v-if="nordModal.cities.length > 0">
|
||||||
<a-select v-model="nordModal.cityId" show-search option-filter-prop="label">
|
<a-select v-model="nordModal.cityId" @change="onCityChange" show-search option-filter-prop="label">
|
||||||
<a-select-option :key="0" :value="null" label='{{ i18n "pages.xray.outbound.allCities" }}'>
|
<a-select-option :key="0" :value="null" label='{{ i18n "pages.xray.outbound.allCities" }}'>
|
||||||
{{ i18n "pages.xray.outbound.allCities" }}
|
{{ i18n "pages.xray.outbound.allCities" }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
|
|
@ -182,6 +182,10 @@
|
||||||
return s;
|
return s;
|
||||||
}).sort((a, b) => a.load - b.load);
|
}).sort((a, b) => a.load - b.load);
|
||||||
|
|
||||||
|
if (this.servers.length > 0) {
|
||||||
|
this.serverId = this.servers[0].id;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.servers.length === 0) {
|
if (this.servers.length === 0) {
|
||||||
app.$message.warning('No servers found for the selected country');
|
app.$message.warning('No servers found for the selected country');
|
||||||
}
|
}
|
||||||
|
|
@ -276,6 +280,13 @@
|
||||||
fetchServers: () => nordModal.fetchServers(),
|
fetchServers: () => nordModal.fetchServers(),
|
||||||
addOutbound: () => nordModal.addOutbound(),
|
addOutbound: () => nordModal.addOutbound(),
|
||||||
resetOutbound() { nordModal.resetOutbound(this.nordOutboundIndex) },
|
resetOutbound() { nordModal.resetOutbound(this.nordOutboundIndex) },
|
||||||
|
onCityChange() {
|
||||||
|
if (this.filteredServers.length > 0) {
|
||||||
|
this.nordModal.serverId = this.filteredServers[0].id;
|
||||||
|
} else {
|
||||||
|
this.nordModal.serverId = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
nordOutboundIndex: {
|
nordOutboundIndex: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue