mirror of
				https://github.com/MHSanaei/3x-ui.git
				synced 2025-10-30 20:02:51 +00:00 
			
		
		
		
	fa,zh bug fixed - qrcode for trojan added
This commit is contained in:
		
							parent
							
								
									145015bf41
								
							
						
					
					
						commit
						c1980277e1
					
				
					 6 changed files with 34 additions and 17 deletions
				
			
		|  | @ -3,7 +3,7 @@ | ||||||
|          :closable="true" width="300px" :ok-text="qrModal.okText" |          :closable="true" width="300px" :ok-text="qrModal.okText" | ||||||
|          cancel-text='{{ i18n "close" }}' :ok-button-props="{attrs:{id:'qr-modal-ok-btn'}}"> |          cancel-text='{{ i18n "close" }}' :ok-button-props="{attrs:{id:'qr-modal-ok-btn'}}"> | ||||||
|     <a-tag color="green" style="margin-bottom: 10px;display: block;text-align: center;" >click on QR Code to Copy</a-tag> |     <a-tag color="green" style="margin-bottom: 10px;display: block;text-align: center;" >click on QR Code to Copy</a-tag> | ||||||
|     <canvas v-if="qrModal.inbound.protocol != Protocols.VMESS && qrModal.inbound.protocol != Protocols.VLESS" id="qrCode" style="width: 100%; height: 100%;"></canvas> |     <canvas v-if="qrModal.inbound.protocol != Protocols.VMESS && qrModal.inbound.protocol != Protocols.VLESS && qrModal.inbound.protocol != Protocols.TROJAN" id="qrCode" style="width: 100%; height: 100%;"></canvas> | ||||||
| 
 | 
 | ||||||
|     <template v-if="qrModal.inbound.protocol === Protocols.VMESS" v-for="(vmess, index) in qrModal.inbound.settings.vmesses"> |     <template v-if="qrModal.inbound.protocol === Protocols.VMESS" v-for="(vmess, index) in qrModal.inbound.settings.vmesses"> | ||||||
|         <a-tag color="red" style="margin-bottom: 10px;display: block;text-align: center;" v-text="vmess.email"></a-tag> |         <a-tag color="red" style="margin-bottom: 10px;display: block;text-align: center;" v-text="vmess.email"></a-tag> | ||||||
|  | @ -16,6 +16,12 @@ | ||||||
|         <canvas @click="copyTextToClipboard(`qrCode-vless-${vless.id}`,index)" :id="`qrCode-vless-${vless.id}`" style="width: 100%; height: 100%;"></canvas> |         <canvas @click="copyTextToClipboard(`qrCode-vless-${vless.id}`,index)" :id="`qrCode-vless-${vless.id}`" style="width: 100%; height: 100%;"></canvas> | ||||||
|         <a-divider style="height: 2px; background-color: #7e7e7e" /> |         <a-divider style="height: 2px; background-color: #7e7e7e" /> | ||||||
|     </template> |     </template> | ||||||
|  |      | ||||||
|  |     <template v-if="qrModal.inbound.protocol === Protocols.TROJAN" v-for="(trojan, index) in qrModal.inbound.settings.trojans"> | ||||||
|  |         <a-tag color="red" style="margin-bottom: 10px;display: block;text-align: center;" v-text="trojan.email"></a-tag> | ||||||
|  |         <canvas @click="copyTextToClipboard(`qrCode-trojan-${trojan.password}`,index)" :id="`qrCode-trojan-${trojan.password}`" style="width: 100%; height: 100%;"></canvas> | ||||||
|  |         <a-divider style="height: 2px; background-color: #7e7e7e" /> | ||||||
|  |     </template> | ||||||
| </a-modal> | </a-modal> | ||||||
| 
 | 
 | ||||||
| <script> | <script> | ||||||
|  | @ -110,6 +116,13 @@ | ||||||
|                             this.setQrCode("qrCode-vless-" + vlesses[index].id ,index) |                             this.setQrCode("qrCode-vless-" + vlesses[index].id ,index) | ||||||
|                         } |                         } | ||||||
|                     break; |                     break; | ||||||
|  |                     case Protocols.TROJAN:  | ||||||
|  |                         trojans = qrModal.inbound.settings.trojans | ||||||
|  | 
 | ||||||
