Skip to content

Commit

Permalink
misc waiting list fixes (steemit#1393)
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentine Zavgorodnev authored May 1, 2017
1 parent a8e1674 commit af7eb7c
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions app/components/all.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
@import "./elements/ShareMenu";
@import "./elements/Author";
@import "./elements/UserNames";
@import "./elements/QrKeyView";

// modules
@import "./modules/Header";
Expand Down
1 change: 0 additions & 1 deletion app/components/elements/QrKeyView.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import QRCode from 'react-qr'
require('./QrKeyView.scss');
import { translate } from 'app/Translator';

export default ({type, text, isPrivate, onClose}) => {
Expand Down
2 changes: 1 addition & 1 deletion app/components/pages/CreateAccount.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class CreateAccount extends React.Component {
</div>
</noscript>
{loading && <LoadingIndicator type="circle" />}
<input disabled={submit_btn_disabled} type="submit" className={submit_btn_class} onClick={this.mousePosition} value="Create Account" />
<input disabled={submit_btn_disabled} type="submit" className={submit_btn_class} onClick={this.mousePosition} value="Submit" />
</form>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion db/models/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ module.exports = function (sequelize, DataTypes) {
referrer: DataTypes.STRING,
refcode: DataTypes.STRING,
remote_ip: DataTypes.STRING,
ignored: {type: DataTypes.BOOLEAN}
ignored: {type: DataTypes.BOOLEAN},
created: {type: DataTypes.BOOLEAN}
}, {
tableName: 'accounts',
createdAt : 'created_at',
Expand Down
6 changes: 4 additions & 2 deletions server/api/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export default function useGeneralApi(app) {
posting_key: account.posting_key,
memo_key: account.memo_key,
remote_ip,
referrer: this.session.r
referrer: this.session.r,
created: false
})).catch(error => {
console.error('!!! Can\'t create account wait model in /accounts api', this.session.uid, error);
});
Expand Down Expand Up @@ -201,7 +202,8 @@ export default function useGeneralApi(app) {
posting_key: account.posting_key,
memo_key: account.memo_key,
remote_ip,
referrer: this.session.r
referrer: this.session.r,
created: true
})).catch(error => {
console.error('!!! Can\'t create account model in /accounts api', this.session.uid, error);
});
Expand Down
4 changes: 2 additions & 2 deletions server/app_render.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async function appRender(ctx) {
user = await models.User.findOne({
attributes: ['name', 'email', 'picture_small'],
where: {id: user_id},
include: [{model: models.Account, attributes: ['name', 'ignored']}],
include: [{model: models.Account, attributes: ['name', 'ignored', 'created']}],
logging: false
});
appRender.dbStatus = {ok: true};
Expand All @@ -49,7 +49,7 @@ async function appRender(ctx) {
if (user) {
let account = null;
for (const a of user.Accounts) {
if (!a.ignored) {
if (!a.ignored && a.created !== false) {
account = a.name;
break;
}
Expand Down
3 changes: 2 additions & 1 deletion server/sign_up_pages/enter_confirm_email.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ export default function useEnterAndConfirmEmailPages(app) {
uid: this.session.uid,
name: this.request.query.account,
remote_ip: getRemoteIp(this.request.req),
sign_up_meta: JSON.stringify(data)
sign_up_meta: JSON.stringify(data),
account_status: 'waiting'
});
this.session.user = user.id;
yield models.Identity.create({
Expand Down

0 comments on commit af7eb7c

Please sign in to comment.