support config
This commit is contained in:
@@ -86,6 +86,12 @@
|
||||
<span class="wait-text">等待中</span>
|
||||
</div>
|
||||
|
||||
<!-- 配置中状态 -->
|
||||
<div v-else-if="software.status === 'configuring'" class="status-configuring">
|
||||
<div class="mini-spinner"></div>
|
||||
<span class="config-text">正在配置...</span>
|
||||
</div>
|
||||
|
||||
<!-- 安装中状态:显示进度环和百分比 -->
|
||||
<div v-else-if="software.status === 'installing'" class="progress-status">
|
||||
<div class="progress-ring-container">
|
||||
@@ -373,6 +379,30 @@ const handleCardClick = () => {
|
||||
color: #AEAEB2;
|
||||
}
|
||||
|
||||
.status-configuring {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
width: 90px;
|
||||
justify-content: center;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.mini-spinner {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
border: 2px solid rgba(0, 122, 255, 0.1);
|
||||
border-top-color: var(--primary-color);
|
||||
border-radius: 50%;
|
||||
animation: spin 0.8s linear infinite;
|
||||
}
|
||||
|
||||
.config-text {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.wait-text {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
|
||||
@@ -283,9 +283,11 @@ export const useSoftwareStore = defineStore('software', {
|
||||
listen('install-status', (event: any) => {
|
||||
const { id, status, progress } = event.payload
|
||||
const task = this.activeTasks[id];
|
||||
|
||||
// 更新任务状态
|
||||
this.activeTasks[id] = { status, progress, targetVersion: task?.targetVersion };
|
||||
|
||||
// 当任务达到终态(成功或失败)时
|
||||
// 当任务达到终态(成功或失败)时。注意:'configuring' 不是终态。
|
||||
if (status === 'success' || status === 'error') {
|
||||
if (status === 'success') {
|
||||
this.lastFetched = 0;
|
||||
|
||||
Reference in New Issue
Block a user