|  |                         for (const index in trojans) { | ||||||
|  |                             this.setQrCode("qrCode-trojan-" + trojans[index].password ,index) | ||||||
|  |                         } | ||||||
|  |                     break; | ||||||
|                     default: return null; |                     default: return null; | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -25,11 +25,11 @@ | ||||||
| </template> | </template> | ||||||
| 
 | 
 | ||||||
| <template v-if="inbound.tls || inbound.xtls"> | <template v-if="inbound.tls || inbound.xtls"> | ||||||
|     <p v-if="inbound.tls">tls: <a-tag color="green">{{ i18n "turnOn" }}</a-tag></p> |     <p v-if="inbound.tls">tls: <a-tag color="green">{{ i18n "enabled" }}</a-tag></p> | ||||||
|     <p v-if="inbound.xtls">xtls: <a-tag color="green">{{ i18n "turnOn" }}</a-tag></p> |     <p v-if="inbound.xtls">xtls: <a-tag color="green">{{ i18n "enabled" }}</a-tag></p> | ||||||
| </template> | </template> | ||||||
| <template v-else> | <template v-else> | ||||||
|     <p>tls: <a-tag color="red">{{ i18n "closure" }}</a-tag></p> |     <p>tls: <a-tag color="red">{{ i18n "disabled" }}</a-tag></p> | ||||||
| </template> | </template> | ||||||
| <p v-if="inbound.tls"> | <p v-if="inbound.tls"> | ||||||
|     tls {{ i18n "domainName" }}: <a-tag :color="inbound.serverName ? 'green' : 'orange'">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag> |     tls {{ i18n "domainName" }}: <a-tag :color="inbound.serverName ? 'green' : 'orange'">[[ inbound.serverName ? inbound.serverName : '' ]]</a-tag> | ||||||
|  |  | ||||||
|  | @ -31,17 +31,18 @@ | ||||||
| "host" = "host" | "host" = "host" | ||||||
| "path" = "path" | "path" = "path" | ||||||
| "camouflage" = "camouflage" | "camouflage" = "camouflage" | ||||||
| "turnOn" = "turn on" | "enabled" = "enabled" | ||||||
| "closure" = "closure" | "disabled" = "disabled" | ||||||
| "domainName" = "domain name" | "domainName" = "domain name" | ||||||
| "additional" = "alter" | "additional" = "alter" | ||||||
| "monitor" = "Listen IP" | "monitor" = "Listen IP" | ||||||
| "certificate" = "certificat" | "certificate" = "certificate" | ||||||
| "fail" = "fail" | "fail" = "fail" | ||||||
| "success" = " success" | "success" = " success" | ||||||
| "getVersion" = "get version" | "getVersion" = "get version" | ||||||
| "install" = "install" | "install" = "install" | ||||||
| "used" = "used" | "used" = "used" | ||||||
|  | "clients" = "clients" | ||||||
| 
 | 
 | ||||||
| [menu] | [menu] | ||||||
| "dashboard" = "System Status" | "dashboard" = "System Status" | ||||||
|  | @ -83,7 +84,6 @@ | ||||||
| "xraySwitchVersionDialogDesc" = "whether to switch the xray version to" | "xraySwitchVersionDialogDesc" = "whether to switch the xray version to" | ||||||
| "dontRefreshh" = "Installation is in progress, please do not refresh this page" | "dontRefreshh" = "Installation is in progress, please do not refresh this page" | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| [pages.inbounds] | [pages.inbounds] | ||||||
| "title" = "Inbounds" | "title" = "Inbounds" | ||||||
| "totalDownUp" = "Total uploads/downloads" | "totalDownUp" = "Total uploads/downloads" | ||||||
|  |  | ||||||
|  | @ -17,7 +17,7 @@ | ||||||
| "hour" = "ساعت" | "hour" = "ساعت" | ||||||
| "day" = "روز" | "day" = "روز" | ||||||
| "check" = "چک کردن" | "check" = "چک کردن" | ||||||
| "indefinitely" = "نامحدود" | "indefinite" = "نامحدود" | ||||||
| "unlimited" = "نامحدود" | "unlimited" = "نامحدود" | ||||||
| "none" = "هیچ" | "none" = "هیچ" | ||||||
| "qrCode" = "QR کد" | "qrCode" = "QR کد" | ||||||
|  | @ -31,8 +31,8 @@ | ||||||
| "host" = "آدرس" | "host" = "آدرس" | ||||||
| "path" = "مسیر" | "path" = "مسیر" | ||||||
| "camouflage" = "استتار" | "camouflage" = "استتار" | ||||||
| "enabled" = "فعال" | "enabled" = "فعال شد" | ||||||
| "disabled" = "disabled" | "disabled" = "غیرفعال شد" | ||||||
| "domainName" = "آدرس دامنه" | "domainName" = "آدرس دامنه" | ||||||
| "additional" = "آی دی جایگزین" | "additional" = "آی دی جایگزین" | ||||||
| "monitor" = "آی پی اتصال" | "monitor" = "آی پی اتصال" | ||||||
|  | @ -41,6 +41,7 @@ | ||||||
| "success" = " موفق" | "success" = " موفق" | ||||||
| "getVersion" = "دریافت ورژن" | "getVersion" = "دریافت ورژن" | ||||||
| "install" = "نصب" | "install" = "نصب" | ||||||
|  | "used" = "استفاده شده" | ||||||
| "clients" = "کاربران" | "clients" = "کاربران" | ||||||
| 
 | 
 | ||||||
