Skip to content

Commit edb8d72

Browse files
committed
feat(update-ui): panel-native collapsible logs in progress overlay; revert release-notes body to original
1 parent 39cac4b commit edb8d72

5 files changed

Lines changed: 42 additions & 33 deletions

File tree

‎.github/workflows/docker.yml‎

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,17 @@ jobs:
4646
generate_release_notes: true
4747
append_body: true
4848
body: |
49-
---
49+
## CC Agent binaries
5050
51-
<details>
52-
<summary>📦 <b>CC Agent binaries</b> — installed automatically on nodes</summary>
51+
Lightweight Go agent for managing Xray on nodes.
52+
Downloaded automatically during node auto-setup from the panel.
5353
54-
<br>
55-
56-
Lightweight Go agent that manages Xray on your nodes. It is downloaded
57-
automatically during node auto-setup, so you normally don't need these —
58-
grab them only for a manual node installation.
59-
60-
| Binary | Architecture |
61-
| :--- | :--- |
54+
| File | Architecture |
55+
|------|-------------|
6256
| `cc-agent-linux-amd64` | x86_64 (most VPS) |
6357
| `cc-agent-linux-arm64` | ARM64 |
6458
65-
The panel itself ships as a Docker image: `clickdevtech/hysteria-panel`
66-
67-
</details>
59+
> Panel source code is distributed via Docker Hub: `clickdevtech/hysteria-panel`
6860
files: |
6961
cc-agent/cc-agent-linux-amd64
7062
cc-agent/cc-agent-linux-arm64

‎src/locales/en.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@
908908
"updateStepImage": "Downloading & building",
909909
"updateStepRestart": "Restarting panel",
910910
"updateDone": "Done",
911-
"updateTerminalTitle": "updater",
911+
"updateDetails": "Details",
912912
"tabMigration": "Migration",
913913
"tabSystemDesc": "Performance, caching, rate limits and SSH pool.",
914914
"tabSubscriptionDesc": "Branding, buttons and client app behavior.",

‎src/locales/ru.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@
908908
"updateStepImage": "Загрузка и сборка образа",
909909
"updateStepRestart": "Перезапуск панели",
910910
"updateDone": "Готово",
911-
"updateTerminalTitle": "апдейтер",
911+
"updateDetails": "Детали",
912912
"tabMigration": "Миграция",
913913
"tabSystemDesc": "Производительность, кэш, лимиты и SSH-пул.",
914914
"tabSubscriptionDesc": "Внешний вид, кнопки и поведение клиентских приложений.",

‎src/locales/zh-CN.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@
908908
"updateStepImage": "下载与构建",
909909
"updateStepRestart": "重启面板",
910910
"updateDone": "完成",
911-
"updateTerminalTitle": "更新程序",
911+
"updateDetails": "详情",
912912
"tabMigration": "迁移",
913913
"tabSystemDesc": "性能、缓存、速率限制和 SSH 连接池。",
914914
"tabSubscriptionDesc": "品牌、按钮和客户端应用行为。",

‎views/partials/settings/maintenance.ejs‎

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,12 @@
150150

151151
<div class="upd-steps" id="updSteps"></div>
152152

153-
<div class="upd-terminal" id="updTerminal" style="display:none;">
154-
<div class="upd-terminal-bar">
155-
<span class="upd-dot r"></span><span class="upd-dot y"></span><span class="upd-dot g"></span>
156-
<span class="upd-terminal-title"><%= t('settings.updateTerminalTitle') || 'updater' %></span>
157-
</div>
158-
<pre class="upd-terminal-body" id="updLog"></pre>
153+
<div class="upd-log-wrap" id="updLogWrap" style="display:none;">
154+
<button type="button" class="upd-log-toggle" id="updLogToggle" aria-expanded="false">
155+
<i class="ti ti-chevron-right" id="updLogChevron"></i>
156+
<span><%= t('settings.updateDetails') || 'Детали' %></span>
157+
</button>
158+
<pre class="upd-log" id="updLog" style="display:none;"></pre>
159159
</div>
160160

