Skip to content

Commit

Permalink
Icon fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisreimann committed May 14, 2024
1 parent 2ae0779 commit ba21941
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions BTCPayServer/wwwroot/js/copy-to-clipboard.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
function confirmCopy(el, message) {
const hasIcon = !!el.innerHTML.match('icon-copy')
const hasIcon = !!el.innerHTML.match('icon-actions-copy')
const confirmHTML = `<span class="text-success">${message}</span>`;
if (hasIcon) {
el.innerHTML = el.innerHTML.replace('#copy', '#checkmark');
el.innerHTML = el.innerHTML.replace('#actions-copy', '#checkmark');
} else {
const { width, height } = el.getBoundingClientRect();
el.dataset.clipboardInitial = el.innerHTML;
Expand All @@ -16,7 +16,7 @@ function confirmCopy(el, message) {
}
const timeoutId = setTimeout(function () {
if (hasIcon) {
el.innerHTML = el.innerHTML.replace('#checkmark', '#copy');
el.innerHTML = el.innerHTML.replace('#checkmark', '#actions-copy');
} else if (el.innerHTML === confirmHTML) {
el.innerHTML = el.dataset.clipboardInitial;
}
Expand Down

0 comments on commit ba21941

Please sign in to comment.