mirror of
				https://github.com/taigrr/wtf
				synced 2025-01-18 04:03:14 -08:00 
			
		
		
		
	Minor cleanup in HIBP module
This commit is contained in:
		
							parent
							
								
									555a1c6def
								
							
						
					
					
						commit
						11a8f396b7
					
				@ -67,16 +67,18 @@ func (widget *Widget) content() (string, string, bool) {
 | 
			
		||||
	if widget.err != nil {
 | 
			
		||||
		return title, widget.err.Error(), true
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	title = title + widget.sinceDateForTitle()
 | 
			
		||||
	str := ""
 | 
			
		||||
 | 
			
		||||
	for _, stat := range widget.data {
 | 
			
		||||
	for _, status := range widget.data {
 | 
			
		||||
		color := widget.settings.colors.ok
 | 
			
		||||
		if stat.HasBeenCompromised() {
 | 
			
		||||
 | 
			
		||||
		if status.HasBeenCompromised() {
 | 
			
		||||
			color = widget.settings.colors.pwned
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		str += fmt.Sprintf(" [%s]%s[white]\n", color, stat.Account)
 | 
			
		||||
		str += fmt.Sprintf(" [%s]%s[white]\n", color, status.Account)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return title, str, false
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user