Skip to content

Commit

Permalink
PISHPS-293: copy to clipboard fix for shopware 6.6.2.0 (#767)
Browse files Browse the repository at this point in the history
* PISHPS-282: added openapi v3 documentation for store-api and admin-api

* PISHPS-282: removed /api/ and /store-api from routes, documented credit-card endpoints and renamed directory

* PISHPS-282: removed duplicated openapi v3 json files

* PISHPS-293: added fallback for Shopware.Utils.dom.copyToClipboard if unavailable
  • Loading branch information
m-muxfeld-diw authored Jun 28, 2024
1 parent 4da4d84 commit 82bb328
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,20 @@ Component.override('sw-order-detail-general', {
return orderAttributes.getCreditCardAttributes();
},



/**
*
*/
copyPaymentUrlToClipboard() {
let fallback = async function(e) {
await navigator.clipboard.writeText(e)
};

// eslint-disable-next-line no-undef
let clipboard = typeof Shopware.Utils.dom.copyToClipboard === 'function' ? Shopware.Utils.dom.copyToClipboard : fallback;
// eslint-disable-next-line no-undef
Shopware.Utils.dom.copyToClipboard(this.molliePaymentUrl);
clipboard(this.molliePaymentUrl);
this.molliePaymentUrlCopied = true;
},

Expand Down

0 comments on commit 82bb328

Please sign in to comment.