diff --git a/html/install.html b/html/install.html index 83b1e5c..d413fe1 100644 --- a/html/install.html +++ b/html/install.html @@ -116,6 +116,18 @@ color: red; margin-top: 10px; } + + .copy-btn { + padding: 8px 15px; + background-color: #28a745; + color: white; + border: none; + border-radius: 4px; + cursor: pointer; + flex-shrink: 0; + min-width: 70px; + text-align: center; + } @@ -216,21 +228,32 @@ window.location.href = finalUrl } + // 添加复制函数 + function copyToClipboard(text) { + navigator.clipboard.writeText(text).then(() => { + alert('已复制到剪贴板'); + }).catch(err => { + console.error('复制失败:', err); + alert('复制失败,请手动复制'); + }); + } + window.onload = function () { const container = document.getElementById('resourcesContainer') configs.forEach((config) => { const resourceGroup = document.createElement('div') resourceGroup.className = 'resource-group' resourceGroup.innerHTML = ` -