feat: add uninstall.sh for one-click uninstall

This commit is contained in:
dongsheng123132
2026-04-13 18:17:14 +08:00
parent c6e87b8183
commit 49b875b081
8 changed files with 133 additions and 447 deletions

View File

@@ -309,61 +309,6 @@
.hidden { display: none !important; }
/* Daily section */
.daily-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
gap: 24px;
margin-bottom: 32px;
}
.daily-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 16px;
padding: 28px;
transition: border-color 0.2s;
}
.daily-card:hover { border-color: var(--accent); }
.daily-card-header {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 14px;
}
.daily-date {
text-align: center;
color: var(--text-dim);
font-size: 14px;
margin-bottom: 32px;
}
.daily-history {
margin-top: 32px;
}
.daily-history-toggle {
display: block;
width: 100%;
background: transparent;
border: 1px solid var(--border);
color: var(--text-dim);
padding: 10px;
border-radius: 10px;
cursor: pointer;
font-size: 14px;
transition: all 0.2s;
}
.daily-history-toggle:hover { border-color: var(--accent); color: var(--text); }
.daily-history-list { display: none; margin-top: 20px; }
.daily-history-list.open { display: block; }
.daily-history-item {
border-top: 1px solid var(--border);
padding: 20px 0;
}
.daily-history-item-date {
font-size: 13px;
color: var(--text-dim);
margin-bottom: 12px;
}
@media (max-width: 640px) {
.stats { gap: 24px; }
.hero-cta { flex-direction: column; align-items: center; }
@@ -403,18 +348,6 @@
<span class="zh">🖥️ 远程控制</span>
<span class="en hidden">🖥️ Remote Control</span>
</a>
<a href="#contact" class="btn btn-outline" style="border-color:var(--green);color:var(--green);">
<span class="zh">🛒 购买虾盘 U-Claw</span>
<span class="en hidden">🛒 Buy U-Claw USB</span>
</a>
<a href="#" class="btn btn-outline" style="opacity:0.5;cursor:not-allowed;" onclick="return false;">
<span class="zh">🖥 虾盘 MiniPC即将推出</span>
<span class="en hidden">🖥 MiniPC (Coming Soon)</span>
</a>
<a href="https://cloud.u-claw.org/" target="_blank" class="btn btn-outline">
<span class="zh">☁️ 虾盘云 API</span>
<span class="en hidden">☁️ Cloud API</span>
</a>
</div>
<div class="stats">
@@ -697,63 +630,6 @@
</div>
</section>
<!-- Daily Tip & Case -->
<section id="daily" style="border-top: 1px solid var(--border); padding-top: 80px;">
<h2>
<span class="zh">每日精选</span>
<span class="en hidden">Daily Picks</span>
</h2>
<p class="section-sub">
<span class="zh">每天更新 · OpenClaw / U-Claw 使用技巧与最佳案例</span>
<span class="en hidden">Updated daily · Tips &amp; best-practice cases for OpenClaw / U-Claw</span>
</p>
<div id="daily-date" class="daily-date"></div>
<div id="daily-loading" style="text-align:center;color:var(--text-dim);padding:40px 0;">
<span class="zh">加载中…</span><span class="en hidden">Loading…</span>
</div>
<div id="daily-content" style="display:none;">
<div class="daily-grid">
<!-- Tip card -->
<div class="daily-card">
<div class="daily-card-header">
<span class="tag tag-blue" style="margin-bottom:0;">
<span class="zh">技巧</span><span class="en hidden">Tip</span>
</span>
</div>
<h3 id="tip-title" style="font-size:18px;margin-bottom:10px;"></h3>
<p id="tip-content" style="color:var(--text-dim);font-size:14px;line-height:1.8;"></p>
</div>
<!-- Case card -->
<div class="daily-card">
<div class="daily-card-header">
<span class="tag tag-green" style="margin-bottom:0;">
<span class="zh">案例</span><span class="en hidden">Case</span>
</span>
</div>
<h3 id="case-title" style="font-size:18px;margin-bottom:10px;"></h3>
<p id="case-content" style="color:var(--text-dim);font-size:14px;line-height:1.8;"></p>
</div>
</div>
<!-- History -->
<div class="daily-history">
<button class="daily-history-toggle" onclick="toggleDailyHistory(this)">
<span class="zh">查看最近 7 天历史 ▼</span>
<span class="en hidden">Recent 7 days history ▼</span>
</button>
<div class="daily-history-list" id="daily-history-list"></div>
</div>
</div>
<div id="daily-error" style="display:none;text-align:center;color:var(--text-dim);padding:40px 0;">
<span class="zh">内容暂时无法加载,请稍后刷新</span>
<span class="en hidden">Content unavailable, please refresh later</span>
</div>
</section>
<!-- CTA -->
<div class="cta-section">
<h2>
@@ -773,23 +649,11 @@
<span class="zh">📖 查看文档</span>
<span class="en hidden">📖 Documentation</span>
</a>
<a href="#contact" class="btn btn-outline" style="border-color:var(--green);color:var(--green);">
<span class="zh">🛒 购买虾盘 U-Claw</span>
<span class="en hidden">🛒 Buy U-Claw USB</span>
</a>
<a href="#" class="btn btn-outline" style="opacity:0.5;cursor:not-allowed;" onclick="return false;">
<span class="zh">🖥 虾盘 MiniPC即将推出</span>
<span class="en hidden">🖥 MiniPC (Coming Soon)</span>
</a>
<a href="https://cloud.u-claw.org/" target="_blank" class="btn btn-outline">
<span class="zh">☁️ 虾盘云 API</span>
<span class="en hidden">☁️ Cloud API</span>
</a>
</div>
</div>
<!-- Contact -->
<section id="contact">
<section>
<h2>
<span class="zh">联系我们</span>
<span class="en hidden">Contact</span>
@@ -798,32 +662,6 @@
<span class="zh">问题反馈、合作交流、技术咨询</span>
<span class="en hidden">Feedback, collaboration, technical support</span>
</p>
<div style="max-width:560px;margin:0 auto 32px;padding:20px 24px;border:1px solid #f5a623;border-radius:12px;background:rgba(245,166,35,0.07);text-align:center;">
<p style="font-size:17px;font-weight:700;margin-bottom:8px;">
<span class="zh">🚀 购买 2.0 商业版虾盘</span>
<span class="en hidden">🚀 Buy U-Claw 2.0 (Commercial)</span>
</p>
<p style="font-size:14px;color:var(--text-dim);margin-bottom:14px;">
<span class="zh">本地模型离线运行 · 无需 API · 附赠 AI 陪跑服务</span>
<span class="en hidden">On-device local model · Offline · AI onboarding included</span>
</p>
<div style="display:flex;gap:12px;justify-content:center;flex-wrap:wrap;">
<a href="https://e.tb.cn/h.ij8LYYB0cZPkNHw?tk=FMo05XEJYk0" target="_blank"
style="display:inline-block;padding:10px 28px;background:#f5a623;color:#000;font-weight:700;border-radius:8px;text-decoration:none;font-size:15px;">
<span class="zh">🛒 淘宝购买</span>
<span class="en hidden">🛒 Taobao</span>
</a>
<a href="https://mobile.yangkeduo.com/goods1.html?ps=WaQeS00tDn" target="_blank"
style="display:inline-block;padding:10px 28px;background:#e02e2e;color:#fff;font-weight:700;border-radius:8px;text-decoration:none;font-size:15px;">
<span class="zh">🛒 拼多多购买</span>
<span class="en hidden">🛒 Pinduoduo</span>
</a>
</div>
<p style="margin-top:10px;font-size:13px;color:var(--text-dim);">
<span class="zh">淘宝口令 <code>HU293</code> · 微信下单:<strong>hecare888</strong></span>
<span class="en hidden">Taobao code <code>HU293</code> · WeChat: <strong>hecare888</strong></span>
</p>
</div>
<div style="display: flex; flex-wrap: wrap; gap: 40px; justify-content: center; align-items: center;">
<div style="text-align: center;">
<img src="wechat-qr.jpg" alt="WeChat QR" style="width: 200px; height: 200px; border-radius: 12px; border: 1px solid var(--border);">
@@ -854,10 +692,18 @@
<span style="color: var(--text-dim);">GitHub:</span>
<a href="https://github.com/dongsheng123132" style="color: var(--accent); text-decoration: none;">dongsheng123132</a>
</p>
<p style="font-size: 16px;">
<p style="margin-bottom: 16px; font-size: 16px;">
<span style="color: var(--text-dim);">Website:</span>
<a href="https://u-claw.org" style="color: var(--accent); text-decoration: none;">u-claw.org</a>
</p>
<p style="margin-bottom: 16px; font-size: 16px;">
<span style="color: var(--text-dim);">Telegram:</span>
<a href="https://t.me/dsds8848" style="color: var(--accent); text-decoration: none;">@dsds8848</a>
</p>
<p style="font-size: 16px;">
<span style="color: var(--text-dim);">Twitter/X:</span>
<a href="https://x.com/Bitplus888" style="color: var(--accent); text-decoration: none;">@Bitplus888</a>
</p>
</div>
</div>
</section>
@@ -875,7 +721,8 @@
<a href="agent.html">远程控制</a> ·
<a href="https://github.com/openclaw/openclaw">OpenClaw</a> ·
<a href="mailto:hefangsheng@gmail.com">hefangsheng@gmail.com</a> ·
<a href="https://cloud.u-claw.org/" target="_blank" style="color:inherit;">虾盘云 API</a>
<a href="https://t.me/dsds8848">Telegram</a> ·
<a href="https://x.com/Bitplus888">Twitter/X</a>
</p>
</footer>
@@ -886,81 +733,7 @@ function switchLang(lang) {
document.getElementById('btn-zh').classList.toggle('active', lang === 'zh');
document.getElementById('btn-en').classList.toggle('active', lang === 'en');
document.documentElement.lang = lang === 'zh' ? 'zh-CN' : 'en';
// Re-render daily content text after lang switch
if (window._dailyData) renderDaily(window._dailyData);
}
function getCurrentLang() {
return document.getElementById('btn-zh').classList.contains('active') ? 'zh' : 'en';
}
function t(obj) {
const lang = getCurrentLang();
return obj ? (obj[lang] || obj.zh || '') : '';
}
function renderDaily(data) {
const lang = getCurrentLang();
const latest = data.latest;
if (!latest) return;
document.getElementById('daily-date').textContent =
lang === 'zh' ? `更新日期:${latest.date}` : `Updated: ${latest.date}`;
document.getElementById('tip-title').textContent = t(latest.tip.title);
document.getElementById('tip-content').textContent = t(latest.tip.content);
document.getElementById('case-title').textContent = t(latest.case.title);
document.getElementById('case-content').textContent = t(latest.case.content);
// History (up to 7 entries)
const histList = document.getElementById('daily-history-list');
const recent = (data.history || []).slice(0, 7);
histList.innerHTML = recent.map(entry => `
<div class="daily-history-item">
<div class="daily-history-item-date">${entry.date}</div>
<div class="daily-grid" style="margin-bottom:0;">
<div class="daily-card">
<div class="daily-card-header">
<span class="tag tag-blue" style="margin-bottom:0;">${t(entry.tip.tag)}</span>
</div>
<h3 style="font-size:16px;margin-bottom:8px;">${t(entry.tip.title)}</h3>
<p style="color:var(--text-dim);font-size:13px;line-height:1.8;">${t(entry.tip.content)}</p>
</div>
<div class="daily-card">
<div class="daily-card-header">
<span class="tag tag-green" style="margin-bottom:0;">${t(entry.case.tag)}</span>
</div>
<h3 style="font-size:16px;margin-bottom:8px;">${t(entry.case.title)}</h3>
<p style="color:var(--text-dim);font-size:13px;line-height:1.8;">${t(entry.case.content)}</p>
</div>
</div>
</div>`).join('');
}
function toggleDailyHistory(btn) {
const list = document.getElementById('daily-history-list');
const open = list.classList.toggle('open');
const lang = getCurrentLang();
if (lang === 'zh') {
btn.querySelector('.zh').textContent = open ? '收起历史 ▲' : '查看最近 7 天历史 ▼';
} else {
btn.querySelector('.en').textContent = open ? 'Collapse history ▲' : 'Recent 7 days history ▼';
}
}
// Load daily data
fetch('daily/data.json?v=' + Date.now())
.then(r => r.json())
.then(data => {
window._dailyData = data;
document.getElementById('daily-loading').style.display = 'none';
document.getElementById('daily-content').style.display = 'block';
renderDaily(data);
})
.catch(() => {
document.getElementById('daily-loading').style.display = 'none';
document.getElementById('daily-error').style.display = 'block';
});
</script>
</body>
</html>