Co-authored-by: luowei <glpat-EjySCyNjWiLqAED-YmwM> Co-authored-by: crazywoola <427733928@qq.com> Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>tags/0.14.1
| @@ -4,6 +4,7 @@ from flask_restful import Resource, fields, marshal_with, reqparse | |||
| from constants.languages import languages | |||
| from controllers.console import api | |||
| from controllers.console.wraps import account_initialization_required | |||
| from libs.helper import AppIconUrlField | |||
| from libs.login import login_required | |||
| from services.recommended_app_service import RecommendedAppService | |||
| @@ -12,6 +13,7 @@ app_fields = { | |||
| "name": fields.String, | |||
| "mode": fields.String, | |||
| "icon": fields.String, | |||
| "icon_url": AppIconUrlField, | |||
| "icon_background": fields.String, | |||
| } | |||
| @@ -57,13 +57,7 @@ class DatabaseRecommendAppRetrieval(RecommendAppRetrievalBase): | |||
| recommended_app_result = { | |||
| "id": recommended_app.id, | |||
| "app": { | |||
| "id": app.id, | |||
| "name": app.name, | |||
| "mode": app.mode, | |||
| "icon": app.icon, | |||
| "icon_background": app.icon_background, | |||
| }, | |||
| "app": recommended_app.app, | |||
| "app_id": recommended_app.app_id, | |||
| "description": site.description, | |||
| "copyright": site.copyright, | |||
| @@ -25,10 +25,10 @@ const AppCard = ({ | |||
| <div className='relative shrink-0'> | |||
| <AppIcon | |||
| size='large' | |||
| iconType={app.app.icon_type} | |||
| icon={app.app.icon} | |||
| background={app.app.icon_background} | |||
| imageUrl={app.app.icon_url} | |||
| iconType={appBasicInfo.icon_type} | |||
| icon={appBasicInfo.icon} | |||
| background={appBasicInfo.icon_background} | |||
| imageUrl={appBasicInfo.icon_url} | |||
| /> | |||
| <AppTypeIcon wrapperClassName='absolute -bottom-0.5 -right-0.5 w-4 h-4 rounded-[4px] border border-divider-regular outline outline-components-panel-on-panel-item-bg' | |||
| className='w-3 h-3' type={appBasicInfo.mode} /> | |||
| @@ -28,10 +28,10 @@ const AppCard = ({ | |||
| <div className='relative shrink-0'> | |||
| <AppIcon | |||
| size='large' | |||
| iconType={app.app.icon_type} | |||
| icon={app.app.icon} | |||
| background={app.app.icon_background} | |||
| imageUrl={app.app.icon_url} | |||
| iconType={appBasicInfo.icon_type} | |||
| icon={appBasicInfo.icon} | |||
| background={appBasicInfo.icon_background} | |||
| imageUrl={appBasicInfo.icon_url} | |||
| /> | |||
| <span className='absolute bottom-[-3px] right-[-3px] w-4 h-4 p-0.5 bg-white rounded border-[0.5px] border-[rgba(0,0,0,0.02)] shadow-sm'> | |||
| {appBasicInfo.mode === 'advanced-chat' && ( | |||