mirror of
https://github.com/falk-werner/webfuse
synced 2024-10-27 20:34:10 +00:00
fixes javascript style issues
This commit is contained in:
parent
1dc135fca4
commit
def500fd79
@ -6,51 +6,51 @@ export class ConnectionView {
|
||||
|
||||
this.element = document.createElement("div");
|
||||
|
||||
const a = document.createElement("div");
|
||||
this.element.appendChild(a);
|
||||
const connectBox = document.createElement("div");
|
||||
this.element.appendChild(connectBox);
|
||||
|
||||
const urlLabel = document.createElement("span");
|
||||
urlLabel.textContent = "URL:";
|
||||
a.appendChild(urlLabel);
|
||||
connectBox.appendChild(urlLabel);
|
||||
|
||||
this.urlTextbox = document.createElement("input");
|
||||
this.urlTextbox.type = "text";
|
||||
this.urlTextbox.value = window.location.href.replace(/^http/, "ws");
|
||||
a.appendChild(this.urlTextbox);
|
||||
connectBox.appendChild(this.urlTextbox);
|
||||
|
||||
this.connectButton = document.createElement("input");
|
||||
this.connectButton.type = "button";
|
||||
this.connectButton.value = "connect";
|
||||
this.connectButton.addEventListener("click", () => { this._onConnectButtonClicked(); });
|
||||
a.appendChild(this.connectButton);
|
||||
connectBox.appendChild(this.connectButton);
|
||||
|
||||
|
||||
const b = document.createElement("div");
|
||||
this.element.appendChild(b);
|
||||
const authenticateBox = document.createElement("div");
|
||||
this.element.appendChild(authenticateBox);
|
||||
|
||||
const usernameLabel = document.createElement("span");
|
||||
usernameLabel.textContent = "user:";
|
||||
b.appendChild(usernameLabel);
|
||||
authenticateBox.appendChild(usernameLabel);
|
||||
|
||||
this.usernameTextbox = document.createElement("input");
|
||||
this.usernameTextbox.type = "text";
|
||||
this.usernameTextbox.value = "bob";
|
||||
b.appendChild(this.usernameTextbox);
|
||||
authenticateBox.appendChild(this.usernameTextbox);
|
||||
|
||||
const passwordLabel = document.createElement("span");
|
||||
passwordLabel.textContent = "user:";
|
||||
b.appendChild(passwordLabel);
|
||||
authenticateBox.appendChild(passwordLabel);
|
||||
|
||||
this.passwordTextbox = document.createElement("input");
|
||||
this.passwordTextbox.type = "password";
|
||||
this.passwordTextbox.value = "secret";
|
||||
b.appendChild(this.passwordTextbox);
|
||||
authenticateBox.appendChild(this.passwordTextbox);
|
||||
|
||||
this.authenticateButton = document.createElement("input");
|
||||
this.authenticateButton.type = "button";
|
||||
this.authenticateButton.value = "authenticate";
|
||||
this.authenticateButton.addEventListener("click", () => { this._onAuthenticateButtonClicked(); });
|
||||
b.appendChild(this.authenticateButton);
|
||||
authenticateBox.appendChild(this.authenticateButton);
|
||||
}
|
||||
|
||||
_onConnectButtonClicked() {
|
||||
|
@ -24,7 +24,7 @@ export class Client {
|
||||
};
|
||||
}
|
||||
|
||||
authenticate(type ,credentials) {
|
||||
authenticate(type, credentials) {
|
||||
const request = {
|
||||
"method": "authenticate",
|
||||
"params": [type, credentials],
|
||||
|
Loading…
Reference in New Issue
Block a user