Fix error component + add GA
This commit is contained in:
parent
6e82b4fa3b
commit
5add55ff3c
6 changed files with 33 additions and 17 deletions
10
package-lock.json
generated
10
package-lock.json
generated
|
@ -8306,7 +8306,7 @@
|
|||
"stringstream": "0.0.5",
|
||||
"tough-cookie": "2.3.3",
|
||||
"tunnel-agent": "0.4.3",
|
||||
"uuid": "3.1.0"
|
||||
"uuid": "3.2.1"
|
||||
}
|
||||
},
|
||||
"require-directory": {
|
||||
|
@ -8835,7 +8835,7 @@
|
|||
"integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==",
|
||||
"requires": {
|
||||
"faye-websocket": "0.10.0",
|
||||
"uuid": "3.1.0"
|
||||
"uuid": "3.2.1"
|
||||
}
|
||||
},
|
||||
"sockjs-client": {
|
||||
|
@ -9833,9 +9833,9 @@
|
|||
"integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
|
||||
},
|
||||
"uuid": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz",
|
||||
"integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g=="
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz",
|
||||
"integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA=="
|
||||
},
|
||||
"validate-npm-package-license": {
|
||||
"version": "3.0.1",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"randombytes": "^2.0.6",
|
||||
"sass-loader": "^6.0.6",
|
||||
"url-loader": "^0.6.2",
|
||||
"uuid": "^3.2.1",
|
||||
"vue": "^2.5.11",
|
||||
"vue-loader": "^13.0.5",
|
||||
"vue-template-compiler": "^2.4.4",
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<!--Error-->
|
||||
<div v-if="error" class="row">
|
||||
<div class="col-md-12">
|
||||
<error :error="error"></error>
|
||||
<err :error="error"></err>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -133,7 +133,9 @@
|
|||
this.workers[w] = new Worker();
|
||||
this.workers[w].onmessage = event => self.parseWorkerMessage(event.data);
|
||||
} catch (err) {
|
||||
this.error = 'local_workers_forbidden';
|
||||
this.error = err;
|
||||
this.status = 'Error';
|
||||
console.error(this.error);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -144,6 +146,7 @@
|
|||
this.stopGen();
|
||||
this.error = wallet.error;
|
||||
this.status = 'Error';
|
||||
console.error(this.error);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<a href="https://github.com/bokub/vanity-eth" target="_blank" aria-label="View source on Github">
|
||||
<img :src="'https://ssl.google-analytics.com/collect?v=1&t=pageview&tid=UA-20226534-16&&dp=%2F&cid=' + cid + '&dr=' + dr + '&sr=' + sr + '&vp=' + vp + '&z=' + new Date().getTime()">
|
||||
<svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true">
|
||||
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z" fill="#fff"></path>
|
||||
<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
|
||||
|
@ -11,7 +12,24 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
export default {}
|
||||
import uuidv1 from 'uuid/v1';
|
||||
|
||||
export default {
|
||||
data: function () {
|
||||
return {
|
||||
cid: localStorage.getItem('cid'),
|
||||
dr: encodeURIComponent(document.referrer),
|
||||
vp: document.documentElement.clientHeight + 'x' + document.documentElement.clientWidth,
|
||||
sr: window.screen.height + 'x' + window.screen.width,
|
||||
}
|
||||
},
|
||||
created: function () {
|
||||
if (!this.cid) {
|
||||
this.cid = uuidv1();
|
||||
localStorage.setItem('cid', this.cid);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
|
@ -20,7 +38,7 @@
|
|||
a
|
||||
&:hover .octo-arm
|
||||
animation: octocat-wave 560ms ease-in-out
|
||||
svg
|
||||
svg, img
|
||||
position: absolute
|
||||
top: 0
|
||||
border: 0
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
<template>
|
||||
<div class="panel">
|
||||
<p v-if="error === 'local_workers_forbidden'">
|
||||
Your browser disallows multi-thread computation when run from a local file.<br>
|
||||
Please use the online version at <a href="https://git.io/veth">git.io/veth</a>, or use a
|
||||
different
|
||||
browser.
|
||||
</p>
|
||||
<p v-else-if="error === 'workers_unsupported'">
|
||||
<p v-if="error === 'workers_unsupported'">
|
||||
Your browser does not support multi-thread computation.<br>
|
||||
Please use a different browser.
|
||||
</p>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<a :href="'https://etherscan.io/address/' + tipsAddress" target="_blank" v-text="tipsAddress"></a>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 links">
|
||||
<a :href="'https://etherscan.io/address/' + tipsAddress" target="_blank">
|
||||
<a :href="'https://etherdonation.com/d?to=' + tipsAddress" target="_blank">
|
||||
<i class="icon-ethereum"></i> Donate
|
||||
</a>
|
||||
<a href="https://github.com/bokub/vanity-eth/stargazers" target="_blank">
|
||||
|
|
Loading…
Add table
Reference in a new issue