mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 20:37:48 +00:00

* adapt not input type * adapt not input type * file i18n * publish i18n * translate * i18n
57 lines
1.3 KiB
TypeScript
57 lines
1.3 KiB
TypeScript
export const imageBaseUrl = '/api/system/img/';
|
|
|
|
export enum MongoImageTypeEnum {
|
|
systemAvatar = 'systemAvatar',
|
|
appAvatar = 'appAvatar',
|
|
pluginAvatar = 'pluginAvatar',
|
|
datasetAvatar = 'datasetAvatar',
|
|
userAvatar = 'userAvatar',
|
|
teamAvatar = 'teamAvatar',
|
|
|
|
chatImage = 'chatImage',
|
|
collectionImage = 'collectionImage'
|
|
}
|
|
export const mongoImageTypeMap = {
|
|
[MongoImageTypeEnum.systemAvatar]: {
|
|
label: 'appAvatar',
|
|
unique: true
|
|
},
|
|
[MongoImageTypeEnum.appAvatar]: {
|
|
label: 'appAvatar',
|
|
unique: true
|
|
},
|
|
[MongoImageTypeEnum.pluginAvatar]: {
|
|
label: 'pluginAvatar',
|
|
unique: true
|
|
},
|
|
[MongoImageTypeEnum.datasetAvatar]: {
|
|
label: 'datasetAvatar',
|
|
unique: true
|
|
},
|
|
[MongoImageTypeEnum.userAvatar]: {
|
|
label: 'userAvatar',
|
|
unique: true
|
|
},
|
|
[MongoImageTypeEnum.teamAvatar]: {
|
|
label: 'teamAvatar',
|
|
unique: true
|
|
},
|
|
|
|
[MongoImageTypeEnum.chatImage]: {
|
|
label: 'chatImage',
|
|
unique: false
|
|
},
|
|
[MongoImageTypeEnum.collectionImage]: {
|
|
label: 'collectionImage',
|
|
unique: false
|
|
}
|
|
};
|
|
|
|
export const uniqueImageTypeList = Object.entries(mongoImageTypeMap)
|
|
.filter(([key, value]) => value.unique)
|
|
.map(([key]) => key as `${MongoImageTypeEnum}`);
|
|
|
|
export const FolderIcon = 'file/fill/folder';
|
|
export const FolderImgUrl = '/imgs/files/folder.svg';
|
|
export const HttpImgUrl = '/imgs/workflow/http.png';
|