added copied text after copy button click
This commit is contained in:
parent
c359678226
commit
891ffc20af
2 changed files with 8 additions and 2 deletions
|
@ -157,6 +157,12 @@ module.exports = function(state, emit, archive) {
|
||||||
function copy(event) {
|
function copy(event) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
copyToClipboard(archive.url);
|
copyToClipboard(archive.url);
|
||||||
|
const text = event.target.lastChild;
|
||||||
|
text.textContent = state.translate('copiedUrl');
|
||||||
|
setTimeout(
|
||||||
|
() => (text.textContent = state.translate('copyUrlHover')),
|
||||||
|
1000
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function del(event) {
|
function del(event) {
|
||||||
|
|
|
@ -8,7 +8,7 @@ function password(state, emit) {
|
||||||
const invalid = fileInfo.password === null;
|
const invalid = fileInfo.password === null;
|
||||||
|
|
||||||
const div = html`
|
const div = html`
|
||||||
<div class="h-full flex flex-col items-center justify-center border border-grey-light bg-white">
|
<div class="h-full flex flex-col items-center justify-center border border-grey-light bg-white py-8">
|
||||||
<label
|
<label
|
||||||
id="password-error"
|
id="password-error"
|
||||||
class="${invalid ? '' : 'invisible'} text-red"
|
class="${invalid ? '' : 'invisible'} text-red"
|
||||||
|
@ -105,7 +105,7 @@ module.exports = function(state, emit) {
|
||||||
return html`
|
return html`
|
||||||
<main class="main container">
|
<main class="main container">
|
||||||
<section class="relative h-full w-full px-6 md:flex md:flex-row">
|
<section class="relative h-full w-full px-6 md:flex md:flex-row">
|
||||||
<div class="pt-4 md:mr-6 md:pb-4 md:w-1/2">${content}</div>
|
<div class="py-4 md:mr-6 md:w-1/2">${content}</div>
|
||||||
<div class="py-4 md:w-1/2">${intro(state)}</div>
|
<div class="py-4 md:w-1/2">${intro(state)}</div>
|
||||||
</section>
|
</section>
|
||||||
</main>`;
|
</main>`;
|
||||||
|
|
Loading…
Reference in a new issue