Fix inbound email options on add modal

This commit is contained in:
Sora39831 2026-04-06 17:14:12 +08:00
parent 6eba2ac375
commit 39ba517d9f
2 changed files with 12 additions and 4 deletions

View file

@ -98,9 +98,9 @@
return app.datepicker;
},
get isTrafficExhausted() {
if (!clientStats) return false
if (clientStats.total <= 0) return false
if (clientStats.up + clientStats.down < clientStats.total) return false
if (!this.clientStats) return false
if (this.clientStats.total <= 0) return false
if (this.clientStats.up + this.clientStats.down < this.clientStats.total) return false
return true
},
get isExpiry() {

View file

@ -114,6 +114,14 @@
set delayedExpireDays(days) {
this.client.expiryTime = -86400000 * days;
},
get emailOptions() {
const options = Array.isArray(app.clientEmailOptions) ? [...app.clientEmailOptions] : [];
const email = this.client?.email;
if (email && !options.includes(email)) {
options.unshift(email);
}
return options;
},
get externalProxy() {
return this.inbound.stream.externalProxy.length > 0;
},
@ -296,4 +304,4 @@
});
</script>
{{end}}
{{end}}