diff options
| -rw-r--r-- | web/assets/js/model/setting.js | 6 | ||||
| -rw-r--r-- | web/html/xui/form/protocol/trojan.html | 57 | ||||
| -rw-r--r-- | web/html/xui/form/protocol/vless.html | 58 | ||||
| -rw-r--r-- | web/html/xui/form/tls_settings.html | 39 | ||||
| -rw-r--r-- | web/html/xui/inbound_info_modal.html | 38 | ||||
| -rw-r--r-- | web/html/xui/inbounds.html | 3 | ||||
| -rw-r--r-- | web/html/xui/index.html | 8 |
7 files changed, 132 insertions, 77 deletions
diff --git a/web/assets/js/model/setting.js b/web/assets/js/model/setting.js index 61b7b532..86bea983 100644 --- a/web/assets/js/model/setting.js +++ b/web/assets/js/model/setting.js @@ -3,7 +3,7 @@ class AllSetting { constructor(data) { this.webListen = ""; this.webDomain = ""; - this.webPort = 54321; + this.webPort = 2053; this.webCertFile = ""; this.webKeyFile = ""; this.webBasePath = "/"; @@ -19,7 +19,9 @@ class AllSetting { this.tgBotBackup = false; this.tgBotLoginNotify = false; this.tgCpu = ""; - this.tgLang = ""; + this.tgLang = "en-US"; + this.xrayTemplateConfig = ""; + this.secretEnable = false; this.subEnable = false; this.subListen = ""; this.subPort = "2096"; diff --git a/web/html/xui/form/protocol/trojan.html b/web/html/xui/form/protocol/trojan.html index b2ac3dba..51389e30 100644 --- a/web/html/xui/form/protocol/trojan.html +++ b/web/html/xui/form/protocol/trojan.html @@ -38,21 +38,48 @@ <a-icon type="delete" @click="() => inbound.settings.delTrojanFallback(index)" style="color: rgb(255, 77, 79);cursor: pointer;"/> </a-divider> - <a-form-item label="Name"> - <a-input v-model="fallback.name"></a-input> - </a-form-item> - <a-form-item label="Alpn"> - <a-input v-model="fallback.alpn"></a-input> - </a-form-item> - <a-form-item label="Path"> - <a-input v-model="fallback.path"></a-input> - </a-form-item> - <a-form-item label="Dest"> - <a-input v-model="fallback.dest"></a-input> - </a-form-item> - <a-form-item label="xVer"> - <a-input-number v-model="fallback.xver"></a-input-number> - </a-form-item> + <table width="100%"> + <tr> + <td style="width: 20%;">Name</td> + <td> + <a-form-item> + <a-input v-model="fallback.name" style="width: 250px"></a-input> + </a-form-item> + </td> + </tr> + <tr> + <td>Alpn</td> + <td> + <a-form-item> + <a-input v-model="fallback.alpn" style="width: 250px"></a-input> + </a-form-item> + </td> + </tr> + <tr> + <td>Path</td> + <td> + <a-form-item> + <a-input v-model="fallback.path" style="width: 250px"></a-input> + </a-form-item> + </td> + </tr> + <tr> + <td>Dest</td> + <td> + <a-form-item> + <a-input v-model="fallback.dest" style="width: 250px"></a-input> + </a-form-item> + </td> + </tr> + <tr> + <td>xVer</td> + <td> + <a-form-item> + <a-input-number v-model="fallback.xver" :min="0" :max="2"></a-input-number> + </a-form-item> + </td> + </tr> + </table> </a-form> <a-divider style="margin:0;"></a-divider> </template> diff --git a/web/html/xui/form/protocol/vless.html b/web/html/xui/form/protocol/vless.html index 261e6616..c3037935 100644 --- a/web/html/xui/form/protocol/vless.html +++ b/web/html/xui/form/protocol/vless.html @@ -40,21 +40,49 @@ <a-icon type="delete" @click="() => inbound.settings.delFallback(index)" style="color: rgb(255, 77, 79);cursor: pointer;"/> </a-divider> - <a-form-item label="Name"> - <a-input v-model="fallback.name"></a-input> - </a-form-item> - <a-form-item label="Alpn"> - <a-input v-model="fallback.alpn"></a-input> - </a-form-item> - <a-form-item label="Path"> - <a-input v-model="fallback.path"></a-input> - </a-form-item> - <a-form-item label="Dest"> - <a-input v-model="fallback.dest"></a-input> - </a-form-item> - <a-form-item label="xVer"> - <a-input-number v-model="fallback.xver"></a-input-number> - </a-form-item> + <table width="100%"> + <tr> + <td style="width: 20%;">Name</td> + <td> + <a-form-item> + <a-input v-model="fallback.name" style="width: 250px"></a-input> + </a-form-item> + </td> + </tr> + <tr> + <td>Alpn</td> + <td> + <a-form-item> + <a-input v-model="fallback.alpn" style="width: 250px"></a-input> + </a-form-item> + </td> + </tr> + <tr> + <td>Path</td> + <td> + <a-form-item> + <a-input v-model="fallback.path" style="width: 250px"></a-input> + </a-form-item> + </td> + </tr> + <tr> + <td>Dest</td> + <td> + <a-form-item> + <a-input v-model="fallback.dest" style="width: 250px"></a-input> + </a-form-item> + </td> + </tr> + <tr> + <td>xVer</td> + <td> + <a-form-item> + <a-input-number v-model="fallback.xver" :min="0" :max="2"></a-input-number> + </a-form-item> + </td> + </tr> + </table> </a-form> + <a-divider style="margin:0;"></a-divider> </template> {{end}} diff --git a/web/html/xui/form/tls_settings.html b/web/html/xui/form/tls_settings.html index 9c55b410..d277df79 100644 --- a/web/html/xui/form/tls_settings.html +++ b/web/html/xui/form/tls_settings.html @@ -5,26 +5,25 @@ <a-divider style="margin:0;"></a-divider> <table width="100%" class="ant-table-tbody"> <tr> - <td> - <span>{{ i18n "security" }}</span> - </td> - <td> - <a-radio-group v-model="inbound.stream.security" button-style="solid"> - <a-radio-button value="none">{{ i18n "none" }}</a-radio-button> - <a-tooltip> - <template slot="title"> - <span>{{ i18n "pages.inbounds.xtlsDesc" }}</span> - </template> - <a-radio-button v-if="inbound.canEnableXtls()" value="xtls">XTLS</a-radio-button> - </a-tooltip> - <a-tooltip> - <template slot="title"> - <span>{{ i18n "pages.inbounds.realityDesc" }}</span> - </template> - <a-radio-button v-if="inbound.canEnableReality()" value="reality">Reality</a-radio-button> - </a-tooltip> - <a-radio-button value="tls">TLS</a-radio-button> - </a-radio-group> + <td colspan="2"> + <a-form-item label='{{ i18n "security" }}'> + <a-radio-group v-model="inbound.stream.security" button-style="solid"> + <a-radio-button value="none">{{ i18n "none" }}</a-radio-button> + <a-tooltip> + <template slot="title"> + <span>{{ i18n "pages.inbounds.xtlsDesc" }}</span> + </template> + <a-radio-button v-if="inbound.canEnableXtls()" value="xtls">XTLS</a-radio-button> + </a-tooltip> + <a-tooltip> + <template slot="title"> + <span>{{ i18n "pages.inbounds.realityDesc" }}</span> + </template> + <a-radio-button v-if="inbound.canEnableReality()" value="reality">Reality</a-radio-button> + </a-tooltip> + <a-radio-button value="tls">TLS</a-radio-button> + </a-radio-group> + </a-form-item> </td> </tr> diff --git a/web/html/xui/inbound_info_modal.html b/web/html/xui/inbound_info_modal.html index bd1fea72..9d1527b0 100644 --- a/web/html/xui/inbound_info_modal.html +++ b/web/html/xui/inbound_info_modal.html @@ -18,7 +18,7 @@ <td v-if="dbInbound.isVMess || dbInbound.isVLess || dbInbound.isTrojan || dbInbound.isSS"> <table> <tr> - <td>{{ i18n "transmission" }}</td><td><a-tag color="blue">[[ inbound.network ]]</a-tag></td> + <td>{{ i18n "transmission" }}</td><td><a-tag color="green">[[ inbound.network ]]</a-tag></td> </tr> <template v-if="inbound.isTcp || inbound.isWs || inbound.isH2"> <tr> @@ -53,11 +53,11 @@ <tr colspan="2" v-if="dbInbound.hasLink()"> <td> {{ i18n "security" }} - <a-tag :color="inbound.stream.security == 'none' ? 'red' : 'green'">[[ inbound.stream.security ]]</a-tag> + <a-tag :color="inbound.stream.security == 'none' ? 'red' : 'blue'">[[ 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> + <a-tag :color="inbound.serverName ? 'blue' : 'orange'">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag> </template> </td> </tr> @@ -65,13 +65,13 @@ <table v-if="dbInbound.isSS" style="margin-bottom: 10px; width: 100%;"> <tr> <td>{{ i18n "encryption" }}</td> - <td><a-tag color="blue">[[ inbound.settings.method ]]</a-tag></td> + <td><a-tag color="green">[[ inbound.settings.method ]]</a-tag></td> </tr><tr v-if="inbound.isSS2022"> <td>{{ i18n "password" }}</td> <td><a-tag>[[ inbound.settings.password ]]</a-tag></td> </tr><tr> <td>{{ i18n "pages.inbounds.network" }}</td> - <td><a-tag color="blue">[[ inbound.settings.network ]]</a-tag></td> + <td><a-tag color="green">[[ inbound.settings.network ]]</a-tag></td> </tr> </table> <template v-if="infoModal.clientSettings"> @@ -79,7 +79,7 @@ <table style="margin-bottom: 10px;"> <tr> <td>{{ i18n "pages.inbounds.email" }}</td> - <td><a-tag color="blue">[[ infoModal.clientSettings.email ]]</a-tag></td> + <td><a-tag color="green">[[ infoModal.clientSettings.email ]]</a-tag></td> </tr> <tr v-if="infoModal.clientSettings.id"> <td>ID</td> @@ -96,7 +96,7 @@ <tr> <td>{{ i18n "status" }}</td> <td> - <a-tag v-if="isEnable" color="blue">{{ i18n "enabled" }}</a-tag> + <a-tag v-if="isEnable" color="green">{{ i18n "enabled" }}</a-tag> <a-tag v-else>{{ i18n "disabled" }}</a-tag> <a-tag v-if="!isActive" color="red">{{ i18n "depleted" }}</a-tag> </td> @@ -104,7 +104,7 @@ <tr v-if="infoModal.clientStats"> <td>{{ i18n "usage" }}</td> <td> - <a-tag color="blue">[[ sizeFormat(infoModal.clientStats.up + infoModal.clientStats.down) ]]</a-tag> + <a-tag color="green">[[ sizeFormat(infoModal.clientStats.up + infoModal.clientStats.down) ]]</a-tag> <a-tag>↑ [[ sizeFormat(infoModal.clientStats.up) ]] / [[ sizeFormat(infoModal.clientStats.down) ]] ↓</a-tag> </td> </tr> @@ -133,7 +133,7 @@ [[ DateUtil.formatMillis(infoModal.clientSettings.expiryTime) ]] </a-tag> </template> - <a-tag v-else-if="infoModal.clientSettings.expiryTime < 0" color="blue">[[ infoModal.clientSettings.expiryTime / -86400000 ]] {{ i18n "pages.client.days" }}</a-tag> + <a-tag v-else-if="infoModal.clientSettings.expiryTime < 0" color="green">[[ infoModal.clientSettings.expiryTime / -86400000 ]] {{ i18n "pages.client.days" }}</a-tag> <a-tag v-else color="purple" class="infinite-tag">∞</a-tag> </td> </tr> @@ -167,7 +167,7 @@ <template v-if="dbInbound.hasLink()"> <a-divider>URL</a-divider> <a-row v-for="(link,index) in infoModal.links"> - <a-col :span="22"><a-tag color="blue">[[ link.remark ]]</a-tag><br />[[ link.link ]]</a-col> + <a-col :span="22"><a-tag color="green">[[ link.remark ]]</a-tag><br />[[ link.link ]]</a-col> <a-col :span="2" style="text-align: right;"> <a-tooltip title='{{ i18n "copy" }}'> <button class="ant-btn ant-btn-primary" :id="'copy-url-link-'+index" @click="copyToClipboard('copy-url-link-'+index, link.link)"> @@ -182,7 +182,7 @@ <template v-if="dbInbound.isSS && !inbound.isSSMultiUser"> <a-divider>URL</a-divider> <a-row v-for="(link,index) in infoModal.links"> - <a-col :span="22"><a-tag color="blue">[[ link.remark ]]</a-tag><br />[[ link.link ]]</a-col> + <a-col :span="22"><a-tag color="green">[[ link.remark ]]</a-tag><br />[[ link.link ]]</a-col> <a-col :span="2" style="text-align: right;"> <a-tooltip title='{{ i18n "copy" }}'> <button class="ant-btn ant-btn-primary" :id="'copy-url-link-'+index" @click="copyToClipboard('copy-url-link-'+index, link.link)"> @@ -199,10 +199,10 @@ <th>{{ i18n "pages.inbounds.network" }}</th> <th>FollowRedirect</th> </tr><tr> - <td><a-tag color="blue">[[ inbound.settings.address ]]</a-tag></td> - <td><a-tag color="blue">[[ inbound.settings.port ]]</a-tag></td> - <td><a-tag color="blue">[[ inbound.settings.network ]]</a-tag></td> - <td><a-tag color="blue">[[ inbound.settings.followRedirect ]]</a-tag></td> + <td><a-tag color="green">[[ inbound.settings.address ]]</a-tag></td> + <td><a-tag color="green">[[ inbound.settings.port ]]</a-tag></td> + <td><a-tag color="green">[[ inbound.settings.network ]]</a-tag></td> + <td><a-tag color="green">[[ inbound.settings.followRedirect ]]</a-tag></td> </tr> </table> <table v-if="dbInbound.isSocks" style="margin-bottom: 10px; width: 100%;"> @@ -223,8 +223,8 @@ <td>{{ i18n "password" }}</td> </tr><tr v-for="account,index in inbound.settings.accounts"> <td>[[ index ]]</td> - <td><a-tag color="blue">[[ account.user ]]</a-tag></td> - <td><a-tag color="blue">[[ account.pass ]]</a-tag></td> + <td><a-tag color="green">[[ account.user ]]</a-tag></td> + <td><a-tag color="green">[[ account.pass ]]</a-tag></td> </tr> </template> </table> @@ -235,8 +235,8 @@ <th>{{ i18n "password" }}</th> </tr><tr v-for="account,index in inbound.settings.accounts"> <td>[[ index ]]</td> - <td><a-tag color="blue">[[ account.user ]]</a-tag></td> - <td><a-tag color="blue">[[ account.pass ]]</a-tag></td> + <td><a-tag color="green">[[ account.user ]]</a-tag></td> + <td><a-tag color="green">[[ account.pass ]]</a-tag></td> </tr> </table> </template> diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index 10707f12..6309dcb8 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -185,9 +185,8 @@ :row-class-name="dbInbound => (dbInbound.isMultiUser() ? '' : 'hideExpandIcon')" style="margin-top: 10px"> <template slot="action" slot-scope="text, dbInbound"> - <a-icon type="edit" style="font-size: 22px" @click="openEditInbound(dbInbound.id);"></a-icon> <a-dropdown :trigger="['click']"> - <a @click="e => e.preventDefault()">{{ i18n "pages.inbounds.operate" }}</a> + <a-icon @click="e => e.preventDefault()" type="more" style="font-size: 20px; text-decoration: solid;"></a-icon> <a-menu slot="overlay" @click="a => clickAction(a, dbInbound)" :theme="themeSwitcher.currentTheme"> <a-menu-item key="edit"> <a-icon type="edit"></a-icon> diff --git a/web/html/xui/index.html b/web/html/xui/index.html index d9106a51..675b267d 100644 --- a/web/html/xui/index.html +++ b/web/html/xui/index.html @@ -437,8 +437,8 @@ }, formatLogs(logs) { let formattedLogs = ''; - const levels = ["DEBUG","INFO","WARNING","ERROR"]; - const levelColors = ["#7a316f","#008771","#f37b24","#cf3c3c","#bcbcbc"]; + const levels = ["DEBUG","INFO","NOTICE","WARNING","ERROR"]; + const levelColors = ["#3c89e8","#008771","#008771","#f37b24","#e04141","#bcbcbc"]; logs.forEach((log, index) => { let [data, message] = log.split(" - ",2); @@ -449,13 +449,13 @@ const d = parts[0]; const t = parts[1]; const level = parts[2]; - const levelIndex = levels.indexOf(level,levels) || 4; + const levelIndex = levels.indexOf(level,levels) || 5; //formattedLogs += `<span style="color: gray;">${index + 1}.</span>`; formattedLogs += `<span style="color: ${levelColors[0]};">${d} ${t}</span> `; formattedLogs += `<span style="color: ${levelColors[levelIndex]}">${level}</span>`; } else { - const levelIndex = levels.indexOf(data,levels) || 4; + const levelIndex = levels.indexOf(data,levels) || 5; formattedLogs += `<span style="color: ${levelColors[levelIndex]}">${data}</span>`; } |
