@mingxy/opencode-mascot 0.7.0 → 0.7.2
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
CHANGED
|
@@ -5,6 +5,7 @@ import type { JSX } from "@opentui/solid";
|
|
|
5
5
|
import type { MascotPack } from "../core/types";
|
|
6
6
|
import { createAnimatedRenderer } from "../core/ascii-renderer";
|
|
7
7
|
import { onCelebrate, onVersion, onScatter } from "../core/celebration-bus";
|
|
8
|
+
import { getProp } from "../core/prop-loader";
|
|
8
9
|
|
|
9
10
|
interface HomeMascotProps {
|
|
10
11
|
mascots: Record<string, MascotPack>;
|
|
@@ -70,6 +71,15 @@ export function HomeMascot(props: HomeMascotProps): JSX.Element {
|
|
|
70
71
|
renderers[currentName()].scatterIn();
|
|
71
72
|
});
|
|
72
73
|
|
|
74
|
+
setTimeout(() => {
|
|
75
|
+
if (!renderers[currentName()].getProp()) {
|
|
76
|
+
renderers[currentName()].setProp(getProp("box") ?? null);
|
|
77
|
+
setTimeout(() => {
|
|
78
|
+
renderers[currentName()].setProp(null);
|
|
79
|
+
}, 6000);
|
|
80
|
+
}
|
|
81
|
+
}, 2500);
|
|
82
|
+
|
|
73
83
|
const stopDrag = () => {
|
|
74
84
|
isDragging = false;
|
|
75
85
|
renderers[currentName()].setDragging(false);
|
|
@@ -167,12 +167,11 @@ export function SidebarMascot(props: SidebarMascotProps): JSX.Element {
|
|
|
167
167
|
renderers[currentName()].setProp(busyProp);
|
|
168
168
|
}, 300);
|
|
169
169
|
} else {
|
|
170
|
-
renderers[currentName()].setProp(
|
|
170
|
+
renderers[currentName()].setProp(null);
|
|
171
171
|
}
|
|
172
172
|
} else {
|
|
173
173
|
setStateWithSwitch("idle");
|
|
174
|
-
|
|
175
|
-
renderers[currentName()].setProp(getProp("box") ?? null);
|
|
174
|
+
renderers[currentName()].setProp(null);
|
|
176
175
|
}
|
|
177
176
|
});
|
|
178
177
|
|
|
@@ -224,10 +223,12 @@ export function SidebarMascot(props: SidebarMascotProps): JSX.Element {
|
|
|
224
223
|
renderers[currentName()].scatterIn();
|
|
225
224
|
}, 2000);
|
|
226
225
|
|
|
227
|
-
// 启动后显示箱子(在 scatter 之后)
|
|
228
226
|
setTimeout(() => {
|
|
229
227
|
if (!renderers[currentName()].getProp()) {
|
|
230
228
|
renderers[currentName()].setProp(getProp("box") ?? null);
|
|
229
|
+
setTimeout(() => {
|
|
230
|
+
renderers[currentName()].setProp(null);
|
|
231
|
+
}, 6000);
|
|
231
232
|
}
|
|
232
233
|
}, 2500);
|
|
233
234
|
|