@aiyiran/myclaw 1.1.52 → 1.1.53
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/assets/myclaw-inject.js +20 -37
- package/index.js +0 -3
- package/package.json +1 -1
package/assets/myclaw-inject.js
CHANGED
|
@@ -39,49 +39,32 @@
|
|
|
39
39
|
"position: fixed",
|
|
40
40
|
"bottom: 8px",
|
|
41
41
|
"right: 40px",
|
|
42
|
-
"padding: 10px
|
|
43
|
-
"background:
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"gap: 10px",
|
|
42
|
+
"padding: 3px 10px",
|
|
43
|
+
"background: rgba(120, 120, 120, 0.18)",
|
|
44
|
+
"color: rgba(170, 170, 170, 0.9)",
|
|
45
|
+
"font-size: 11px",
|
|
46
|
+
"font-weight: bold",
|
|
47
|
+
"font-family: monospace",
|
|
48
|
+
"border-radius: 4px",
|
|
50
49
|
"z-index: 99999",
|
|
51
50
|
"user-select: none",
|
|
52
|
-
"
|
|
51
|
+
"cursor: pointer",
|
|
52
|
+
"transition: all 0.2s",
|
|
53
|
+
"letter-spacing: 0.5px",
|
|
54
|
+
"transform: scale(1)",
|
|
55
|
+
"border: 1px solid rgba(120, 120, 120, 0.25)",
|
|
53
56
|
].join(";");
|
|
54
|
-
bar.
|
|
55
|
-
|
|
56
|
-
var colorBar = document.createElement("div");
|
|
57
|
-
colorBar.style.cssText = "width:3px;height:28px;border-radius:2px;background:#8b5cf6;flex-shrink:0;";
|
|
58
|
-
bar.appendChild(colorBar);
|
|
59
|
-
|
|
60
|
-
var info = document.createElement("div");
|
|
61
|
-
info.style.cssText = "flex:1;display:flex;flex-direction:column;gap:2px;";
|
|
62
|
-
|
|
63
|
-
var name = document.createElement("div");
|
|
64
|
-
name.textContent = "🚀 升级";
|
|
65
|
-
name.style.cssText = "font-size:13px;font-weight:bold;color:#8b5cf6;";
|
|
66
|
-
info.appendChild(name);
|
|
57
|
+
bar.textContent = "🐾 v" + MYCLAW_VERSION;
|
|
58
|
+
bar.title = "点击升级 myclaw 到最新版本";
|
|
67
59
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
desc.style.cssText = "font-size:11px;color:#888;";
|
|
71
|
-
info.appendChild(desc);
|
|
72
|
-
|
|
73
|
-
bar.appendChild(info);
|
|
74
|
-
|
|
75
|
-
var arrow = document.createElement("div");
|
|
76
|
-
arrow.textContent = "▶";
|
|
77
|
-
arrow.style.cssText = "color:#555;font-size:10px;";
|
|
78
|
-
bar.appendChild(arrow);
|
|
79
|
-
|
|
80
|
-
bar.onmouseenter = function () { bar.style.background = "#2f2f4a"; };
|
|
81
|
-
bar.onmouseleave = function () { bar.style.background = "#252536"; };
|
|
60
|
+
bar.onmouseenter = function () { bar.style.background = "rgba(120, 120, 120, 0.3)"; bar.style.color = "rgba(220, 220, 220, 0.95)"; bar.style.transform = "scale(1.05)"; };
|
|
61
|
+
bar.onmouseleave = function () { bar.style.background = "rgba(120, 120, 120, 0.18)"; bar.style.color = "rgba(170, 170, 170, 0.9)"; bar.style.transform = "scale(1)"; };
|
|
82
62
|
bar.onclick = function (e) {
|
|
83
63
|
e.stopPropagation();
|
|
84
64
|
runCommand("mc up");
|
|
65
|
+
setTimeout(function () {
|
|
66
|
+
window.location.reload();
|
|
67
|
+
}, 10000);
|
|
85
68
|
};
|
|
86
69
|
|
|
87
70
|
document.body.appendChild(bar);
|
|
@@ -96,7 +79,7 @@
|
|
|
96
79
|
btn.style.cssText = [
|
|
97
80
|
"position: fixed",
|
|
98
81
|
"bottom: 8px",
|
|
99
|
-
"right:
|
|
82
|
+
"right: 340px",
|
|
100
83
|
"padding: 2px 8px",
|
|
101
84
|
"background: none",
|
|
102
85
|
"color: rgba(150, 150, 150, 0.4)",
|
package/index.js
CHANGED
|
@@ -2356,9 +2356,6 @@ if (!command) {
|
|
|
2356
2356
|
if (detectPlatform() === 'windows') {
|
|
2357
2357
|
runBat();
|
|
2358
2358
|
}
|
|
2359
|
-
console.log('');
|
|
2360
|
-
console.log('🐍 更新 Python 守护进程...');
|
|
2361
|
-
runServer(args[1]);
|
|
2362
2359
|
} else if (command === 'all') {
|
|
2363
2360
|
// 完整升级:升级包 → patch → server → restart
|
|
2364
2361
|
console.log('[mc all] 开始完整升级流程...');
|