mirror of
https://github.com/langgenius/dify.git
synced 2025-07-14 20:49:56 +00:00
16 lines
1.0 KiB
TypeScript
16 lines
1.0 KiB
TypeScript
import { useTranslation } from 'react-i18next'
|
||
|
||
export const useIndexStatus = () => {
|
||
const { t } = useTranslation()
|
||
return {
|
||
queuing: { color: 'orange', text: t('datasetDocuments.list.status.queuing') }, // waiting
|
||
indexing: { color: 'blue', text: t('datasetDocuments.list.status.indexing') }, // indexing splitting parsing cleaning
|
||
paused: { color: 'orange', text: t('datasetDocuments.list.status.paused') }, // paused
|
||
error: { color: 'red', text: t('datasetDocuments.list.status.error') }, // error
|
||
available: { color: 'green', text: t('datasetDocuments.list.status.available') }, // completed,archived = false,enabled = true
|
||
enabled: { color: 'green', text: t('datasetDocuments.list.status.enabled') }, // completed,archived = false,enabled = true
|
||
disabled: { color: 'gray', text: t('datasetDocuments.list.status.disabled') }, // completed,archived = false,enabled = false
|
||
archived: { color: 'gray', text: t('datasetDocuments.list.status.archived') }, // completed,archived = true
|
||
}
|
||
}
|