Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletions frontend/src/components/empty-knowledge.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
<script setup lang="ts">
import { useI18n } from 'vue-i18n'

withDefaults(defineProps<{
showActions?: boolean
showDingtalkImport?: boolean
}>(), {
showActions: false,
showDingtalkImport: false,
})

const emit = defineEmits<{
uploadLocal: []
importDingtalk: []
}>()

const { t } = useI18n()
</script>
<template>
<div class="empty">
<img class="empty-img" src="@/assets/img/upload.svg" alt="">
<span class="empty-txt">{{ $t('knowledgeBase.emptyKnowledgeDragDrop') }}</span>
<span class="empty-type-txt">{{ $t('knowledgeBase.pdfDocFormat') }}</span>
<span class="empty-type-txt">{{ $t('knowledgeBase.textMarkdownFormat') }}</span>
<span class="empty-txt">{{ t('knowledgeBase.emptyKnowledgeDragDrop') }}</span>
<span class="empty-type-txt">{{ t('knowledgeBase.pdfDocFormat') }}</span>
<span class="empty-type-txt">{{ t('knowledgeBase.textMarkdownFormat') }}</span>
<div v-if="showActions" class="empty-actions">
<t-button theme="primary" @click="emit('uploadLocal')">
{{ t('knowledgeBase.uploadLocalFile') }}
</t-button>
<t-button v-if="showDingtalkImport" variant="outline" @click="emit('importDingtalk')">
{{ t('knowledgeBase.importFromDingtalk') }}
</t-button>
</div>
</div>
</template>
<style scoped lang="less">
Expand Down Expand Up @@ -41,4 +63,12 @@ const { t } = useI18n()
width: 162px;
height: 162px;
}

