Skip to content
Merged
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
6 changes: 4 additions & 2 deletions frontend/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"edit_prompt_word": "Edit prompt word",
"all_236_terms": "Export all {msg} {type} prompt records?",
"export_hint": "Export all {type} prompts?",
"prompt_word_name_de": "Do you want to delete the prompt word: {msg}?"
"prompt_word_name_de": "Do you want to delete the prompt word: {msg}?",
"disable_field": "Disable Field",
"to_disable_it": "This field has a configured table relationship. If disabled, the relationship will be invalid. Are you sure you want to disable it?"
},
"training": {
"effective_data_sources": "Effective data sources",
Expand Down Expand Up @@ -798,4 +800,4 @@
"modelType": {
"llm": "Large Language Model"
}
}
}
6 changes: 4 additions & 2 deletions frontend/src/i18n/ko-KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"edit_prompt_word": "프롬프트 편집",
"all_236_terms": "모든 {msg}개의 {type} 프롬프트 기록을 내보내시겠습니까?",
"export_hint": "모든 {type} 프롬프트를 내보내시겠습니까?",
"prompt_word_name_de": "프롬프트를 삭제하시겠습니까: {msg}?"
"prompt_word_name_de": "프롬프트를 삭제하시겠습니까: {msg}?",
"disable_field": "필드 비활성화",
"to_disable_it": "이 필드에는 테이블 관계가 설정되어 있습니다. 비활성화하면 관계가 유효하지 않게 됩니다. 비활성화하시겠습니까?"
},
"training": {
"effective_data_sources": "유효한 데이터 소스",
Expand Down Expand Up @@ -798,4 +800,4 @@
"modelType": {
"llm": "대형 언어 모델"
}
}
}
6 changes: 4 additions & 2 deletions frontend/src/i18n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"edit_prompt_word": "编辑提示词",
"all_236_terms": "是否导出全部 {msg} 条{type}提示词?",
"export_hint": "是否导出全部{type}提示词?",
"prompt_word_name_de": "是否删除提示词:{msg}?"
"prompt_word_name_de": "是否删除提示词:{msg}?",
"disable_field": "禁用字段",
"to_disable_it": "该字段已配置表关联关系,若禁用后,关联关系将失效,确定禁用?"
},
"training": {
"effective_data_sources": "生效数据源",
Expand Down Expand Up @@ -798,4 +800,4 @@
"modelType": {
"llm": "大语言模型"
}
}
}
21 changes: 20 additions & 1 deletion frontend/src/views/ds/DataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ const editField = (row: any) => {
fieldDialog.value = true
}

const changeStatus = (row: any) => {
const setStatus = (row: any) => {
currentField.value = row
datasourceApi.saveField(currentField.value).then(() => {
closeField()
Expand All @@ -223,6 +223,25 @@ const changeStatus = (row: any) => {
})
}

const changeStatus = (row: any) => {
if (!row.checked) {
row.checked = true
ElMessageBox.confirm(t('prompt.disable_field'), {
type: 'warning',
confirmButtonType: 'primary',
tip: t('prompt.to_disable_it'),
confirmButtonText: t('common.confirm2'),
cancelButtonText: t('common.cancel'),
autofocus: false,
}).then(() => {
row.checked = false
setStatus(row)
})
return
}
setStatus(row)
}

const emits = defineEmits(['back', 'refresh'])
const back = () => {
emits('back')
Expand Down