Compare commits
	
		
			No commits in common. "c8351e8f0c52ea9bb43e7975920ecf036798b8d3" and "ff427d0354320fe0ec4781f2a7916a0d7460ca39" have entirely different histories.
		
	
	
		
			c8351e8f0c
			...
			ff427d0354
		
	
		
					 2 changed files with 8 additions and 14 deletions
				
			
		| 
						 | 
				
			
			@ -50,12 +50,12 @@ class Feedback extends ElemJS {
 | 
			
		|||
		this.loading = state
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	message(content, isError) {
 | 
			
		||||
		this.removeClass("form-feedback")
 | 
			
		||||
		this.removeClass("form-error")
 | 
			
		||||
		if (content) this.class("form-feedback")
 | 
			
		||||
		if(isError) this.class("form-error")
 | 
			
		||||
 | 
			
		||||
	message(content) {
 | 
			
		||||
		if (content) {
 | 
			
		||||
			this.class("form-feedback")
 | 
			
		||||
		} else {
 | 
			
		||||
			this.removeClass("form-feedback")
 | 
			
		||||
		}
 | 
			
		||||
		this.messageSpan.text(content)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -80,10 +80,7 @@ class Form extends ElemJS {
 | 
			
		|||
		let currentAddress = homeserver.value
 | 
			
		||||
		let ok = false
 | 
			
		||||
		while (!ok) {
 | 
			
		||||
			if (!currentAddress.match(/^https?:\/\//)) {
 | 
			
		||||
				console.warn(`${currentAddress} doesn't specify the protocol, assuming https`)
 | 
			
		||||
				currentAddress = "https://" + currentAddress
 | 
			
		||||
		}
 | 
			
		||||
			if (!currentAddress.match(/^https?:\/\//)) currentAddress = "https://" + currentAddress
 | 
			
		||||
			currentAddress = currentAddress.replace(/\/*$/, "")
 | 
			
		||||
			this.status(`Looking up homeserver... trying ${currentAddress}`)
 | 
			
		||||
			try {
 | 
			
		||||
| 
						 | 
				
			
			@ -144,7 +141,7 @@ class Form extends ElemJS {
 | 
			
		|||
	cancel(message) {
 | 
			
		||||
		this.processing = false
 | 
			
		||||
		feedback.setLoading(false)
 | 
			
		||||
		feedback.message(message, true)
 | 
			
		||||
		feedback.message(message)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,9 +38,6 @@
 | 
			
		|||
  width: 100%
 | 
			
		||||
  margin: -0.5em 0 -0.8em
 | 
			
		||||
 | 
			
		||||
.form-error
 | 
			
		||||
  color: red
 | 
			
		||||
 | 
			
		||||
@keyframes spin
 | 
			
		||||
  0%
 | 
			
		||||
    transform: rotate(0deg)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue