Bump deps w/ eslint (#322)

* Bump deps w/ eslint

* theme default
This commit is contained in:
Jaco Greeff
2020-05-24 09:35:43 +02:00
committed by GitHub
parent 050d1966c6
commit 2df46e88ce
26 changed files with 504 additions and 353 deletions
+2 -2
View File
@@ -65,8 +65,8 @@ export const Identicon = Vue.extend({
},
methods: {
createData: function (): void {
this.iconSize = this.size || DEFAULT_SIZE;
this.type = this.theme;
this.iconSize = this.size as number || DEFAULT_SIZE;
this.type = this.theme as 'empty';
this.recodeAddress();
},
@@ -25,7 +25,7 @@ export const Jdenticon = Vue.extend({
},
methods: {
createSvgHtml: function (): void {
this.svgHtml = jdenticon.toSvg(this.publicKey.substr(2), this.size);
this.svgHtml = jdenticon.toSvg((this.publicKey as string).substr(2), this.size);
}
},
props: ['publicKey', 'size'],
+7 -2
View File
@@ -9,6 +9,11 @@ interface Data {
svgHtml: string;
}
interface This {
address: string;
isAlternative?: boolean;
}
/**
* @name Polkadot
* @description The Polkadot default identicon
@@ -25,11 +30,11 @@ export const Polkadot = Vue.extend({
},
methods: {
createSvgHtml: function (): void {
const circles = polkadotIcon(this.address, { isAlternative: this.isAlternative || false }).map(({ cx, cy, fill, r }) =>
const circles = polkadotIcon(this.address, { isAlternative: (this as This).isAlternative || false }).map(({ cx, cy, fill, r }) =>
`<circle cx=${cx} cy=${cy} fill="${fill}" r=${r} />`
).join('');
this.svgHtml = `<svg height=${this.size} viewBox='0 0 64 64' width=${this.size}>${circles}</svg>`;
this.svgHtml = `<svg height=${this.size as number} viewBox='0 0 64 64' width=${this.size as number}>${circles}</svg>`;
}
},
props: ['address', 'isAlternative', 'size'],