.empty-actions {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
margin-top: 20px;
}
</style>
56 changes: 11 additions & 45 deletions frontend/src/i18n/locales/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,13 @@ export default {
videosFilteredNoVLM: 'Skipped {count} video file(s) (video upload is not supported)',
unsupportedTypesHint: 'Some document types ({types}) have no available parser engine and cannot be processed',
goToParserSettings: 'Configure',
uploadLocalFile: 'Upload local file',
importURL: 'Import from URL',
importFromDingtalk: 'Import from DingTalk',
connectDingtalk: 'Connect DingTalk',
dingtalkSyncStarted: 'DingTalk content is being synchronized',
dingtalkSyncCompleted: 'DingTalk content synchronized',
dingtalkSyncTimeout: 'Synchronization is still running in the background',
addDocument: 'Add Document',
importURLTitle: 'Import from URL',
urlRequired: 'Please enter a URL',
Expand Down Expand Up @@ -867,15 +873,6 @@ export default {
editor: {
createTitle: 'Create Agent',
editTitle: 'Edit Agent',
buttons: {
create: 'Create Agent',
saveAndClose: 'Save and Close',
},
postCreateHint: {
title: 'Created successfully',
footer: 'Keep adjusting settings, configure sharing and publishing, then click "Save and Close".',
integrationDesc: 'Go to Integrations to configure IM, web embed, and other publishing channels',
},
basicInfo: 'Basic Info',
basicInfoDesc: 'Configure agent name, description, and run mode',
promptsConfig: 'Prompts',
Expand Down Expand Up @@ -2003,33 +2000,6 @@ export default {
'faq.import_started': 'FAQ import started',
'faq.import_completed': 'FAQ import completed',
'faq.import_failed': 'FAQ import failed'
},
outcomes: {
accepted: 'Accepted',
success: 'Success',
failed: 'Failed',
partial: 'Partial',
canceled: 'Canceled',
denied: 'Denied'
},
detailValues: {
user: 'User initiated',
manual: 'Manual',
schedule: 'Scheduled',
system: 'System',
pending: 'Pending',
completed: 'Completed',
partial: 'Partially completed',
canceled: 'Canceled',
failed: 'Failed',
enqueue: 'Task submission',
reuse_vectors: 'Reuse vectors',
reparse: 'Reparse',
viewer: 'Read-only',
editor: 'Can edit',
admin: 'Manage',
append: 'Append',
replace: 'Replace'
}
},
titleCreate: 'Create Knowledge Base',
Expand Down Expand Up @@ -2265,13 +2235,7 @@ export default {
},
buttons: {
create: 'Create Knowledge Base',
save: 'Save Configuration',
saveAndClose: 'Save and Close',
},
postCreateHint: {
title: 'Created successfully',
footer: 'Keep adjusting settings, configure sharing and data sources, then click "Save and Close".',
followUpDesc: 'Configure data sources on the left, or use Share Management to publish to spaces',
save: 'Save Configuration'
},
share: {
description: 'Share the knowledge base with spaces so members can access and use it',
Expand Down Expand Up @@ -5128,14 +5092,16 @@ export default {
lark: 'Lark',
notion: 'Notion',
yuque: 'Yuque',
rss: 'RSS / Atom Feed'
rss: 'RSS / Atom Feed',
dingtalk: 'DingTalk'
},
connectorDesc: {
feishu: 'Sync documents, spreadsheets and files from Feishu Wiki',
lark: 'Sync documents, spreadsheets and files from Lark Wiki (Feishu international)',
notion: 'Sync pages and databases from Notion',
yuque: 'Sync documents from Yuque knowledge bases',
rss: 'Sync articles from RSS / Atom feeds'
rss: 'Sync articles from RSS / Atom feeds',
dingtalk: 'Sync DingTalk drive files and online documents'
},
field: {
appId: 'App ID',
Expand Down
182 changes: 82 additions & 100 deletions frontend/src/i18n/locales/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,18 @@ export default {
denied: '拒绝'
},
action: {
'rbac.member_added': '新增成员',
'rbac.member_removed': '移除成员',
'rbac.member_role_changed': '角色变更',
'rbac.member_left': '成员退出',
'rbac.access_denied': '访问被拒',
'rbac.invitation_sent': '发出邀请',
'rbac.invitation_accepted': '接受邀请',
'rbac.invitation_declined': '拒绝邀请',
'rbac.invitation_revoked': '撤销邀请',
'rbac.invitation_expired': '邀请过期'
rbac: {
member_added: '新增成员',
member_removed: '移除成员',
member_role_changed: '角色变更',
member_left: '成员退出',
access_denied: '访问被拒',
invitation_sent: '发出邀请',
invitation_accepted: '接受邀请',
invitation_declined: '拒绝邀请',
invitation_revoked: '撤销邀请',
invitation_expired: '邀请过期'
}
},
columns: {
time: '时间',
Expand Down Expand Up @@ -644,14 +646,16 @@ export default {
lark: '同步 Lark 知识库中的文档、表格、文件(飞书国际版)',
notion: '同步 Notion 中的页面和数据库',
yuque: '同步语雀知识库中的文档',
rss: '同步 RSS / Atom 订阅源中的文章'
rss: '同步 RSS / Atom 订阅源中的文章',
dingtalk: '同步钉钉网盘文件和在线文档'
},
connector: {
feishu: '飞书',
lark: 'Lark(飞书国际版)',
notion: 'Notion',
yuque: '语雀',
rss: 'RSS / Atom 订阅'
rss: 'RSS / Atom 订阅',
dingtalk: '钉钉'
},
logDetail: {
startTime: '开始时间',
Expand Down Expand Up @@ -2544,17 +2548,19 @@ export default {
denied: '拒绝'
},
action: {
'system.setting_changed': '系统设置变更',
'system.admin_promoted': '授予系统管理员',
'system.api_key_created': '创建平台 API Key',
'system.api_key_revoked': '吊销平台 API Key',
'system.admin_revoked': '回收系统管理员',
'system.user_password_reset': '重置用户密码',
'system.queue_task_retried': '重新执行失败任务',
'system.queue_task_deleted': '清除失败任务记录',
'system.queue_task_run_now': '立即执行队列任务',
'system.queue_task_cancelled': '终止队列任务',
'system.queue_archived_purged': '清除全部失败任务'
system: {
setting_changed: '系统设置变更',
admin_promoted: '授予系统管理员',
api_key_created: '创建平台 API Key',
api_key_revoked: '吊销平台 API Key',
admin_revoked: '回收系统管理员',
user_password_reset: '重置用户密码',
queue_task_retried: '重新执行失败任务',
queue_task_deleted: '清除失败任务记录',
queue_task_run_now: '立即执行队列任务',
queue_task_cancelled: '终止队列任务',
queue_archived_purged: '清除全部失败任务'
}
},
columns: {
time: '时间',
Expand Down Expand Up @@ -3451,13 +3457,7 @@ export default {
},
buttons: {
create: '创建知识库',
save: '保存配置',
saveAndClose: '保存并关闭',
},
postCreateHint: {
title: '创建成功',
footer: '可继续调整配置,设置共享与数据源,完成后点击「保存并关闭」。',
followUpDesc: '可在左侧配置数据源,或在「共享管理」中发布到空间',
save: '保存配置'
},
wikiBrowser: {
editBtn: '编辑',
Expand Down Expand Up @@ -3706,68 +3706,53 @@ export default {
countItems: '共 {count} 项',
titleWithCount: '{title} 等 {count} 项',
importSummary: '成功 {success} / 失败 {failed} / 跳过 {skipped}',
detailValues: {
user: '用户发起',
manual: '手动触发',
schedule: '定时调度',
system: '系统触发',
pending: '待处理',
completed: '已完成',
partial: '部分完成',
canceled: '已取消',
failed: '失败',
enqueue: '任务提交',
reuse_vectors: '复用向量',
reparse: '重新解析',
viewer: '只读',
editor: '可编辑',
admin: '管理',
append: '追加',
replace: '覆盖'
},
outcomes: {
accepted: '已受理',
success: '成功',
failed: '失败',
partial: '部分完成',
canceled: '已取消',
denied: '已拒绝'
},
actions: {
'kb.created': '创建知识库',
'kb.updated': '更新知识库',
'kb.deleted': '删除知识库',
'kb.duplicated': '复制知识库',
'kb.clone_started': '开始克隆',
'kb.clone_completed': '完成克隆',
'kb.clone_failed': '克隆失败',
'knowledge.created': '添加知识',
'knowledge.updated': '更新知识',
'knowledge.deleted': '删除知识',
'knowledge.batch_deleted': '批量删除知识',
'knowledge.reparse_started': '开始重新解析',
'knowledge.parse_canceled': '取消解析',
'knowledge.move_started': '开始移动知识',
'knowledge.move_completed': '完成移动知识',
'knowledge.move_failed': '移动知识失败',
'tag.created': '创建标签',
'tag.updated': '更新标签',
'tag.deleted': '删除标签',
'datasource.created': '创建数据源',
'datasource.updated': '更新数据源',
'datasource.deleted': '删除数据源',
'datasource.sync_started': '开始同步数据源',
'datasource.sync_completed': '数据源同步完成',
'datasource.sync_failed': '数据源同步失败',
'datasource.paused': '暂停数据源',
'datasource.resumed': '恢复数据源',
'kb.share_added': '添加共享',
'kb.share_permission_changed': '修改共享权限',
'kb.share_removed': '移除共享',
'wiki.content_changed': '更新 Wiki 内容',
'faq.import_started': '开始导入 FAQ',
'faq.import_completed': '完成导入 FAQ',
'faq.import_failed': '导入 FAQ 失败'
kb: {
created: '创建知识库',
updated: '更新知识库',
deleted: '删除知识库',
duplicated: '复制知识库',
clone_started: '开始克隆',
clone_completed: '完成克隆',
clone_failed: '克隆失败',
share_added: '添加共享',
share_permission_changed: '修改共享权限',
share_removed: '移除共享'
},
knowledge: {
created: '添加知识',
updated: '更新知识',
deleted: '删除知识',
batch_deleted: '批量删除知识',
reparse_started: '开始重新解析',
parse_canceled: '取消解析',
move_started: '开始移动知识',
move_completed: '完成移动知识',
move_failed: '移动知识失败'
},
tag: {
created: '创建标签',
updated: '更新标签',
deleted: '删除标签'
},
datasource: {
created: '创建数据源',
updated: '更新数据源',
deleted: '删除数据源',
sync_started: '开始同步数据源',
sync_completed: '数据源同步完成',
sync_failed: '数据源同步失败',
paused: '暂停数据源',
resumed: '恢复数据源'
},
wiki: {
content_changed: '更新 Wiki 内容'
},
faq: {
import_started: '开始导入 FAQ',
import_completed: '完成导入 FAQ',
import_failed: '导入 FAQ 失败'
}
},
detailFields: {
task_id: '任务 ID',
Expand Down Expand Up @@ -4777,15 +4762,6 @@ export default {
editor: {
createTitle: '创建智能体',
editTitle: '编辑智能体',
buttons: {
create: '创建智能体',
saveAndClose: '保存并关闭',
},
postCreateHint: {
title: '创建成功',
footer: '可继续调整配置,设置共享与发布渠道,完成后点击「保存并关闭」。',
integrationDesc: '前往集成中心配置 IM、网页嵌入等发布渠道',
},
basicInfo: '基本信息',
basicInfoDesc: '配置智能体的名称、描述与运行模式',
promptsConfig: '提示词',
Expand Down Expand Up @@ -5152,7 +5128,13 @@ export default {
videosFilteredNoVLM: '已跳过 {count} 个视频文件(暂不支持视频上传)',
unsupportedTypesHint: '部分文档类型({types})暂无可用解析引擎,上传后将无法解析',
goToParserSettings: '前往配置',
uploadLocalFile: '上传本地文件',
importURL: '导入网页',
importFromDingtalk: '从钉钉导入',
connectDingtalk: '连接钉钉',
dingtalkSyncStarted: '钉钉内容正在同步',
dingtalkSyncCompleted: '钉钉内容同步完成',
dingtalkSyncTimeout: '同步仍在后台进行,可稍后刷新查看',
addDocument: '添加文档',
importURLTitle: '导入网页',
urlRequired: '请输入URL',
Expand Down
Loading