马一丁

Update the style of "Generifying"

... ... @@ -1554,10 +1554,20 @@
font-weight: bold;
}
.graph-status-chip.idle { background-color: #fff7ed; color: #b45309; }
.graph-status-chip.loading { background-color: #fef3c7; color: #92400e; }
.graph-status-chip.ready { background-color: #e8f5e9; color: #2f855a; }
.graph-status-chip.error { background-color: #fef2f2; color: #b91c1c; }
.graph-status-chip.graph-idle { background-color: #fff7ed; color: #b45309; }
.graph-status-chip.graph-loading { background-color: #fef3c7; color: #92400e; }
.graph-status-chip.graph-ready { background-color: #e8f5e9; color: #2f855a; }
.graph-status-chip.graph-error { background-color: #fef2f2; color: #b91c1c; }
.chip-spinner {
display: inline-block;
width: 12px;
height: 12px;
border: 2px solid currentColor;
border-radius: 50%;
border-top-color: transparent;
animation: spin 1s linear infinite;
}
.graph-panel-body {
padding: 10px 12px 14px 12px;
... ... @@ -4999,7 +5009,7 @@ function getConsoleContainer() {
<div class="graph-panel-subtitle">GraphRAG 节点关系可视化</div>
</div>
<div class="graph-panel-actions">
<span class="graph-status-chip idle" id="graphStatusChip">未生成</span>
<span class="graph-status-chip graph-idle" id="graphStatusChip">未生成</span>
<button class="graph-panel-button" id="graphFullBtn" title="在新标签页查看">全屏</button>
<button class="graph-panel-button" id="graphRefreshBtn" title="刷新知识图谱">刷新</button>
<button class="graph-panel-button" id="graphCollapseBtn" title="折叠/展开">收起</button>
... ... @@ -5192,15 +5202,25 @@ function getConsoleContainer() {
graphPanelState = state;
const chip = document.getElementById('graphStatusChip');
if (!chip) return;
chip.classList.remove('idle', 'loading', 'ready', 'error');
chip.classList.add(state);
const stateClassMap = {
idle: 'graph-idle',
loading: 'graph-loading',
ready: 'graph-ready',
error: 'graph-error'
};
chip.classList.remove('graph-idle', 'graph-loading', 'graph-ready', 'graph-error');
chip.classList.add(stateClassMap[state] || 'graph-idle');
const textMap = {
idle: '未生成',
loading: '正在生成',
ready: '已生成',
error: '加载失败'
};
chip.textContent = textMap[state] || state;
if (state === 'loading') {
chip.innerHTML = `<span class="chip-spinner" aria-hidden="true"></span><span>${textMap[state]}</span>`;
} else {
chip.textContent = textMap[state] || state;
}
if (message) {
setGraphPanelPlaceholder(message, state === 'error' ? 'error' : '');
}
... ...