bingocode 1.1.105 → 1.1.106
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/src/manager/CliMenuUi.tsx +2 -9
- package/src/manager/TopToolbar.tsx +23 -14
package/package.json
CHANGED
|
@@ -273,17 +273,10 @@ export const TopBar: React.FC<{
|
|
|
273
273
|
<Box width={width - 4} flexDirection="row" alignItems="flex-start">
|
|
274
274
|
{/* Left Section: Welcome Text & IP */}
|
|
275
275
|
<Box flexDirection="column" width={20} marginRight={2}>
|
|
276
|
-
|
|
277
|
-
<Box flexDirection="column">
|
|
278
|
-
<Text bold color="cyan">Welcome Bingo</Text>
|
|
279
|
-
<Text bold color="cyan">Code</Text>
|
|
280
|
-
</Box>
|
|
281
|
-
) : (
|
|
282
|
-
<Text bold color="cyan">Bingo Code</Text>
|
|
283
|
-
)}
|
|
276
|
+
<Text bold color="cyan">{isHome ? 'Welcome Bingo\nCode' : 'Bingo Code'}</Text>
|
|
284
277
|
{ip ? (
|
|
285
278
|
<Box marginTop={1}>
|
|
286
|
-
<Text
|
|
279
|
+
<Text color="green">IP: {ip.replace(' ','\n ')}</Text>
|
|
287
280
|
</Box>
|
|
288
281
|
) : null}
|
|
289
282
|
</Box>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
//@C:M ID=M.UI.TopToolbar;K=M;V=1.
|
|
1
|
+
//@C:M ID=M.UI.TopToolbar;K=M;V=1.3;P=top toolbar;D=CLI;M=cli;S=ui
|
|
2
2
|
import React, { memo, useMemo } from 'react';
|
|
3
|
-
import { Box } from 'ink';
|
|
3
|
+
import { Box, Text } from 'ink';
|
|
4
4
|
import { Chip } from './CliMenuUi.tsx';
|
|
5
5
|
import { useTheme } from '../components/design-system/ThemeProvider.tsx';
|
|
6
6
|
import { getGlobalConfig, getCurrentProjectConfig } from '../utils/config.ts';
|
|
@@ -53,6 +53,17 @@ function basename(p: string) {
|
|
|
53
53
|
return parts[parts.length - 1] || p;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
/**
|
|
57
|
+
* Compact 1/6 size Mini-Clawd mascot string.
|
|
58
|
+
* Approx 3x2 characters.
|
|
59
|
+
*/
|
|
60
|
+
const MiniClawd = () => (
|
|
61
|
+
<Box flexDirection="column" marginRight={1}>
|
|
62
|
+
<Text color="cyan">▟█▙</Text>
|
|
63
|
+
<Text color="cyan">▜██</Text>
|
|
64
|
+
</Box>
|
|
65
|
+
);
|
|
66
|
+
|
|
56
67
|
export const TopToolbar: React.FC<Props> = memo(({ ready, page, animEnabled, tipsEnabled }) => {
|
|
57
68
|
const [theme] = useTheme();
|
|
58
69
|
|
|
@@ -61,7 +72,7 @@ export const TopToolbar: React.FC<Props> = memo(({ ready, page, animEnabled, tip
|
|
|
61
72
|
React.useEffect(() => {
|
|
62
73
|
const update = () => setWindowCount(countLeases());
|
|
63
74
|
update();
|
|
64
|
-
const id = setInterval(update, 10000);
|
|
75
|
+
const id = setInterval(update, 10000); // 10s poll
|
|
65
76
|
return () => clearInterval(id);
|
|
66
77
|
}, []);
|
|
67
78
|
|
|
@@ -94,30 +105,28 @@ export const TopToolbar: React.FC<Props> = memo(({ ready, page, animEnabled, tip
|
|
|
94
105
|
const uiTone = (String(theme) === 'dark') ? 'accent' : (String(theme) === 'highContrast' ? 'warning' : 'info');
|
|
95
106
|
|
|
96
107
|
return (
|
|
97
|
-
<Box flexDirection="row" width="100%" alignItems="
|
|
98
|
-
{/* Left:
|
|
99
|
-
<Box alignItems="
|
|
108
|
+
<Box flexDirection="row" width="100%" alignItems="flex-start" justifyContent="space-between">
|
|
109
|
+
{/* Left: Main Mascot + Compact Grid */}
|
|
110
|
+
<Box alignItems="flex-start">
|
|
100
111
|
<Box marginRight={2}>
|
|
101
112
|
{animEnabled ? <AnimatedClawd /> : <Clawd pose={clawdPose} />}
|
|
102
113
|
</Box>
|
|
103
114
|
|
|
104
|
-
{/* Visual Window Grid (Mini-
|
|
105
|
-
<Box flexDirection="row" flexWrap="wrap">
|
|
115
|
+
{/* Visual Window Grid (Mini-mascots 1/6 size) */}
|
|
116
|
+
<Box flexDirection="row" flexWrap="wrap" maxWidth={40}>
|
|
106
117
|
{Array.from({ length: windowCount }).map((_, i) => (
|
|
107
|
-
<
|
|
108
|
-
<Clawd pose="default" />
|
|
109
|
-
</Box>
|
|
118
|
+
<MiniClawd key={i} />
|
|
110
119
|
))}
|
|
111
120
|
</Box>
|
|
112
121
|
</Box>
|
|
113
122
|
|
|
114
|
-
{/* Right: Status Info Chips */}
|
|
115
|
-
<Box flexDirection="
|
|
123
|
+
{/* Right: Status Info Chips (Vertical Stack) */}
|
|
124
|
+
<Box flexDirection="column" alignItems="flex-end">
|
|
116
125
|
<Chip label="Theme" value={themeLabel} tone="accent" />
|
|
117
126
|
<Chip label="Project" value={projectName || '—'} tone="info" />
|
|
118
127
|
<Chip
|
|
119
128
|
label="UI"
|
|
120
|
-
value={
|
|
129
|
+
value={tipsEnabled ? 'Tips On' : 'Tips Off'}
|
|
121
130
|
tone={uiTone as any}
|
|
122
131
|
/>
|
|
123
132
|
</Box>
|