mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-05-31 20:21:04 +00:00
Bump dev (incl. eslint fixes) (#302)
* Bump dev (incl. eslint fixes) * Ordering fixes
This commit is contained in:
@@ -14,21 +14,21 @@ interface Data {
|
||||
* @description The Beachball identicon
|
||||
*/
|
||||
export const Beachball = Vue.extend({
|
||||
// eslint-disable-next-line quotes
|
||||
template: `<div v-html="html" />`,
|
||||
props: ['address', 'size'],
|
||||
created: function (): void {
|
||||
this.createHtml();
|
||||
},
|
||||
data: function (): Data {
|
||||
return {
|
||||
// eslint-disable-next-line quotes
|
||||
html: `<div />`
|
||||
};
|
||||
},
|
||||
created: function (): void {
|
||||
this.createHtml();
|
||||
},
|
||||
methods: {
|
||||
createHtml: function (): void {
|
||||
this.html = generate(this.address, this.size).outerHTML;
|
||||
}
|
||||
}
|
||||
},
|
||||
props: ['address', 'size'],
|
||||
// eslint-disable-next-line quotes
|
||||
template: `<div v-html="html" />`
|
||||
});
|
||||
|
||||
@@ -9,10 +9,10 @@ import Vue from 'vue';
|
||||
* @description An empty identicon
|
||||
*/
|
||||
export const Empty = Vue.extend({
|
||||
props: ['size'],
|
||||
template: `
|
||||
<svg :height="size" :width="size" viewBox="0 0 64 64">
|
||||
<circle cx="50%" cy="50%" fill="#eee" r="50%" />
|
||||
</svg>
|
||||
`,
|
||||
props: ['size']
|
||||
`
|
||||
});
|
||||
|
||||
@@ -14,21 +14,21 @@ interface Data {
|
||||
* @description The substrate default via Jdenticon
|
||||
*/
|
||||
export const Jdenticon = Vue.extend({
|
||||
// eslint-disable-next-line quotes
|
||||
template: `<div v-html="svgHtml" />`,
|
||||
props: ['publicKey', 'size'],
|
||||
created: function (): void {
|
||||
this.createSvgHtml();
|
||||
},
|
||||
data: function (): Data {
|
||||
return {
|
||||
// eslint-disable-next-line quotes
|
||||
svgHtml: `<svg viewBox="0 0 64 64" />`
|
||||
};
|
||||
},
|
||||
created: function (): void {
|
||||
this.createSvgHtml();
|
||||
},
|
||||
methods: {
|
||||
createSvgHtml: function (): void {
|
||||
this.svgHtml = jdenticon.toSvg(this.publicKey.substr(2), this.size);
|
||||
}
|
||||
}
|
||||
},
|
||||
props: ['publicKey', 'size'],
|
||||
// eslint-disable-next-line quotes
|
||||
template: `<div v-html="svgHtml" />`
|
||||
});
|
||||
|
||||
@@ -14,18 +14,15 @@ interface Data {
|
||||
* @description The Polkadot default identicon
|
||||
*/
|
||||
export const Polkadot = Vue.extend({
|
||||
// eslint-disable-next-line quotes
|
||||
template: `<div v-html="svgHtml" />`,
|
||||
props: ['address', 'size'],
|
||||
created: function (): void {
|
||||
this.createSvgHtml();
|
||||
},
|
||||
data: function (): Data {
|
||||
return {
|
||||
// eslint-disable-next-line quotes
|
||||
svgHtml: `<svg viewBox="0 0 64 64" />`
|
||||
};
|
||||
},
|
||||
created: function (): void {
|
||||
this.createSvgHtml();
|
||||
},
|
||||
methods: {
|
||||
createSvgHtml: function (): void {
|
||||
const circles = generateIcon(this.address).map(({ cx, cy, fill, r }): string =>
|
||||
@@ -34,5 +31,8 @@ export const Polkadot = Vue.extend({
|
||||
|
||||
this.svgHtml = `<svg height=${this.size} viewBox='0 0 64 64' width=${this.size}>${circles}</svg>`;
|
||||
}
|
||||
}
|
||||
},
|
||||
props: ['address', 'size'],
|
||||
// eslint-disable-next-line quotes
|
||||
template: `<div v-html="svgHtml" />`
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user