@0xecho/button
Advanced tools
Comparing version 0.0.16 to 0.0.17
41
index.js
import Axios from 'axios' | ||
import { setupCache, buildWebStorage } from 'axios-cache-interceptor' | ||
import { v4 as uuidv4 } from 'uuid' | ||
import template from 'lodash.template' | ||
import { createPopper } from '@popperjs/core' | ||
@@ -192,3 +191,3 @@ | ||
getPopoverTemplate() { | ||
this.compilePopoverTemplate = template( | ||
this.compilePopoverTemplate = | ||
` | ||
@@ -227,7 +226,3 @@ <div> | ||
`, | ||
{ | ||
interpolate: /{{([\s\S]+?)}}/g | ||
} | ||
) | ||
` | ||
} | ||
@@ -270,3 +265,3 @@ | ||
div.className = 'echo-popover' | ||
div.innerHTML = this.compilePopoverTemplate({}) | ||
div.innerHTML = this.compilePopoverTemplate | ||
document.body.appendChild(div) | ||
@@ -326,2 +321,3 @@ | ||
placement: 'top', | ||
resize: true, | ||
modifiers: [ | ||
@@ -417,19 +413,14 @@ { | ||
if (this.likers.length) { | ||
let likersHTML = template(`<% likers.forEach(function(liker) { %> | ||
<li class="echo-popover__liker-item"> | ||
<img | ||
class="echo-popover__liker-image" | ||
alt="<%- liker.author.dotbit || liker.author.ens || liker.author.address %>" | ||
title="<%- liker.author.dotbit || liker.author.ens || liker.author.address %>" | ||
width="16" | ||
src="<%- liker.author.avatar || liker.author._avatar %>"> | ||
</li> | ||
<% }); %>`)( | ||
{ | ||
likers: this.likers.slice(0, this.options.maxDisplayLikers) | ||
}, | ||
{ | ||
interpolate: /{{([\s\S]+?)}}/g | ||
} | ||
) | ||
let likersHTML = '' | ||
this.likers.slice(0, this.options.maxDisplayLikers).forEach(liker => { | ||
likersHTML += ` | ||
<li class="echo-popover__liker-item"> | ||
<img | ||
class="echo-popover__liker-image" | ||
alt="${liker.author.dotbit || liker.author.ens || liker.author.address}" | ||
title="${liker.author.dotbit || liker.author.ens || liker.author.address}" | ||
width="16" | ||
src="${liker.author.avatar || liker.author._avatar}"> | ||
</li>` | ||
}) | ||
@@ -436,0 +427,0 @@ if (likeCounts > this.options.maxDisplayLikers) { |
{ | ||
"name": "@0xecho/button", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"dependencies": { | ||
@@ -10,3 +10,2 @@ "@ethersproject/bytes": "^5.7.0", | ||
"axios-cache-interceptor": "^0.10.7", | ||
"lodash.template": "^4.5.0", | ||
"secp256k1": "^5.0.0", | ||
@@ -13,0 +12,0 @@ "sha256-uint8array": "^0.10.3", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
8
515431
2909
- Removedlodash.template@^4.5.0
- Removedlodash._reinterpolate@3.0.0(transitive)
- Removedlodash.template@4.5.0(transitive)
- Removedlodash.templatesettings@4.2.0(transitive)