mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
Extend from a Signup class to keep hs/is URL logic together
This commit is contained in:
parent
257a65de14
commit
0f34f8b494
@ -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 New Issue
Block a user