Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed filtering for username/Fixed all JSON errors. #64

Merged
merged 2 commits into from Jan 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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