Skip to content

Commit

Permalink
Fix explore app icon (langgenius#11742)
Browse files Browse the repository at this point in the history
Co-authored-by: luowei <glpat-EjySCyNjWiLqAED-YmwM>
Co-authored-by: crazywoola <427733928@qq.com>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
  • Loading branch information
3 people authored and 刘江波 committed Dec 20, 2024
1 parent 906cbf7 commit 37f6bb2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
2 changes: 2 additions & 0 deletions api/controllers/console/explore/recommended_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
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

Expand All @@ -12,6 +13,7 @@
"name": fields.String,
"mode": fields.String,
"icon": fields.String,
"icon_url": AppIconUrlField,
"icon_background": fields.String,
}

Expand Down
8 changes: 1 addition & 7 deletions api/services/recommend_app/database/database_retrieval.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,7 @@ def fetch_recommended_apps_from_db(cls, language: str) -> dict:

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,
Expand Down
8 changes: 4 additions & 4 deletions web/app/components/app/create-app-dialog/app-card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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} />
Expand Down
8 changes: 4 additions & 4 deletions web/app/components/explore/app-card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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' && (
Expand Down

0 comments on commit 37f6bb2

Please sign in to comment.