Guardar una copia del texto original para usarla cuando la función de copia se haya resuelto con éxito
This commit is contained in:
parent
dff80b7a90
commit
a049a7c61e
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2021 DigitalOcean
|
||||
Copyright 2022 DigitalOcean
|
||||
|
||||
This code is licensed under the MIT License.
|
||||
You may obtain a copy of the License at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 DigitalOcean
|
||||
Copyright 2022 DigitalOcean
|
||||
|
||||
This code is licensed under the MIT License.
|
||||
You may obtain a copy of the License at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2021 DigitalOcean
|
||||
Copyright 2022 DigitalOcean
|
||||
|
||||
This code is licensed under the MIT License.
|
||||
You may obtain a copy of the License at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2021 DigitalOcean
|
||||
Copyright 2022 DigitalOcean
|
||||
|
||||
This code is licensed under the MIT License.
|
||||
You may obtain a copy of the License at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2021 DigitalOcean
|
||||
Copyright 2022 DigitalOcean
|
||||
|
||||
This code is licensed under the MIT License.
|
||||
You may obtain a copy of the License at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 DigitalOcean
|
||||
Copyright 2022 DigitalOcean
|
||||
|
||||
This code is licensed under the MIT License.
|
||||
You may obtain a copy of the License at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2021 DigitalOcean
|
||||
Copyright 2022 DigitalOcean
|
||||
|
||||
This code is licensed under the MIT License.
|
||||
You may obtain a copy of the License at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2020 DigitalOcean
|
||||
Copyright 2022 DigitalOcean
|
||||
|
||||
This code is licensed under the MIT License.
|
||||
You may obtain a copy of the License at
|
||||
|
|
|
@ -151,9 +151,9 @@ THE SOFTWARE.
|
|||
},
|
||||
setupCopy(elm) {
|
||||
|
||||
const resetText = () => {
|
||||
const resetText = (originalText) => {
|
||||
setTimeout(() => {
|
||||
elm.textContent = this.$t('templates.setup.copyBase64');
|
||||
elm.textContent = originalText;
|
||||
}, 5000);
|
||||
};
|
||||
|
||||
|
@ -162,9 +162,10 @@ THE SOFTWARE.
|
|||
});
|
||||
|
||||
clipboard.on('success', e => {
|
||||
const originalTextCopy = elm.textContent;
|
||||
elm.textContent = this.$tm('templates.app.copied');
|
||||
e.clearSelection();
|
||||
resetText();
|
||||
resetText(originalTextCopy);
|
||||
});
|
||||
|
||||
clipboard.on('error', () => {
|
||||
|
|
Loading…
Reference in New Issue