default fill blank user instead
This commit is contained in:
		
							parent
							
								
									cf3f8e2cc2
								
							
						
					
					
						commit
						ce137819ab
					
				@ -19,7 +19,7 @@ class G:
 | 
				
			|||||||
	#########
 | 
						#########
 | 
				
			||||||
	title = 'VDI Login'
 | 
						title = 'VDI Login'
 | 
				
			||||||
	backend = 'pve'
 | 
						backend = 'pve'
 | 
				
			||||||
	user = None
 | 
						user = ""
 | 
				
			||||||
	token_name = None
 | 
						token_name = None
 | 
				
			||||||
	token_value = None
 | 
						token_value = None
 | 
				
			||||||
	totp = False
 | 
						totp = False
 | 
				
			||||||
@ -132,10 +132,7 @@ def setmainlayout():
 | 
				
			|||||||
		layout.append([sg.Image(G.imagefile), sg.Text(G.title, size =(18, 1), justification='c', font=["Helvetica", 18])])
 | 
							layout.append([sg.Image(G.imagefile), sg.Text(G.title, size =(18, 1), justification='c', font=["Helvetica", 18])])
 | 
				
			||||||
	else:
 | 
						else:
 | 
				
			||||||
		layout.append([sg.Text(G.title, size =(30, 1), justification='c', font=["Helvetica", 18])])
 | 
							layout.append([sg.Text(G.title, size =(30, 1), justification='c', font=["Helvetica", 18])])
 | 
				
			||||||
	if G.user:
 | 
					 | 
				
			||||||
	layout.append([sg.Text("Username", size =(12, 1), font=["Helvetica", 12]), sg.InputText(default_text=G.user,key='-username-', font=["Helvetica", 12])])
 | 
						layout.append([sg.Text("Username", size =(12, 1), font=["Helvetica", 12]), sg.InputText(default_text=G.user,key='-username-', font=["Helvetica", 12])])
 | 
				
			||||||
	else:
 | 
					 | 
				
			||||||
		layout.append([sg.Text("Username", size =(12, 1), font=["Helvetica", 12]), sg.InputText(key='-username-', font=["Helvetica", 12])])
 | 
					 | 
				
			||||||
	layout.append([sg.Text("Password", size =(12, 1),font=["Helvetica", 12]), sg.InputText(key='-password-', password_char='*', font=["Helvetica", 12])])
 | 
						layout.append([sg.Text("Password", size =(12, 1),font=["Helvetica", 12]), sg.InputText(key='-password-', password_char='*', font=["Helvetica", 12])])
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	if G.totp:
 | 
						if G.totp:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user