clawaid 1.1.4 โ 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/index.html +79 -30
package/package.json
CHANGED
package/web/index.html
CHANGED
|
@@ -209,15 +209,15 @@
|
|
|
209
209
|
|
|
210
210
|
<div class="hdr">
|
|
211
211
|
<div class="logo">๐ฆ๐ฉน</div>
|
|
212
|
-
<h1>ClawAid</h1>
|
|
213
|
-
<p>Automatic diagnostics & repair for OpenClaw</p>
|
|
212
|
+
<h1 id="hdr-title">ClawAid</h1>
|
|
213
|
+
<p id="hdr-subtitle">Automatic diagnostics & repair for OpenClaw</p>
|
|
214
214
|
</div>
|
|
215
215
|
|
|
216
216
|
<!-- Start screen -->
|
|
217
217
|
<div id="start-screen">
|
|
218
218
|
<div class="start-card">
|
|
219
|
-
<p>ClawAid reads your OpenClaw config, gateway status, and logs to find and fix problems.</p>
|
|
220
|
-
<ul>
|
|
219
|
+
<p id="privacy-text">ClawAid reads your OpenClaw config, gateway status, and logs to find and fix problems.</p>
|
|
220
|
+
<ul id="privacy-list">
|
|
221
221
|
<li>API keys are redacted before leaving your machine</li>
|
|
222
222
|
<li>Data is sent to our diagnostic service โ never stored</li>
|
|
223
223
|
<li>All commands run locally on your machine</li>
|
|
@@ -242,6 +242,55 @@
|
|
|
242
242
|
const feed = document.getElementById('feed');
|
|
243
243
|
const startScreen = document.getElementById('start-screen');
|
|
244
244
|
|
|
245
|
+
// โโโ i18n โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
246
|
+
const isZh = /^zh/i.test(navigator.language || '');
|
|
247
|
+
const T = {
|
|
248
|
+
startScan: isZh ? '๐ฉบ ๅผๅงๆซๆ' : '๐ฉบ Start Scan',
|
|
249
|
+
title: 'ClawAid',
|
|
250
|
+
subtitle: isZh ? 'ไธๆกๅฝไปค๏ผ่ชๅจ่ฏๆญๅนถไฟฎๅค OpenClaw' : 'One command to diagnose and fix OpenClaw',
|
|
251
|
+
privacy: isZh ? 'ClawAid ไผ่ฏปๅไฝ ็ OpenClaw ้
็ฝฎใgateway ็ถๆๅๆฅๅฟๆฅ่ฏๆญ้ฎ้ขใ' : 'ClawAid reads your OpenClaw config, gateway status, and logs to find and fix problems.',
|
|
252
|
+
scanning: isZh ? 'ๆญฃๅจๆซๆไฝ ็็ณป็ป...' : 'Scanning your system...',
|
|
253
|
+
scanned: isZh ? '็ณป็ปๆฐๆฎๅทฒๆถ้' : 'System data collected',
|
|
254
|
+
allClear: isZh ? 'ไธๅๆญฃๅธธ๏ผ' : 'All clear!',
|
|
255
|
+
fixed: isZh ? 'ๅทฒไฟฎๅค๏ผ' : 'Fixed!',
|
|
256
|
+
notFixed: isZh ? 'ๆ ๆณ่ชๅจไฟฎๅค' : "Couldn't fix automatically",
|
|
257
|
+
healthyDesc: isZh ? 'ไฝ ็ OpenClaw ่ฟ่กๆญฃๅธธใ' : 'Your OpenClaw is running normally.',
|
|
258
|
+
fixedDesc: isZh ? 'OpenClaw ๅทฒไฟฎๅคใ' : 'OpenClaw has been repaired.',
|
|
259
|
+
notFixedDesc: isZh ? 'ๅคๆฌกๅฐ่ฏๅ้ฎ้ขไป็ถๅญๅจใ' : 'After multiple attempts, the issue persists.',
|
|
260
|
+
scanAgain: isZh ? '๐ ้ๆฐๆซๆ' : '๐ Scan Again',
|
|
261
|
+
tryAgain: isZh ? '๐ ๅ่ฏไธๆฌก' : '๐ Try Again',
|
|
262
|
+
warnings: isZh ? 'โ ๏ธ ๅ
ถไป้่ฆๆณจๆ็' : 'โ ๏ธ Other things to know',
|
|
263
|
+
wasHelpful: isZh ? '้ฎ้ข่งฃๅณไบๅ๏ผ' : 'Was this helpful?',
|
|
264
|
+
feedbackYes: isZh ? '๐ ่งฃๅณไบ' : '๐ Yes',
|
|
265
|
+
feedbackNo: isZh ? '๐ ๆฒก่งฃๅณ' : '๐ No',
|
|
266
|
+
thanksYes: isZh ? 'ๅคชๅฅฝไบ๏ผๅพ้ซๅ
ดๅธฎๅฐไฝ ๐' : 'Thanks! Glad it helped ๐',
|
|
267
|
+
thanksNo: isZh ? 'ๆฑๆญๆฒก่งฃๅณ๏ผ่็ณปๆไปฌๅธฎไฝ ๆๅฎ ๐' : "Sorry to hear that. Reach out below โ we'll help! ๐",
|
|
268
|
+
contact: isZh ? '๐ฌ ๆ้ฎ้ข๏ผ' : '๐ฌ Questions or feedback?',
|
|
269
|
+
allowQ: isZh ? '่ฟๅฐไฟฎๆนไฝ ็็ณป็ป๏ผๅ
่ฎธๆง่กๅ๏ผ' : 'This will modify your system. Allow?',
|
|
270
|
+
allow: isZh ? 'โ ๅ
่ฎธ' : 'โ Allow',
|
|
271
|
+
skip: isZh ? '่ทณ่ฟ' : 'Skip',
|
|
272
|
+
whatsWrong: isZh ? '้ๅฐไปไน้ฎ้ข๏ผ' : "What's going on?",
|
|
273
|
+
descHint: isZh ? 'ๆ่ฟฐไฝ ็้ฎ้ข๏ผๆ่
็ดๆฅๆซๆโโClawAid ไผ่ชๅจ่ฏๆญใ' : 'Describe the problem, or just scan โ ClawAid will figure it out.',
|
|
274
|
+
descPlaceholder: isZh ? 'ไพๅฆ๏ผๆดๆฐๅ OpenClaw ๅฐฑไธๅๅบไบ...๏ผๅฏ้๏ผ' : 'e.g. OpenClaw stopped responding after I updated... (optional)',
|
|
275
|
+
sendDiagnose: isZh ? '๐ ๅ้ๅนถ่ฏๆญ' : '๐ Send & diagnose',
|
|
276
|
+
justScan: isZh ? '๐ ็ดๆฅๆซๆไฟฎๅค' : '๐ Just scan & fix',
|
|
277
|
+
privacyList: isZh
|
|
278
|
+
? ['API ๅฏ้ฅๅจๅ้ๅๅทฒ่ฑๆ', 'ๆฐๆฎๅ้ๅฐ่ฏๆญๆๅก๏ผไธไผๅญๅจ', 'ๆๆๅฝไปคๅจไฝ ็ๆฌๆบๆง่ก']
|
|
279
|
+
: ['API keys are redacted before leaving your machine', 'Data is sent to our diagnostic service โ never stored', 'All commands run locally on your machine'],
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
// Apply i18n to static elements
|
|
283
|
+
if (isZh) {
|
|
284
|
+
const sub = document.getElementById('hdr-subtitle');
|
|
285
|
+
if (sub) sub.textContent = '่ชๅจ่ฏๆญๅนถไฟฎๅค OpenClaw';
|
|
286
|
+
const pv = document.getElementById('privacy-text');
|
|
287
|
+
if (pv) pv.textContent = T.privacy;
|
|
288
|
+
const pl = document.getElementById('privacy-list');
|
|
289
|
+
if (pl) pl.innerHTML = T.privacyList.map(t => '<li>' + t + '</li>').join('');
|
|
290
|
+
const btn = document.getElementById('btn-start');
|
|
291
|
+
if (btn) btn.textContent = T.startScan;
|
|
292
|
+
}
|
|
293
|
+
|
|
245
294
|
// โโโ Helpers โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
246
295
|
|
|
247
296
|
function esc(s) {
|
|
@@ -251,8 +300,8 @@
|
|
|
251
300
|
function sendFeedback(value, btn) {
|
|
252
301
|
const container = btn.parentElement;
|
|
253
302
|
container.innerHTML = value === 'yes'
|
|
254
|
-
? '<span style="color:#34a853;font-size:13px;">
|
|
255
|
-
: '<span style="color:#ea4335;font-size:13px;">
|
|
303
|
+
? '<span style="color:#34a853;font-size:13px;">' + T.thanksYes + '</span>'
|
|
304
|
+
: '<span style="color:#ea4335;font-size:13px;">' + T.thanksNo + '</span>';
|
|
256
305
|
fetch('/api/feedback', {
|
|
257
306
|
method: 'POST',
|
|
258
307
|
headers: { 'Content-Type': 'application/json' },
|
|
@@ -331,9 +380,9 @@
|
|
|
331
380
|
bar.className = 'confirm-bar' + (risk === 'high' ? ' risk-high' : '');
|
|
332
381
|
bar.id = 'confirm-bar-' + index;
|
|
333
382
|
bar.innerHTML = `
|
|
334
|
-
<span style="font-size:13px; color:var(--text); flex:1;"
|
|
335
|
-
<button class="btn btn-green" id="btn-yes-${index}"
|
|
336
|
-
<button class="btn btn-ghost" id="btn-no-${index}"
|
|
383
|
+
<span style="font-size:13px; color:var(--text); flex:1;">${T.allowQ}</span>
|
|
384
|
+
<button class="btn btn-green" id="btn-yes-${index}">${T.allow}</button>
|
|
385
|
+
<button class="btn btn-ghost" id="btn-no-${index}">${T.skip}</button>
|
|
337
386
|
`;
|
|
338
387
|
card.appendChild(bar);
|
|
339
388
|
card.classList.add('open'); // auto-expand so user sees what's about to run
|
|
@@ -359,7 +408,7 @@
|
|
|
359
408
|
div.innerHTML = `
|
|
360
409
|
<div class="step-top" onclick="this.parentElement.classList.toggle('open')">
|
|
361
410
|
<div class="step-icon">๐ก</div>
|
|
362
|
-
<div class="step-title" id="scan-title"
|
|
411
|
+
<div class="step-title" id="scan-title">${T.scanning}</div>
|
|
363
412
|
<div class="step-status" id="scan-status"><div class="spinner"></div></div>
|
|
364
413
|
</div>
|
|
365
414
|
<div class="step-detail" id="scan-detail"></div>
|
|
@@ -371,14 +420,14 @@
|
|
|
371
420
|
const el = document.getElementById('scan-status');
|
|
372
421
|
if (el) el.innerHTML = 'โ';
|
|
373
422
|
const title = document.getElementById('scan-title');
|
|
374
|
-
if (title) title.textContent =
|
|
423
|
+
if (title) title.textContent = T.scanned;
|
|
375
424
|
}
|
|
376
425
|
|
|
377
426
|
// โโโ Result cards โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
378
427
|
|
|
379
428
|
function renderWarnings(warnings) {
|
|
380
429
|
if (!warnings || warnings.length === 0) return '';
|
|
381
|
-
let html = '<div class="warnings-list"><div class="warnings-title"
|
|
430
|
+
let html = '<div class="warnings-list"><div class="warnings-title">' + T.warnings + '</div>';
|
|
382
431
|
for (const w of warnings) {
|
|
383
432
|
html += `<div class="warning-item"><span class="wi-icon">๐ก</span><span class="wi-text">${esc(w)}</span><button class="wi-dismiss" title="Dismiss" onclick="(function(btn){var item=btn.closest('.warning-item');item.classList.add('dismissing');setTimeout(function(){item.remove();},300);})(this)">ร</button></div>`;
|
|
384
433
|
}
|
|
@@ -393,13 +442,13 @@
|
|
|
393
442
|
|
|
394
443
|
const feedbackHtml = `
|
|
395
444
|
<div style="margin-top:18px;padding:14px;background:#f8f9fa;border-radius:10px;border:1px solid #e0e0e0;">
|
|
396
|
-
<div style="font-size:13px;color:#555;margin-bottom:8px;"
|
|
445
|
+
<div style="font-size:13px;color:#555;margin-bottom:8px;">${T.wasHelpful}</div>
|
|
397
446
|
<div style="display:flex;gap:8px;margin-bottom:12px;">
|
|
398
|
-
<button class="btn btn-ghost" onclick="sendFeedback('yes',this)" style="flex:1;"
|
|
399
|
-
<button class="btn btn-ghost" onclick="sendFeedback('no',this)" style="flex:1;"
|
|
447
|
+
<button class="btn btn-ghost" onclick="sendFeedback('yes',this)" style="flex:1;">${T.feedbackYes}</button>
|
|
448
|
+
<button class="btn btn-ghost" onclick="sendFeedback('no',this)" style="flex:1;">${T.feedbackNo}</button>
|
|
400
449
|
</div>
|
|
401
450
|
<div style="font-size:12px;color:#888;line-height:1.5;">
|
|
402
|
-
|
|
451
|
+
${T.contact}<br>
|
|
403
452
|
WeChat: <b>oliver56666</b> ยท <a href="https://github.com/jjj5666/clawaid/issues" target="_blank" style="color:#1a73e8;">GitHub Issues</a>
|
|
404
453
|
</div>
|
|
405
454
|
</div>
|
|
@@ -408,29 +457,29 @@
|
|
|
408
457
|
if (data.healthy) {
|
|
409
458
|
div.innerHTML = `
|
|
410
459
|
<div class="result-icon">๐</div>
|
|
411
|
-
<div class="result-title"
|
|
412
|
-
<div class="result-desc">${esc(data.summary ||
|
|
460
|
+
<div class="result-title">${T.allClear}</div>
|
|
461
|
+
<div class="result-desc">${esc(data.summary || T.healthyDesc)}</div>
|
|
413
462
|
${warningsHtml}
|
|
414
463
|
${feedbackHtml}
|
|
415
|
-
<button class="btn btn-ghost btn-big" onclick="location.reload()" style="margin-top:14px;"
|
|
464
|
+
<button class="btn btn-ghost btn-big" onclick="location.reload()" style="margin-top:14px;">${T.scanAgain}</button>
|
|
416
465
|
`;
|
|
417
466
|
} else if (data.fixed) {
|
|
418
467
|
div.innerHTML = `
|
|
419
468
|
<div class="result-icon">โ
</div>
|
|
420
|
-
<div class="result-title"
|
|
421
|
-
<div class="result-desc">${esc(data.summary ||
|
|
469
|
+
<div class="result-title">${T.fixed}</div>
|
|
470
|
+
<div class="result-desc">${esc(data.summary || T.fixedDesc)}</div>
|
|
422
471
|
${warningsHtml}
|
|
423
472
|
${feedbackHtml}
|
|
424
|
-
<button class="btn btn-ghost btn-big" onclick="location.reload()" style="margin-top:14px;"
|
|
473
|
+
<button class="btn btn-ghost btn-big" onclick="location.reload()" style="margin-top:14px;">${T.scanAgain}</button>
|
|
425
474
|
`;
|
|
426
475
|
} else {
|
|
427
476
|
div.innerHTML = `
|
|
428
477
|
<div class="result-icon">๐</div>
|
|
429
|
-
<div class="result-title"
|
|
430
|
-
<div class="result-desc">${esc(data.summary ||
|
|
478
|
+
<div class="result-title">${T.notFixed}</div>
|
|
479
|
+
<div class="result-desc">${esc(data.summary || T.notFixedDesc)}</div>
|
|
431
480
|
${warningsHtml}
|
|
432
481
|
${feedbackHtml}
|
|
433
|
-
<button class="btn btn-ghost btn-big" onclick="location.reload()" style="margin-top:14px;"
|
|
482
|
+
<button class="btn btn-ghost btn-big" onclick="location.reload()" style="margin-top:14px;">${T.tryAgain}</button>
|
|
434
483
|
`;
|
|
435
484
|
}
|
|
436
485
|
|
|
@@ -605,11 +654,11 @@
|
|
|
605
654
|
div.className = 'start-card';
|
|
606
655
|
div.id = 'desc-input-card';
|
|
607
656
|
div.innerHTML = `
|
|
608
|
-
<p style="font-size:15px; font-weight:500; color:var(--text); margin-bottom:4px;"
|
|
609
|
-
<p style="font-size:13px; color:var(--text2); margin-bottom:12px;"
|
|
657
|
+
<p style="font-size:15px; font-weight:500; color:var(--text); margin-bottom:4px;">${T.whatsWrong}</p>
|
|
658
|
+
<p style="font-size:13px; color:var(--text2); margin-bottom:12px;">${T.descHint}</p>
|
|
610
659
|
<div class="desc-input-wrap">
|
|
611
660
|
<div class="desc-textarea-wrap">
|
|
612
|
-
<textarea class="desc-textarea" id="desc-text" placeholder="
|
|
661
|
+
<textarea class="desc-textarea" id="desc-text" placeholder="${T.descPlaceholder}"></textarea>
|
|
613
662
|
<button class="desc-camera-btn" id="desc-camera-btn" title="Add screenshot">๐ท</button>
|
|
614
663
|
<input type="file" id="screenshot-input" accept="image/*" style="display:none;" />
|
|
615
664
|
</div>
|
|
@@ -620,8 +669,8 @@
|
|
|
620
669
|
</div>
|
|
621
670
|
</div>
|
|
622
671
|
<div class="btn-row" style="margin-top:10px;">
|
|
623
|
-
<button class="btn btn-primary" id="btn-desc-submit" disabled
|
|
624
|
-
<button class="btn btn-green" id="btn-desc-skip"
|
|
672
|
+
<button class="btn btn-primary" id="btn-desc-submit" disabled>${T.sendDiagnose}</button>
|
|
673
|
+
<button class="btn btn-green" id="btn-desc-skip">${T.justScan}</button>
|
|
625
674
|
</div>
|
|
626
675
|
`;
|
|
627
676
|
feed.appendChild(div);
|