Extend from a Signup class to keep hs/is URL logic together
This commit is contained in:
parent
257a65de14
commit
0f34f8b494
1 changed files with 34 additions and 5 deletions
|
@ -3,14 +3,43 @@ var MatrixClientPeg = require("./MatrixClientPeg");
|
|||
var dis = require("./dispatcher");
|
||||
var q = require("q");
|
||||
|
||||
class Register {
|
||||
|
||||
}
|
||||
|
||||
class Login {
|
||||
class Signup {
|
||||
constructor(hsUrl, isUrl) {
|
||||
this._hsUrl = hsUrl;
|
||||
this._isUrl = isUrl;
|
||||
}
|
||||
|
||||
getHomeserverUrl() {
|
||||
return this._hsUrl;
|
||||
}
|
||||
|
||||
getIdentityServerUrl() {
|
||||
return this._isUrl;
|
||||
}
|
||||
|
||||
setHomeserverUrl(hsUrl) {
|
||||
this._hsUrl = hsUrl;
|
||||
}
|
||||
|
||||
setIdentityServerUrl(isUrl) {
|
||||
this._isUrl = isUrl;
|
||||
}
|
||||
}
|
||||
|
||||
class Register extends Signup {
|
||||
constructor(hsUrl, isUrl) {
|
||||
super(hsUrl, isUrl);
|
||||
this._state = "start";
|
||||
}
|
||||
|
||||
getState() {
|
||||
return this._state;
|
||||
}
|
||||
}
|
||||
|
||||
class Login extends Signup {
|
||||
constructor(hsUrl, isUrl) {
|
||||
super(hsUrl, isUrl);
|
||||
this._currentFlowIndex = 0;
|
||||
this._flows = [];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue