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
|
this.loading = state
|
||||||
}
|
}
|
||||||
|
|
||||||
message(content, isError) {
|
message(content) {
|
||||||
|
if (content) {
|
||||||
|
this.class("form-feedback")
|
||||||
|
} else {
|
||||||
this.removeClass("form-feedback")
|
this.removeClass("form-feedback")
|
||||||
this.removeClass("form-error")
|
}
|
||||||
if (content) this.class("form-feedback")
|
|
||||||
if(isError) this.class("form-error")
|
|
||||||
|
|
||||||
this.messageSpan.text(content)
|
this.messageSpan.text(content)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,10 +80,7 @@ class Form extends ElemJS {
|
||||||
let currentAddress = homeserver.value
|
let currentAddress = homeserver.value
|
||||||
let ok = false
|
let ok = false
|
||||||
while (!ok) {
|
while (!ok) {
|
||||||
if (!currentAddress.match(/^https?:\/\//)) {
|
if (!currentAddress.match(/^https?:\/\//)) currentAddress = "https://" + currentAddress
|
||||||
console.warn(`${currentAddress} doesn't specify the protocol, assuming https`)
|
|
||||||
currentAddress = "https://" + currentAddress
|
|
||||||
}
|
|
||||||
currentAddress = currentAddress.replace(/\/*$/, "")
|
currentAddress = currentAddress.replace(/\/*$/, "")
|
||||||
this.status(`Looking up homeserver... trying ${currentAddress}`)
|
this.status(`Looking up homeserver... trying ${currentAddress}`)
|
||||||
try {
|
try {
|
||||||
|
@ -144,7 +141,7 @@ class Form extends ElemJS {
|
||||||
cancel(message) {
|
cancel(message) {
|
||||||
this.processing = false
|
this.processing = false
|
||||||
feedback.setLoading(false)
|
feedback.setLoading(false)
|
||||||
feedback.message(message, true)
|
feedback.message(message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,9 +38,6 @@
|
||||||
width: 100%
|
width: 100%
|
||||||
margin: -0.5em 0 -0.8em
|
margin: -0.5em 0 -0.8em
|
||||||
|
|
||||||
.form-error
|
|
||||||
color: red
|
|
||||||
|
|
||||||
@keyframes spin
|
@keyframes spin
|
||||||
0%
|
0%
|
||||||
transform: rotate(0deg)
|
transform: rotate(0deg)
|
||||||
|
|
Loading…
Reference in a new issue