mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 07:03:53 +08:00
@@ -40,14 +40,9 @@
|
||||
v-for="(kb, index) in filteredKnowledgeBases"
|
||||
:key="kb.datasetId"
|
||||
class="kb-card"
|
||||
:class="{ active: selectedKb && selectedKb.datasetId === kb.datasetId }"
|
||||
:class="{ active: selectedKb && selectedKb.datasetId === kb.datasetId, error: !!kb.errorMessage }"
|
||||
@click="selectKnowledgeBase(kb)"
|
||||
>
|
||||
<el-tooltip v-if="kb.errorMessage" :content="kb.errorMessage" placement="bottom-start" effect="dark">
|
||||
<div class="kb-card-warning">
|
||||
<i class="el-icon-warning"></i>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<div class="kb-card-actions-top">
|
||||
<button class="kb-action-icon" :title="$t('knowledgeBaseManagement.edit')" @click.stop="editKnowledgeBase(kb)">
|
||||
<i class="el-icon-edit"></i>
|
||||
@@ -77,6 +72,9 @@
|
||||
@click.native.stop
|
||||
@change="handleStatusChange(kb)"
|
||||
></el-switch>
|
||||
<el-tooltip v-if="kb.errorMessage" :content="kb.errorMessage" placement="top-end" effect="dark">
|
||||
<i class="kb-card-warning el-icon-warning"></i>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -880,6 +878,21 @@ export default {
|
||||
&.active {
|
||||
border: 1px solid #6b80eb;
|
||||
}
|
||||
|
||||
&.error {
|
||||
background: linear-gradient(135deg, #fff5f5, #fff0f0);
|
||||
border: 1px solid #fde2e2;
|
||||
box-shadow: 0 0 10px rgba(245, 108, 108, 0.15);
|
||||
|
||||
&:hover {
|
||||
border: 1px solid #f56c6c;
|
||||
box-shadow: 0 0 12px rgba(245, 108, 108, 0.25);
|
||||
}
|
||||
|
||||
&.active {
|
||||
border: 1px solid #f56c6c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.kb-card-top {
|
||||
@@ -890,13 +903,11 @@ export default {
|
||||
}
|
||||
|
||||
.kb-card-warning {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
left: 4px;
|
||||
z-index: 2;
|
||||
color: #e6a23c;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
margin-left: 6px;
|
||||
animation: warning-pulse 2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user