161161
<!-- Shown only when the flow ends in error/timeout so the admin can leave. -->
@@ -193,12 +193,12 @@
193193
.upd-step.is-done .upd-step-label{color:var(--text-secondary,#a1a1aa);}
194194
.upd-step.is-error .upd-step-label{color:#fca5a5;font-weight:600;}
195195
@keyframes upd-spin{to{transform:rotate(360deg)}}
196-
.upd-terminal{border:1px solid var(--border,#27272a);border-radius:var(--radius-sm,10px);overflow:hidden;background:#0c0c0e;margin-bottom:18px;}
197-
.upd-terminal-bar{display:flex;align-items:center;gap:6px;padding:8px 12px;background:rgba(255,255,255,.03);border-bottom:1px solid var(--border,#27272a);}
198-
.upd-dot{width:10px;height:10px;border-radius:50%;}
199-
.upd-dot.r{background:#ef4444;}.upd-dot.y{background:#eab308;}.upd-dot.g{background:#22c55e;}
200-
.upd-terminal-title{margin-left:8px;font-size:11px;color:var(--text-muted,#71717a);font-family:'JetBrains Mono',monospace;}
201-
.upd-terminal-body{margin:0;padding:12px 14px;max-height:220px;overflow:auto;font-family:'JetBrains Mono',monospace;font-size:11.5px;line-height:1.65;color:#a1a1aa;white-space:pre-wrap;word-break:break-word;}
196+
.upd-log-wrap{margin-bottom:18px;}
197+
.upd-log-toggle{display:inline-flex;align-items:center;gap:6px;padding:0;background:none;border:none;cursor:pointer;font-size:12.5px;color:var(--text-muted,#71717a);transition:color .2s;font-family:inherit;}
198+
.upd-log-toggle:hover{color:var(--text-secondary,#a1a1aa);}
199+
.upd-log-toggle i{font-size:14px;transition:transform .2s;}
200+
.upd-log-toggle.is-open i{transform:rotate(90deg);}
201+
.upd-log{margin:10px 0 0;padding:12px 14px;max-height:220px;overflow:auto;background:rgba(0,0,0,.28);border:1px solid var(--border,#27272a);border-radius:var(--radius-sm,10px);font-family:'JetBrains Mono',monospace;font-size:11.5px;line-height:1.65;color:var(--text-secondary,#a1a1aa);white-space:pre-wrap;word-break:break-word;}
202202
.upd-actions{display:flex;justify-content:flex-end;}
203203
</style>
204204

@@ -470,10 +470,19 @@
470470
const titleEl = document.getElementById('updTitle');
471471
const subEl = document.getElementById('updSub');
472472
const elapsedEl = document.getElementById('updElapsed');
473-
const termEl = document.getElementById('updTerminal');
473+
const logWrapEl = document.getElementById('updLogWrap');
474+
const logToggleEl = document.getElementById('updLogToggle');
474475
const logEl = document.getElementById('updLog');
475476
const actionsEl = document.getElementById('updActions');
476477
478+
logToggleEl.onclick = () => {
479+
const open = logEl.style.display !== 'none';
480+
logEl.style.display = open ? 'none' : '';
481+
logToggleEl.classList.toggle('is-open', !open);
482+
logToggleEl.setAttribute('aria-expanded', String(!open));
483+
if (!open) logEl.scrollTop = logEl.scrollHeight;
484+
};
485+
477486
renderStages();
478487
titleEl.textContent = t.inProgress;
479488
subEl.textContent = 'v' + currentVersion + ' → v' + targetVersion;
@@ -496,14 +505,22 @@
496505
497506
function showLog(lines) {
498507
if (!lines || !lines.length) return;
499-
termEl.style.display = '';
508+
logWrapEl.style.display = '';
500509
const text = lines.join('\n');
501510
if (logEl.textContent !== text) {
502511
logEl.textContent = text;
503-
logEl.scrollTop = logEl.scrollHeight;
512+
if (logEl.style.display !== 'none') logEl.scrollTop = logEl.scrollHeight;
504513
}
505514
}
506515
516+
function openLog() {
517+
logWrapEl.style.display = '';
518+
logEl.style.display = '';
519+
logToggleEl.classList.add('is-open');
520+
logToggleEl.setAttribute('aria-expanded', 'true');
521+
logEl.scrollTop = logEl.scrollHeight;
522+
}
523+
507524
// Advance the visible stage monotonically (never jump backwards on a
508525
// transient status blip).
509526
function advance(idx) {
@@ -530,7 +547,7 @@
530547
iconEl.innerHTML = '<i class="ti ti-alert-triangle"></i>';
531548
titleEl.textContent = t.failed;
532549
subEl.textContent = message || '';
533-
if (log && log.length) showLog(log);
550+
if (log && log.length) { showLog(log); openLog(); }
534551
actionsEl.style.display = '';
535552
}
536553

0 commit comments

Comments
 (0)