mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-23 07:33:53 +08:00
Merge branch 'main' into update-theme
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dialog :visible="dialogVisible" @update:visible="handleVisibleChange" width="57%" center
|
||||
custom-class="custom-dialog" :show-close="false" class="center-dialog">
|
||||
custom-class="add-model-dialog" :show-close="false" class="center-dialog">
|
||||
<div style="margin: 0 18px; text-align: left; padding: 10px; border-radius: 10px;">
|
||||
<div style="font-size: 30px; color: #3d4566; margin-top: -10px; margin-bottom: 10px; text-align: center;">
|
||||
{{ $t('modelConfigDialog.addModel') }}
|
||||
@@ -298,7 +298,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.custom-dialog {
|
||||
.add-model-dialog {
|
||||
position: relative;
|
||||
border-radius: 20px;
|
||||
overflow: hidden;
|
||||
@@ -306,7 +306,7 @@ export default {
|
||||
padding-bottom: 17px;
|
||||
}
|
||||
|
||||
.custom-dialog .el-dialog__header {
|
||||
.add-model-dialog .el-dialog__header {
|
||||
padding: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
@@ -217,9 +217,9 @@ export default {
|
||||
} else {
|
||||
this.$message.error(res.data?.msg || this.$t('knowledgeFileUpload.deleteFailed'));
|
||||
}
|
||||
}, () => {
|
||||
}, (err) => {
|
||||
this.$set(this.deleteLoadingMap, doc.id, false);
|
||||
this.$message.error(this.$t('knowledgeFileUpload.deleteFailed'));
|
||||
this.$message.error(err?.data?.msg ||this.$t('knowledgeFileUpload.deleteFailed'));
|
||||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
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)"
|
||||
>
|
||||
<div class="kb-card-actions-top">
|
||||
@@ -72,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>
|
||||
@@ -875,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 {
|
||||
@@ -884,6 +902,20 @@ export default {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.kb-card-warning {
|
||||
color: #e6a23c;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
margin-left: 6px;
|
||||
animation: warning-pulse 2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes warning-pulse {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0.5; }
|
||||
}
|
||||
|
||||
.kb-card-actions-top {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
|
||||
Reference in New Issue
Block a user