const html = require('choo/html'); const { copyToClipboard } = require('../utils'); module.exports = function(name, url) { const dialog = function(state, emit, close) { return html`

${state.translate('notifyUploadEncryptDone')}

${state.translate('copyLinkDescription')}
${name}

`; function copy(event) { event.stopPropagation(); copyToClipboard(url); event.target.textContent = state.translate('copiedUrl'); setTimeout(close, 1000); } }; dialog.type = 'copy'; return dialog; };