mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 05:36:02 +08:00
Fix explore app icon (#11742)
Co-authored-by: luowei <glpat-EjySCyNjWiLqAED-YmwM> Co-authored-by: crazywoola <427733928@qq.com> Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
This commit is contained in:
parent
9048832a9a
commit
5e2926a207
@ -4,6 +4,7 @@ from flask_restful import Resource, fields, marshal_with, reqparse
|
|||||||
from constants.languages import languages
|
from constants.languages import languages
|
||||||
from controllers.console import api
|
from controllers.console import api
|
||||||
from controllers.console.wraps import account_initialization_required
|
from controllers.console.wraps import account_initialization_required
|
||||||
|
from libs.helper import AppIconUrlField
|
||||||
from libs.login import login_required
|
from libs.login import login_required
|
||||||
from services.recommended_app_service import RecommendedAppService
|
from services.recommended_app_service import RecommendedAppService
|
||||||
|
|
||||||
@ -12,6 +13,7 @@ app_fields = {
|
|||||||
"name": fields.String,
|
"name": fields.String,
|
||||||
"mode": fields.String,
|
"mode": fields.String,
|
||||||
"icon": fields.String,
|
"icon": fields.String,
|
||||||
|
"icon_url": AppIconUrlField,
|
||||||
"icon_background": fields.String,
|
"icon_background": fields.String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,13 +57,7 @@ class DatabaseRecommendAppRetrieval(RecommendAppRetrievalBase):
|
|||||||
|
|
||||||
recommended_app_result = {
|
recommended_app_result = {
|
||||||
"id": recommended_app.id,
|
"id": recommended_app.id,
|
||||||
"app": {
|
"app": recommended_app.app,
|
||||||
"id": app.id,
|
|
||||||
"name": app.name,
|
|
||||||
"mode": app.mode,
|
|
||||||
"icon": app.icon,
|
|
||||||
"icon_background": app.icon_background,
|
|
||||||
},
|
|
||||||
"app_id": recommended_app.app_id,
|
"app_id": recommended_app.app_id,
|
||||||
"description": site.description,
|
"description": site.description,
|
||||||
"copyright": site.copyright,
|
"copyright": site.copyright,
|
||||||
|
@ -25,10 +25,10 @@ const AppCard = ({
|
|||||||
<div className='relative shrink-0'>
|
<div className='relative shrink-0'>
|
||||||
<AppIcon
|
<AppIcon
|
||||||
size='large'
|
size='large'
|
||||||
iconType={app.app.icon_type}
|
iconType={appBasicInfo.icon_type}
|
||||||
icon={app.app.icon}
|
icon={appBasicInfo.icon}
|
||||||
background={app.app.icon_background}
|
background={appBasicInfo.icon_background}
|
||||||
imageUrl={app.app.icon_url}
|
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'
|
<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} />
|
className='w-3 h-3' type={appBasicInfo.mode} />
|
||||||
|
@ -28,10 +28,10 @@ const AppCard = ({
|
|||||||
<div className='relative shrink-0'>
|
<div className='relative shrink-0'>
|
||||||
<AppIcon
|
<AppIcon
|
||||||
size='large'
|
size='large'
|
||||||
iconType={app.app.icon_type}
|
iconType={appBasicInfo.icon_type}
|
||||||
icon={app.app.icon}
|
icon={appBasicInfo.icon}
|
||||||
background={app.app.icon_background}
|
background={appBasicInfo.icon_background}
|
||||||
imageUrl={app.app.icon_url}
|
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'>
|
<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' && (
|
{appBasicInfo.mode === 'advanced-chat' && (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user