const html = require('choo/html'); const { copyToClipboard } = require('../utils'); module.exports = function(name, url) { return function(state, emit, close) { return html` ${state.translate('notifyUploadDone')} ${state.translate('copyUrlFormLabel')} ${name} ${state.translate('copyUrlFormButtonText')} ${state.translate('okButton')} `; function copy(event) { event.stopPropagation(); copyToClipboard(url); event.target.textContent = state.translate('copiedUrl'); setTimeout(close, 1000); } }; };
${state.translate('copyUrlFormLabel')} ${name}