diff --git a/components/app.js b/components/app.js
index f79ec28..8876b9e 100644
--- a/components/app.js
+++ b/components/app.js
@@ -170,8 +170,8 @@ function getBuffer(state, id) {
export default class App extends Component {
state = {
connectParams: {
- serverURL: null,
- serverPass: null,
+ url: null,
+ pass: null,
username: null,
realname: null,
nick: null,
@@ -252,11 +252,11 @@ export default class App extends Component {
}
var connectParams = {
- serverURL: proto + "//" + host + path + "socket",
+ url: proto + "//" + host + path + "socket",
};
if (config.server) {
- connectParams.serverURL = config.server.url;
+ connectParams.url = config.server.url;
if (Array.isArray(config.server.autojoin)) {
connectParams.autojoin = config.server.autojoin;
} else {
@@ -276,9 +276,9 @@ export default class App extends Component {
var queryParams = parseQueryString();
if (queryParams.server) {
if (queryParams.server.startsWith("/")) {
- connectParams.serverURL = proto + "//" + host + queryParams.server;
+ connectParams.url = proto + "//" + host + queryParams.server;
} else {
- connectParams.serverURL = queryParams.server;
+ connectParams.url = queryParams.server;
}
}
if (queryParams.nick) {
diff --git a/components/connect-form.js b/components/connect-form.js
index d79c5f2..c83cca4 100644
--- a/components/connect-form.js
+++ b/components/connect-form.js
@@ -2,8 +2,8 @@ import { html, Component } from "../lib/index.js";
export default class ConnectForm extends Component {
state = {
- serverURL: "",
- serverPass: "",
+ url: "",
+ pass: "",
nick: "",
password: "",
rememberMe: false,
@@ -21,7 +21,7 @@ export default class ConnectForm extends Component {
if (props.params) {
this.state = {
...this.state,
- serverURL: props.params.serverURL || "",
+ url: props.params.url || "",
nick: props.params.nick || "",
rememberMe: props.params.autoconnect || false,
username: props.params.username || "",
@@ -45,8 +45,8 @@ export default class ConnectForm extends Component {
}
var params = {
- url: this.state.serverURL,
- pass: this.state.serverPass,
+ url: this.state.url,
+ pass: this.state.pass,
nick: this.state.nick,
autoconnect: this.state.rememberMe,
username: this.state.username,
@@ -57,7 +57,7 @@ export default class ConnectForm extends Component {
if (this.state.password) {
params.saslPlain = {
- username: params.username,
+ username: params.username || params.nick,
password: this.state.password,
};
}
@@ -103,7 +103,7 @@ export default class ConnectForm extends Component {
@@ -121,7 +121,7 @@ export default class ConnectForm extends Component {