mirror of
				https://github.com/MHSanaei/3x-ui.git
				synced 2025-10-31 12:22:51 +00:00 
			
		
		
		
	minor changes
This commit is contained in:
		
							parent
							
								
									c7926d0bc0
								
							
						
					
					
						commit
						e705ae8e48
					
				
					 5 changed files with 95 additions and 92 deletions
				
			
		|  | @ -189,7 +189,7 @@ func (s *SubJsonService) streamData(stream string) map[string]interface{} { | ||||||
| 	delete(streamSettings, "sockopt") | 	delete(streamSettings, "sockopt") | ||||||
| 
 | 
 | ||||||
| 	if s.fragmanet != "" { | 	if s.fragmanet != "" { | ||||||
| 		streamSettings["sockopt"] = json_util.RawMessage(`{"dialerProxy": "fragment", "tcpKeepAliveIdle": 100, "TcpNoDelay": true}`) | 		streamSettings["sockopt"] = json_util.RawMessage(`{"dialerProxy": "fragment", "tcpKeepAliveIdle": 100, "tcpNoDelay": true}`) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	// remove proxy protocol
 | 	// remove proxy protocol
 | ||||||
|  | @ -218,7 +218,7 @@ func (s *SubJsonService) tlsData(tData map[string]interface{}) map[string]interf | ||||||
| 
 | 
 | ||||||
| 	tlsData["serverName"] = tData["serverName"] | 	tlsData["serverName"] = tData["serverName"] | ||||||
| 	tlsData["alpn"] = tData["alpn"] | 	tlsData["alpn"] = tData["alpn"] | ||||||
| 	if allowInsecure, ok := tlsClientSettings["allowInsecure"].(string); ok { | 	if allowInsecure, ok := tlsClientSettings["allowInsecure"].(bool); ok { | ||||||
| 		tlsData["allowInsecure"] = allowInsecure | 		tlsData["allowInsecure"] = allowInsecure | ||||||
| 	} | 	} | ||||||
| 	if fingerprint, ok := tlsClientSettings["fingerprint"].(string); ok { | 	if fingerprint, ok := tlsClientSettings["fingerprint"].(string); ok { | ||||||
|  |  | ||||||
|  | @ -538,7 +538,7 @@ | ||||||
| 
 | 
 | ||||||
|   var on = function(emitter, type, f) { |   var on = function(emitter, type, f) { | ||||||
|     if (emitter.addEventListener) { |     if (emitter.addEventListener) { | ||||||
|       emitter.addEventListener(type, f, { passive: true }); |       emitter.addEventListener(type, f, { passive: false }); | ||||||
|     } else if (emitter.attachEvent) { |     } else if (emitter.attachEvent) { | ||||||
|       emitter.attachEvent("on" + type, f); |       emitter.attachEvent("on" + type, f); | ||||||
|     } else { |     } else { | ||||||
|  |  | ||||||
|  | @ -374,92 +374,96 @@ | ||||||
| </style> | </style> | ||||||
| <body> | <body> | ||||||
| <a-layout id="app" v-cloak :class="themeSwitcher.currentTheme"> | <a-layout id="app" v-cloak :class="themeSwitcher.currentTheme"> | ||||||
|     <transition name="list" appear> |   <transition name="list" appear> | ||||||
|         <a-layout-content class="under" style="min-height: 0;"> |     <a-layout-content class="under" style="min-height: 0;"> | ||||||
|             <div class="waves-header"> |       <div class="waves-header"> | ||||||
|                 <div class="waves-inner-header"></div> |         <div class="waves-inner-header"></div> | ||||||
|                 <svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"> |         <svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" | ||||||
|                     <defs> |           viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"> | ||||||
|                         <path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z" /> |           <defs> | ||||||
|                     </defs> |             <path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z" /> | ||||||
|                     <g class="parallax"> |           </defs> | ||||||
|                         <use xlink:href="#gentle-wave" x="48" y="0" fill="rgba(0, 135, 113, 0.08)" /> |           <g class="parallax"> | ||||||
|                         <use xlink:href="#gentle-wave" x="48" y="3" fill="rgba(0, 135, 113, 0.08)" /> |             <use xlink:href="#gentle-wave" x="48" y="0" fill="rgba(0, 135, 113, 0.08)" /> | ||||||
|                         <use xlink:href="#gentle-wave" x="48" y="5" fill="rgba(0, 135, 113, 0.08)" /> |             <use xlink:href="#gentle-wave" x="48" y="3" fill="rgba(0, 135, 113, 0.08)" /> | ||||||
|                         <use xlink:href="#gentle-wave" x="48" y="7" fill="#c7ebe2" /> |             <use xlink:href="#gentle-wave" x="48" y="5" fill="rgba(0, 135, 113, 0.08)" /> | ||||||
|                     </g> |             <use xlink:href="#gentle-wave" x="48" y="7" fill="#c7ebe2" /> | ||||||
|                 </svg> |           </g> | ||||||
|             </div> |         </svg> | ||||||
|             <a-row type="flex" justify="center" align="middle" style="height: 100%; overflow: auto;"> |       </div> | ||||||
|             <a-col :xs="22" :sm="20" :md="14" :lg="10" :xl="8" :xxl="6" id="login" style="margin: 3rem 0;"> |       <a-row type="flex" justify="center" align="middle" style="height: 100%; overflow: auto;"> | ||||||
|             <a-row type="flex" justify="center"> |         <a-col :xs="22" :sm="20" :md="14" :lg="10" :xl="8" :xxl="6" id="login" style="margin: 3rem 0;"> | ||||||
|                 <a-col style="width: 100%;"> |           <a-row type="flex" justify="center"> | ||||||
|                     <h1 class="title headline zoom"> |             <a-col style="width: 100%;"> | ||||||
|                       <span class="words-wrapper"> |               <h1 class="title headline zoom"> | ||||||
|                         <b class="is-visible">{{ i18n "pages.login.title" }}</b> |                 <span class="words-wrapper"> | ||||||
|                         <b>3X-UI</b> |                   <b class="is-visible">{{ i18n "pages.login.title" }}</b> | ||||||
|                       </span> |                   <b>3X-UI</b> | ||||||
|                     </h1> |                 </span> | ||||||
|                 </a-col> |               </h1> | ||||||
|             </a-row> |  | ||||||
|             <a-row type="flex" justify="center"> |  | ||||||
|                 <a-col span="24"> |  | ||||||
|                     <a-form> |  | ||||||
|                         <a-form-item> |  | ||||||
|                             <a-input v-model.trim="user.username" placeholder='{{ i18n "username" }}' |  | ||||||
|                                      @keydown.enter.native="login" autofocus> |  | ||||||
|                                 <a-icon slot="prefix" type="user" style="font-size: 16px;"/> |  | ||||||
|                             </a-input> |  | ||||||
|                         </a-form-item> |  | ||||||
|                         <a-form-item> |  | ||||||
|                             <password-input icon="lock" v-model.trim="user.password" |  | ||||||
|                                             placeholder='{{ i18n "password" }}' @keydown.enter.native="login"> |  | ||||||
|                             </password-input> |  | ||||||
|                         </a-form-item> |  | ||||||
|                         <a-form-item v-if="secretEnable"> |  | ||||||
|                             <password-input icon="key" v-model.trim="user.loginSecret" |  | ||||||
|                                             placeholder='{{ i18n "secretToken" }}' @keydown.enter.native="login"> |  | ||||||
|                             </password-input> |  | ||||||
|                         </a-input> |  | ||||||
|                         </a-form-item> |  | ||||||
|                         <a-form-item> |  | ||||||
|                             <a-row justify="center" class="centered"> |  | ||||||
|                                 <div class="wave-btn-bg wave-btn-bg-cl" :style="loading ? { width: '52px' } : { display: 'inline-block' }"> |  | ||||||
|                                     <a-button class="ant-btn-primary-login" type="primary" :loading="loading" @click="login" :icon="loading ? 'poweroff' : undefined"> |  | ||||||
|                                         [[ loading ? '' : '{{ i18n "login" }}' ]] |  | ||||||
|                                     </a-button> |  | ||||||
|                                 </div> |  | ||||||
|                             </a-row> |  | ||||||
|                         </a-form-item> |  | ||||||
|                         <a-form-item> |  | ||||||
|                             <a-row justify="center" class="centered"> |  | ||||||
|                                 <a-col :span="24"> |  | ||||||
|                                     <a-select ref="selectLang" v-model="lang" @change="setLang(lang)" style="width: 150px;" :dropdown-class-name="themeSwitcher.currentTheme"> |  | ||||||
|                                         <a-select-option :value="l.value" label="English" v-for="l in supportLangs"> |  | ||||||
|                                             <span role="img" aria-label="l.name" v-text="l.icon"></span> |  | ||||||
|                                               <span v-text="l.name"></span> |  | ||||||
|                                         </a-select-option> |  | ||||||
|                                     </a-select> |  | ||||||
|                                 </a-col> |  | ||||||
|                             </a-row> |  | ||||||
|                         </a-form-item> |  | ||||||
|                         <a-form-item> |  | ||||||
|                             <a-row justify="center" class="centered"> |  | ||||||
|                                 <a-col> |  | ||||||
|                                     <a-icon type="bulb" :theme="themeSwitcher.isDarkTheme ? 'filled' : 'outlined'"></a-icon>  |  | ||||||
|                                 </a-col> |  | ||||||
|                                 <a-col> |  | ||||||
|                                     <theme-switch /> |  | ||||||
|                                 </a-col> |  | ||||||
|                             </a-row> |  | ||||||
|                         </a-form-item> |  | ||||||
|                     </a-form> |  | ||||||
|                 </a-col> |  | ||||||
|             </a-row> |  | ||||||
|             </a-col> |             </a-col> | ||||||
|             </a-row> |           </a-row> | ||||||
|         </a-layout-content> |           <a-row type="flex" justify="center"> | ||||||
|     </transition> |             <a-col span="24"> | ||||||
|  |               <a-form> | ||||||
|  |                 <a-form-item> | ||||||
|  |                   <a-input v-model.trim="user.username" placeholder='{{ i18n "username" }}' | ||||||
|  |                     @keydown.enter.native="login" autofocus> | ||||||
|  |                     <a-icon slot="prefix" type="user" style="font-size: 16px;" /> | ||||||
|  |                   </a-input> | ||||||
|  |                 </a-form-item> | ||||||
|  |                 <a-form-item> | ||||||
|  |                   <password-input icon="lock" v-model.trim="user.password" placeholder='{{ i18n "password" }}' | ||||||
|  |                     @keydown.enter.native="login"> | ||||||
|  |                   </password-input> | ||||||
|  |                 </a-form-item> | ||||||
|  |                 <a-form-item v-if="secretEnable"> | ||||||
|  |                   <password-input icon="key" v-model.trim="user.loginSecret" placeholder='{{ i18n "secretToken" }}' | ||||||
|  |                     @keydown.enter.native="login"> | ||||||
|  |                   </password-input> | ||||||
|  |                   </a-input> | ||||||
|  |                 </a-form-item> | ||||||
|  |                 <a-form-item> | ||||||
|  |                   <a-row justify="center" class="centered"> | ||||||
|  |                     <div class="wave-btn-bg wave-btn-bg-cl" | ||||||
|  |                       :style="loading ? { width: '52px' } : { display: 'inline-block' }"> | ||||||
|  |                       <a-button class="ant-btn-primary-login" type="primary" :loading="loading" @click="login" | ||||||
|  |                         :icon="loading ? 'poweroff' : undefined"> | ||||||
|  |                         [[ loading ? '' : '{{ i18n "login" }}' ]] | ||||||
|  |                       </a-button> | ||||||
|  |                     </div> | ||||||
|  |                   </a-row> | ||||||
|  |                 </a-form-item> | ||||||
|  |                 <a-form-item> | ||||||
|  |                   <a-row justify="center" class="centered"> | ||||||
|  |                     <a-col :span="24"> | ||||||
|  |                       <a-select ref="selectLang" v-model="lang" @change="setLang(lang)" style="width: 150px;" | ||||||
|  |                         :dropdown-class-name="themeSwitcher.currentTheme"> | ||||||
|  |                         <a-select-option :value="l.value" label="English" v-for="l in supportLangs"> | ||||||
|  |                           <span role="img" aria-label="l.name" v-text="l.icon"></span> | ||||||
|  |                             <span v-text="l.name"></span> | ||||||
|  |                         </a-select-option> | ||||||
|  |                       </a-select> | ||||||
|  |                     </a-col> | ||||||
|  |                   </a-row> | ||||||
|  |                 </a-form-item> | ||||||
|  |                 <a-form-item> | ||||||
|  |                   <a-row justify="center" class="centered"> | ||||||
|  |                     <a-col> | ||||||
|  |                       <a-icon type="bulb" :theme="themeSwitcher.isDarkTheme ? 'filled' : 'outlined'"></a-icon>  | ||||||
|  |                     </a-col> | ||||||
|  |                     <a-col> | ||||||
|  |                       <theme-switch /> | ||||||
|  |                     </a-col> | ||||||
|  |                   </a-row> | ||||||
|  |                 </a-form-item> | ||||||
|  |               </a-form> | ||||||
|  |             </a-col> | ||||||
|  |           </a-row> | ||||||
|  |         </a-col> | ||||||
|  |       </a-row> | ||||||
|  |     </a-layout-content> | ||||||
|  |   </transition> | ||||||
| </a-layout> | </a-layout> | ||||||
| {{template "js" .}} | {{template "js" .}} | ||||||
| {{template "component/themeSwitcher" .}} | {{template "component/themeSwitcher" .}} | ||||||
|  |  | ||||||
|  | @ -263,7 +263,6 @@ | ||||||
|                                         <a-col :lg="24" :xl="12"> |                                         <a-col :lg="24" :xl="12"> | ||||||
|                                             <a-list-item-meta title="Telegram Bot Language" /> |                                             <a-list-item-meta title="Telegram Bot Language" /> | ||||||
|                                         </a-col> |                                         </a-col> | ||||||
| 
 |  | ||||||
|                                         <a-col :lg="24" :xl="12"> |                                         <a-col :lg="24" :xl="12"> | ||||||
|                                             <template> |                                             <template> | ||||||
|                                                 <a-select |                                                 <a-select | ||||||
|  | @ -352,7 +351,7 @@ | ||||||
|                 streamSettings: { |                 streamSettings: { | ||||||
|                     sockopt: { |                     sockopt: { | ||||||
|                         tcpKeepAliveIdle: 100, |                         tcpKeepAliveIdle: 100, | ||||||
|                         TcpNoDelay: true |                         tcpNoDelay: true | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|             }, |             }, | ||||||
|  |  | ||||||
|  | @ -1,14 +1,14 @@ | ||||||
| <!DOCTYPE html> | <!DOCTYPE html> | ||||||
| <html lang="en"> | <html lang="en"> | ||||||
| {{template "head" .}} | {{template "head" .}} | ||||||
| <link rel="stylesheet" href="{{ .base_path }}assets/codemirror/codemirror.css"> | <link rel="stylesheet" href="{{ .base_path }}assets/codemirror/codemirror.css?{{ .cur_ver }}"> | ||||||
| <link rel="stylesheet" href="{{ .base_path }}assets/codemirror/fold/foldgutter.css"> | <link rel="stylesheet" href="{{ .base_path }}assets/codemirror/fold/foldgutter.css"> | ||||||
| <link rel="stylesheet" href="{{ .base_path }}assets/codemirror/xq.css?{{ .cur_ver }}"> | <link rel="stylesheet" href="{{ .base_path }}assets/codemirror/xq.css?{{ .cur_ver }}"> | ||||||
| <link rel="stylesheet" href="{{ .base_path }}assets/codemirror/lint/lint.css"> | <link rel="stylesheet" href="{{ .base_path }}assets/codemirror/lint/lint.css"> | ||||||
| 
 | 
 | ||||||
| <script src="{{ .base_path }}assets/base64/base64.min.js"></script> | <script src="{{ .base_path }}assets/base64/base64.min.js"></script> | ||||||
| <script src="{{ .base_path }}assets/js/model/outbound.js?{{ .cur_ver }}"></script> | <script src="{{ .base_path }}assets/js/model/outbound.js?{{ .cur_ver }}"></script> | ||||||
| <script src="{{ .base_path }}assets/codemirror/codemirror.js"></script> | <script src="{{ .base_path }}assets/codemirror/codemirror.js?{{ .cur_ver }}"></script> | ||||||
| <script src="{{ .base_path }}assets/codemirror/javascript.js"></script> | <script src="{{ .base_path }}assets/codemirror/javascript.js"></script> | ||||||
| <script src="{{ .base_path }}assets/codemirror/jshint.js"></script> | <script src="{{ .base_path }}assets/codemirror/jshint.js"></script> | ||||||
| <script src="{{ .base_path }}assets/codemirror/jsonlint.js"></script> | <script src="{{ .base_path }}assets/codemirror/jsonlint.js"></script> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 MHSanaei
						MHSanaei