-
Notifications
You must be signed in to change notification settings - Fork 98
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
Error collection optin #570
Merged
Merged
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
3b775eb
enable error collection optin
faboweb 864bfe8
change optin wording
faboweb 8a6f542
linted
faboweb 3136a4b
fixed nisession tests
faboweb 95aba40
Merge branch 'fabo/375-ipc' into fabo/552-error-optin
faboweb 4bd5c40
added tests for view error collection opt in
faboweb 6d1e571
added tests for error collection in main thread on/off
faboweb df1365a
improved view error collection tests
faboweb d7f8729
dault to mock electron ipc
faboweb c7db8ac
fixed several tests
faboweb 71a438a
remove default analytics
faboweb db547de
linted
faboweb cb4ff34
removed automatic analytics in vue entry file
faboweb 67a4b3b
minor improvements
faboweb d4a50fd
fixed skipped tests
faboweb 838ea6a
added tests for pageprofile
faboweb 34c7454
removed dead code
faboweb 86579c9
linted
faboweb 205aff2
Merge branch 'develop' into fabo/552-error-optin
faboweb bb06e7d
Update NiSessionImport.vue
faboweb c62a0bc
Update NiSessionSignUp.vue
faboweb c788b53
updated snapshots
faboweb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,14 @@ | |
label.ni-field-checkbox-label(for="sign-up-backup") | ||
| I have securely written down my seed. | ||
form-msg(name='Backup confirmation' type='required' v-if='!$v.fields.signUpBackup.required') | ||
|
||
form-group(field-id="error-collection" field-label=' ') | ||
.ni-field-checkbox | ||
.ni-field-checkbox-input | ||
input#sign-up-warning(type="checkbox" v-model="fields.errorCollection") | ||
label.ni-field-checkbox-label(for="error-collection") | ||
| I'd like to opt in for remote error tracking to help improve Voyager | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and this one. |
||
|
||
.ni-session-footer | ||
btn(icon="arrow_forward" icon-pos="right" value="Next" size="lg" :disabled="creating") | ||
</template> | ||
|
@@ -99,33 +107,48 @@ export default { | |
if (this.$v.$error) return | ||
try { | ||
let key = await this.$store.dispatch('createKey', { | ||
seedPhrase: this.fields.signUpSeed, password: this.fields.signUpPassword, name: this.fields.signUpName | ||
seedPhrase: this.fields.signUpSeed, | ||
password: this.fields.signUpPassword, | ||
name: this.fields.signUpName | ||
}) | ||
if (key) { | ||
this.$store.dispatch('setErrorCollection', { | ||
account: this.fields.signUpName, | ||
optin: this.fields.errorCollection | ||
}) | ||
this.$store.commit('setModalSession', false) | ||
this.$store.commit('notify', { title: 'Signed Up', body: 'Your account has been created.' }) | ||
this.$store.dispatch('signIn', { password: this.fields.signUpPassword, account: this.fields.signUpName }) | ||
this.$store.commit('notify', { | ||
title: 'Signed Up', | ||
body: 'Your account has been created.' | ||
}) | ||
this.$store.dispatch('signIn', { | ||
password: this.fields.signUpPassword, | ||
account: this.fields.signUpName | ||
}) | ||
} | ||
} catch (err) { | ||
this.$store.commit('notifyError', { title: `Couldn't create account`, body: err.message }) | ||
this.$store.commit('notifyError', { | ||
title: `Couldn't create account`, | ||
body: err.message | ||
}) | ||
} | ||
} | ||
}, | ||
mounted () { | ||
this.$el.querySelector('#sign-up-name').focus() | ||
this.$store.dispatch('createSeed') | ||
.then(seedPhrase => { | ||
this.creating = false | ||
this.fields.signUpSeed = seedPhrase | ||
}) | ||
this.$store.dispatch('createSeed').then(seedPhrase => { | ||
this.creating = false | ||
this.fields.signUpSeed = seedPhrase | ||
}) | ||
}, | ||
validations: () => ({ | ||
fields: { | ||
signUpName: { required, minLength: minLength(5) }, | ||
signUpPassword: { required, minLength: minLength(10) }, | ||
signUpPasswordConfirm: { sameAsPassword: sameAs('signUpPassword') }, | ||
signUpWarning: { required }, | ||
signUpBackup: { required } | ||
signUpBackup: { required }, | ||
errorCollection: false | ||
} | ||
}) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// this mocks the IPC layer | ||
jest.mock('electron', () => ({ | ||
ipcRenderer: { send: jest.fn() }, | ||
ipcMain: { on: jest.fn() } | ||
})) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm sorry this is annoying - but there should be a period at the end of this sentence.