Improve events
This commit is contained in:
parent
c4efe8e80a
commit
160ae209b2
4 changed files with 13 additions and 3 deletions
|
@ -251,6 +251,12 @@
|
||||||
this.countCores();
|
this.countCores();
|
||||||
this.initWorkers();
|
this.initWorkers();
|
||||||
window['benchmark'] = this.benchmark;
|
window['benchmark'] = this.benchmark;
|
||||||
|
|
||||||
|
this.$root.$on('event', (name) => {
|
||||||
|
if (window['umami']) {
|
||||||
|
window['umami'].trackEvent(name, 'click');
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
Enter a short prefix/suffix of your choice, and click ‘generate’ to start.
|
Enter a short prefix/suffix of your choice, and click ‘generate’ to start.
|
||||||
</p>
|
</p>
|
||||||
<div class="shortcut">
|
<div class="shortcut">
|
||||||
<button type="button" class="button-large umami--click--start-now" @click="scrollDown">Start now</button>
|
<button type="button" class="button-large" @click="scrollDown">Start now</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>What's a vanity address?</h2>
|
<h2>What's a vanity address?</h2>
|
||||||
|
@ -66,6 +66,7 @@
|
||||||
methods: {
|
methods: {
|
||||||
scrollDown() {
|
scrollDown() {
|
||||||
this.scrollTo(document.getElementById('input-panel'), -1);
|
this.scrollTo(document.getElementById('input-panel'), -1);
|
||||||
|
this.$root.$emit('event', 'Start now');
|
||||||
},
|
},
|
||||||
scrollTo(element, lastValue) {
|
scrollTo(element, lastValue) {
|
||||||
let currentValue = window.scrollY;
|
let currentValue = window.scrollY;
|
||||||
|
|
|
@ -48,11 +48,11 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-6 col-sm-12">
|
<div class="col-lg-6 col-sm-12">
|
||||||
<input type="button" value="Generate" class="button-large hide-render" disabled>
|
<input type="button" value="Generate" class="button-large hide-render" disabled>
|
||||||
<input type="button" value="Generate" class="button-large hide-prerender umami--click--generate" @click="startGen"
|
<input type="button" value="Generate" class="button-large hide-prerender" @click="startGen"
|
||||||
:disabled="running || inputError || error">
|
:disabled="running || inputError || error">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-6 col-sm-12">
|
<div class="col-lg-6 col-sm-12">
|
||||||
<input type="button" value="Stop" class="button-large umami--click--stop" @click="stopGen" :disabled="!running">
|
<input type="button" value="Stop" class="button-large" @click="stopGen" :disabled="!running">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -106,10 +106,12 @@
|
||||||
startGen: function () {
|
startGen: function () {
|
||||||
if (!this.running && !this.inputError && !this.error) {
|
if (!this.running && !this.inputError && !this.error) {
|
||||||
this.$emit('start');
|
this.$emit('start');
|
||||||
|
this.$root.$emit('event', 'Generate');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
stopGen: function () {
|
stopGen: function () {
|
||||||
this.$emit('stop');
|
this.$emit('stop');
|
||||||
|
this.$root.$emit('event', 'Stop');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
save() {
|
save() {
|
||||||
if (this.password) {
|
if (this.password) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
this.$root.$emit('event', 'Download');
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const wallet = this.generateWallet(this.privateKey, this.password);
|
const wallet = this.generateWallet(this.privateKey, this.password);
|
||||||
|
|
Loading…
Add table
Reference in a new issue