From 28274b04ba6d871770fb6220d0df6c7a0d6df56a Mon Sep 17 00:00:00 2001 From: uzVideo <126445083+YYDS678@users.noreply.github.com> Date: Fri, 29 Nov 2024 17:46:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A4=8D=E5=88=B6=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/install.html | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) 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 = ` -
-
${config.title}
- ${config.description ? `
${config.description}
` : ''} -
-
- - -
- ` +
+
${config.title}
+ ${config.description ? `
${config.description}
` : ''} +
+
+ + + +
+ ` container.appendChild(resourceGroup) }) }