diff options
| author | Alireza Ahmadi <alireza7@gmail.com> | 2023-12-08 21:44:52 +0300 |
|---|---|---|
| committer | Alireza Ahmadi <alireza7@gmail.com> | 2023-12-08 21:44:52 +0300 |
| commit | e5fc20b8ae357c7ddb456a17b39ab406cc6ad585 (patch) | |
| tree | 5d39de554e578f7017550e207484334aa06d09b3 /web | |
| parent | 68ee4e003c7189ca9530f8c1cb70a623ab47831c (diff) | |
small fixes #1300
Diffstat (limited to 'web')
| -rw-r--r-- | web/assets/js/model/xray.js | 6 | ||||
| -rw-r--r-- | web/html/xui/inbound_info_modal.html | 20 | ||||
| -rw-r--r-- | web/service/inbound.go | 3 | ||||
| -rw-r--r-- | web/translation/translate.en_US.toml | 6 |
4 files changed, 16 insertions, 19 deletions
diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js index 291f0adc..ba8b322e 100644 --- a/web/assets/js/model/xray.js +++ b/web/assets/js/model/xray.js @@ -1080,9 +1080,9 @@ class Inbound extends XrayCommonClass { } get serverName() { - if (this.stream.isTls || this.stream.isXtls || this.stream.isReality) { - return this.stream.tls.server; - } + if (this.stream.isTls) return this.stream.tls.server; + if (this.stream.isXtls) return this.stream.xtls.server; + if (this.stream.isReality) return this.stream.reality.serverNames; return ""; } diff --git a/web/html/xui/inbound_info_modal.html b/web/html/xui/inbound_info_modal.html index 1390bbcd..e92fc874 100644 --- a/web/html/xui/inbound_info_modal.html +++ b/web/html/xui/inbound_info_modal.html @@ -51,19 +51,15 @@ </table> </td></tr> <tr colspan="2" v-if="dbInbound.hasLink()"> - <td v-if="inbound.tls"> - tls: <a-tag color="green">{{ i18n "enabled" }}</a-tag><br /> - tls {{ i18n "domainName" }}: <a-tag :color="inbound.serverName ? 'green' : 'orange'">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag> - </td> - <td v-else-if="inbound.xtls"> - xtls: <a-tag color="green">{{ i18n "enabled" }}</a-tag><br /> - xtls {{ i18n "domainName" }}: <a-tag :color="inbound.serverName ? 'green' : 'orange'">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag> - </td> - <td v-else-if="inbound.reality"> - reality: <a-tag color="green">{{ i18n "enabled" }}</a-tag><br /> - reality Destination: <a-tag :color="inbound.stream.reality.dest ? 'green' : 'orange'">[[ inbound.stream.reality.dest ]]</a-tag> + <td> + {{ i18n "security" }} + <a-tag :color="inbound.stream.security == 'none' ? 'red' : 'green'">[[ inbound.stream.security ]]</a-tag> + <br /> + <template v-if="inbound.stream.security != 'none'"> + {{ i18n "domainName" }} + <a-tag :color="inbound.serverName ? 'green' : 'orange'">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag> + </template> </td> - <td v-else>tls: <a-tag color="red">{{ i18n "disabled" }}</a-tag></td> </tr> </table> <table v-if="dbInbound.isSS" style="margin-bottom: 10px; width: 100%;"> diff --git a/web/service/inbound.go b/web/service/inbound.go index 58a3de9f..73dd17e5 100644 --- a/web/service/inbound.go +++ b/web/service/inbound.go @@ -1004,7 +1004,8 @@ func (s *InboundService) GetInboundTags() (string, error) { if err != nil && err != gorm.ErrRecordNotFound { return "", err } - return "[\"" + strings.Join(inboundTags, "\", \"") + "\"]", nil + tags, _ := json.Marshal(inboundTags) + return string(tags), nil } func (s *InboundService) MigrationRemoveOrphanedTraffics() { diff --git a/web/translation/translate.en_US.toml b/web/translation/translate.en_US.toml index 2aa31d4d..761ebaf7 100644 --- a/web/translation/translate.en_US.toml +++ b/web/translation/translate.en_US.toml @@ -287,14 +287,14 @@ "subEncrypt" = "Encrypt configs" "subEncryptDesc" = "Encrypt the returned configs in subscription" "subShowInfo" = "Show usage info" -"subShowInfoDesc" = "Show remianed traffic and date after config name" +"subShowInfoDesc" = "Show remained traffic and date after config name" "subURI" = "Reverse Proxy URI" "subURIDesc" = "Change base URI of subscription URL for using on behind of proxies" [pages.xray] "title" = "Xray Settings" "save" = "Save Settings" -"restart" = "Reastart Xray" +"restart" = "Restart Xray" "basicTemplate" = "Basic Template" "advancedTemplate" = "Advanced Template" "generalConfigs" = "General Configs" @@ -446,7 +446,7 @@ "usage" = "❗ Please provide a text to search!" "getID" = "🆔 Your ID: <code>{{ .ID }}</code>" "helpAdminCommands" = "Search for a client email:\r\n<code>/usage [Email]</code>\r\n \r\nSearch for inbounds (with client stats):\r\n<code>/inbound [Remark]</code>" -"helpClientCommands" = "To search for statistics, just use folowing command:\r\n \r\n<code>/usage [UUID|Password]</code>\r\n \r\nUse UUID for vmess/vless and Password for Trojan." +"helpClientCommands" = "To search for statistics, just use the following command:\r\n \r\n<code>/usage [UUID|Password]</code>\r\n \r\nUse UUID for vmess/vless and Password for Trojan." [tgbot.messages] "cpuThreshold" = "🔴 The CPU usage {{ .Percent }}% is more than threshold {{ .Threshold }}%" |
