added copied text after copy button click

This commit is contained in:
Danny Coates 2018-10-30 15:55:10 -07:00
parent c359678226
commit 891ffc20af
No known key found for this signature in database
GPG Key ID: 4C442633C62E00CB
2 changed files with 8 additions and 2 deletions

View File

@ -157,6 +157,12 @@ module.exports = function(state, emit, archive) {
function copy(event) {
event.stopPropagation();
copyToClipboard(archive.url);
const text = event.target.lastChild;
text.textContent = state.translate('copiedUrl');
setTimeout(
() => (text.textContent = state.translate('copyUrlHover')),
1000
);
}
function del(event) {

View File

@ -8,7 +8,7 @@ function password(state, emit) {
const invalid = fileInfo.password === null;
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
id="password-error"
class="${invalid ? '' : 'invisible'} text-red"
@ -105,7 +105,7 @@ module.exports = function(state, emit) {
return html`
<main class="main container">
<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>
</section>
</main>`;