| [menu] | [menu] | ||||||
|  | @ -123,7 +124,8 @@ | ||||||
| "publicKeyContent" = "محتوای Certificate.crt" | "publicKeyContent" = "محتوای Certificate.crt" | ||||||
| "keyPath" = "مسیر فایل Private.key" | "keyPath" = "مسیر فایل Private.key" | ||||||
| "keyContent" = "محتوای Private.key" | "keyContent" = "محتوای Private.key" | ||||||
| "clickOnQRcode" = "برای کپی بر روی کد تصویری کلیک کنید" | "client" = "کاربر" | ||||||
|  | "uid" = "UID" | ||||||
| 
 | 
 | ||||||
| [pages.inbounds.toasts] | [pages.inbounds.toasts] | ||||||
| "obtain" = "Obtain" | "obtain" = "Obtain" | ||||||
|  |  | ||||||
|  | @ -17,7 +17,7 @@ | ||||||
| "hour" = "小时" | "hour" = "小时" | ||||||
| "day" = "天" | "day" = "天" | ||||||
| "check" = "查看" | "check" = "查看" | ||||||
| "indefinitely" = "无限期" | "indefinite" = "无限期" | ||||||
| "unlimited" = "无限制" | "unlimited" = "无限制" | ||||||
| "none" = "无" | "none" = "无" | ||||||
| "qrCode" = "二维码" | "qrCode" = "二维码" | ||||||
|  | @ -41,6 +41,7 @@ | ||||||
| "success" = "成功" | "success" = "成功" | ||||||
| "getVersion" = "获取版本" | "getVersion" = "获取版本" | ||||||
| "install" = "安装" | "install" = "安装" | ||||||
|  | "used" = "用过的" | ||||||
| "clients" = "客户端" | "clients" = "客户端" | ||||||
| 
 | 
 | ||||||
| [menu] | [menu] | ||||||
|  | @ -122,7 +123,9 @@ | ||||||
| "publicKeyContent" = "公钥内容" | "publicKeyContent" = "公钥内容" | ||||||
| "keyPath" = "密钥文件路径" | "keyPath" = "密钥文件路径" | ||||||
| "keyContent" = "密钥内容" | "keyContent" = "密钥内容" | ||||||
| "clickOnQRcode" = "click on QR Code to Copy" | "client" = "客户" | ||||||
|  | "uid" = "UID" | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| [pages.inbounds.toasts] | [pages.inbounds.toasts] | ||||||
| "obtain" = "获取" | "obtain" = "获取" | ||||||
|  | @ -188,4 +191,3 @@ | ||||||
| "modifyUser" = "修改用户" | "modifyUser" = "修改用户" | ||||||
| "originalUserPassIncorrect" = "原用户名或原密码错误" | "originalUserPassIncorrect" = "原用户名或原密码错误" | ||||||
| "userPassMustBeNotEmpty" = "新用户名和新密码不能为空" | "userPassMustBeNotEmpty" = "新用户名和新密码不能为空" | ||||||
| 
 |  | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 MHSanaei
						MHSanaei