Rename login and register urls

This commit is contained in:
JC Brand 2017-10-31 20:39:44 +01:00
parent ad0e457486
commit 61ed55dbaa
4 changed files with 9 additions and 5 deletions

View File

@ -839,7 +839,11 @@
affiliations = [affiliations];
}
return new Promise((resolve, reject) => {
const promises = _.map(affiliations, _.partial(this.requestMemberList, this.model.get('jid')));
const promises = _.map(
affiliations,
_.partial(this.requestMemberList, this.model.get('jid'))
);
Promise.all(promises).then(
_.flow(this.marshallAffiliationIQs.bind(this), resolve),
_.flow(this.marshallAffiliationIQs.bind(this), resolve)

View File

@ -147,8 +147,8 @@
const RegistrationRouter = Backbone.Router.extend({
initialize () {
this.route('converse-login', _.partial(this.setActiveForm, 'login'));
this.route('converse-register', _.partial(this.setActiveForm, 'register'));
this.route('converse/login', _.partial(this.setActiveForm, 'login'));
this.route('converse/register', _.partial(this.setActiveForm, 'register'));
},
setActiveForm (value) {
_converse.api.waitUntil('controlboxInitialized').then(() => {

View File

@ -1,4 +1,4 @@
<div class="switch-form">
<p>{{{ __("Don't have a chat account?") }}}</p>
<p><a class="register-account toggle-register-login" href="#converse-register">{{{__("Create an account")}}}</a></p>
<p><a class="register-account toggle-register-login" href="#converse/register">{{{__("Create an account")}}}</a></p>
</div>

View File

@ -17,6 +17,6 @@
<div class="switch-form">
<p>{{{ __("Already have a chat account?") }}}</p>
<p>
<a class="login-here toggle-register-login" href="#converse-login">{{{__("Log in here")}}}</a>
<a class="login-here toggle-register-login" href="#converse/login">{{{__("Log in here")}}}</a>
</p>
</div>