From 39ba517d9ff6841f8b7094b3ff74aa886ea47185 Mon Sep 17 00:00:00 2001 From: Sora39831 <540587985@qq.com> Date: Mon, 6 Apr 2026 17:14:12 +0800 Subject: [PATCH] Fix inbound email options on add modal --- web/html/modals/client_modal.html | 6 +++--- web/html/modals/inbound_modal.html | 10 +++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/web/html/modals/client_modal.html b/web/html/modals/client_modal.html index 33246e35..27364d96 100644 --- a/web/html/modals/client_modal.html +++ b/web/html/modals/client_modal.html @@ -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() { diff --git a/web/html/modals/inbound_modal.html b/web/html/modals/inbound_modal.html index c3883285..a2f8edaf 100644 --- a/web/html/modals/inbound_modal.html +++ b/web/html/modals/inbound_modal.html @@ -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 @@ }); -{{end}} \ No newline at end of file +{{end}}