@vincentbanana/banana-gui 1.0.12 → 1.0.13
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 +2 -2
- package/ui/app.js +11 -0
- package/ui/index.html +5 -1
- package/ui/style.css +25 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincentbanana/banana-gui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "Banana 鐨勫浘褰㈢晫闈細鏈湴鏈嶅姟 + 娴忚鍣ㄣ€傞粦鐧戒富棰橈紝鑷粯鍥炬爣锛屾棤绗笁鏂?UI 渚濊禆",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"electron-builder": "^25.0.0"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@vincentbanana/bananacli": "^0.8.
|
|
75
|
+
"@vincentbanana/bananacli": "^0.8.13"
|
|
76
76
|
},
|
|
77
77
|
"license": "MIT",
|
|
78
78
|
"publishConfig": {
|
package/ui/app.js
CHANGED
|
@@ -1789,6 +1789,13 @@ function renderTodos() {
|
|
|
1789
1789
|
$('todoSummary').setAttribute('aria-expanded', String(state.todoOpen));
|
|
1790
1790
|
$('todoCount').textContent = `${done}/${todos.length}`;
|
|
1791
1791
|
$('todoBarFill').style.width = todos.length ? `${Math.round((done / todos.length) * 100)}%` : '0%';
|
|
1792
|
+
const chip = $('taskBtn');
|
|
1793
|
+
if (chip) {
|
|
1794
|
+
chip.hidden = todos.length === 0;
|
|
1795
|
+
chip.title = `${t('todo.title')} ${done}/${todos.length}`;
|
|
1796
|
+
$('taskChipText').textContent = `${t('todo.title')} ${done}/${todos.length}`;
|
|
1797
|
+
$('taskChipFill').style.width = todos.length ? `${Math.round((done / todos.length) * 100)}%` : '0%';
|
|
1798
|
+
}
|
|
1792
1799
|
const list = $('todoList');
|
|
1793
1800
|
list.innerHTML = '';
|
|
1794
1801
|
todos.forEach((item) => {
|
|
@@ -5270,6 +5277,10 @@ function bind() {
|
|
|
5270
5277
|
if (state.review.mode === 'changes') void loadChanges(true);
|
|
5271
5278
|
}
|
|
5272
5279
|
});
|
|
5280
|
+
$('taskBtn').addEventListener('click', () => {
|
|
5281
|
+
if (state.review.open && state.review.mode === 'tasks') closeReview();
|
|
5282
|
+
else openReview('tasks');
|
|
5283
|
+
});
|
|
5273
5284
|
$('searchBtn').addEventListener('click', openCommandCenter);
|
|
5274
5285
|
$('openSettingsFoot').addEventListener('click', () => openSettings());
|
|
5275
5286
|
$('newTab').addEventListener('click', () => $('newChat').click());
|
package/ui/index.html
CHANGED
|
@@ -74,7 +74,11 @@
|
|
|
74
74
|
<div class="chat-actions">
|
|
75
75
|
<span class="mode-badge" id="modeBadge" hidden>Plan</span>
|
|
76
76
|
<button class="icon-btn" id="filesBtn" title="工作区文件" aria-label="工作区文件"></button>
|
|
77
|
-
<button class="
|
|
77
|
+
<button class="chip-btn task-chip" id="taskBtn" hidden title="任务" aria-label="任务">
|
|
78
|
+
<span id="taskChipText"></span>
|
|
79
|
+
<span class="task-chip-bar"><i id="taskChipFill"></i></span>
|
|
80
|
+
</button>
|
|
81
|
+
<button class="icon-btn" id="reviewBtn" title="查看改动 / 文件 / 任务(Review)" aria-label="查看 Review"></button>
|
|
78
82
|
</div>
|
|
79
83
|
</header>
|
|
80
84
|
|
package/ui/style.css
CHANGED
|
@@ -4301,6 +4301,31 @@ input:focus-visible, textarea:focus-visible { outline: none; }
|
|
|
4301
4301
|
.sb-search { border-radius: 8px; }
|
|
4302
4302
|
.sidebar-foot { padding: 10px; gap: 8px; }
|
|
4303
4303
|
|
|
4304
|
+
/* 任务入口:顶部一枚进度胶囊,点击打开右侧任务面板 */
|
|
4305
|
+
.todo-dock { display: none; }
|
|
4306
|
+
.task-chip {
|
|
4307
|
+
height: 26px;
|
|
4308
|
+
padding: 0 9px;
|
|
4309
|
+
gap: 7px;
|
|
4310
|
+
font-size: 11.5px;
|
|
4311
|
+
font-variant-numeric: tabular-nums;
|
|
4312
|
+
}
|
|
4313
|
+
.task-chip[hidden] { display: none; }
|
|
4314
|
+
.task-chip-bar {
|
|
4315
|
+
width: 40px;
|
|
4316
|
+
height: 3px;
|
|
4317
|
+
border-radius: 99px;
|
|
4318
|
+
background: var(--line);
|
|
4319
|
+
overflow: hidden;
|
|
4320
|
+
}
|
|
4321
|
+
.task-chip-bar i {
|
|
4322
|
+
display: block;
|
|
4323
|
+
width: 0;
|
|
4324
|
+
height: 100%;
|
|
4325
|
+
background: var(--accent-ink);
|
|
4326
|
+
transition: width 200ms var(--ease);
|
|
4327
|
+
}
|
|
4328
|
+
|
|
4304
4329
|
/* 顶栏和聊天头部:少一点装饰,多一点边界 */
|
|
4305
4330
|
.topbar { height: 50px; }
|
|
4306
4331
|
.chat-head { height: 46px; }
|