Skip to content

Commit

Permalink
Merge pull request #64 from duncannevin/master
Browse files Browse the repository at this point in the history
Removed filtering for username/Fixed all JSON errors.
  • Loading branch information
Internev committed Jan 19, 2017
2 parents 0763415 + a4116d2 commit 5e7c313
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 17 deletions.
5 changes: 0 additions & 5 deletions client/js/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,6 @@ export default {
return eValidate.validate(email);
},

verifyUsername(un) {
// Must contain at least one symbol
return un.match(/^[A-Za-z0-9]+$/) ? false : true;
},

verifyPassword(pw) {
// Minimum 8 characters at least 1 Alphabet, 1 Number and 1 Special Character:
// FishyTreat1!
Expand Down
6 changes: 3 additions & 3 deletions client/js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ module.exports = {
})
},

quillOn(doc) {
quillOn(context, doc) {
this.quill.on('text-change', () => {
let text = this.quill.getText()
let stats = this.textStats(text)
this.time = stats.display
this.count = stats.length
context.time = stats.display
context.count = stats.length

docsave.docData.currentDoc.doc = text;
})
Expand Down
3 changes: 2 additions & 1 deletion client/vue-components/main_content.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@
editor.doc = connection.get('docs', this.uri);
// New quill
editor.makeQuill();
editor.quillOn(editor.doc);
editor.quillOn(this, editor.doc);
editor.docSubscribe(editor.quill, editor.doc);
},
data() {
return {
Expand Down
1 change: 1 addition & 0 deletions client/vue-components/navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import docsave from '../js/docsave.js'
import Signin from './signin.vue'
import Signup from './signup.vue'
export default {
created() {
},
Expand Down
4 changes: 0 additions & 4 deletions client/vue-components/signin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
password: this.credentials.password.trim(),
timestamp: Date.now()
};
if (!auth.verifyUsername(credentials.username)) {
this.error = 'Invalid username!';
return;
}
if (!auth.verifyPassword(credentials.password)) {
this.error = 'Invalid password!'
return;
Expand Down
4 changes: 0 additions & 4 deletions client/vue-components/signup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@
avatar: this.credentials.avatar,
membersince: Date.now()
};
if (!auth.verifyUsername(credentials.username)) {
this.error = 'Username must contain at least one symbol';
return;
}
if (!auth.verifyEmail(credentials.email)) {
this.error = 'Invalid email';
return
Expand Down

0 comments on commit 5e7c313

Please sign in to comment.