From d5585a72849562b3384b389e42cbf1af749e4e38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=91=E4=BC=9F=E5=BC=BA?= Date: Fri, 19 May 2023 18:39:47 +0800 Subject: [PATCH] chore: app icon --- web/app/components/explore/app-card/index.tsx | 2 +- .../explore/sidebar/app-nav-item/index.tsx | 14 ++++++++++---- web/app/components/explore/sidebar/index.tsx | 4 +++- web/models/explore.ts | 4 ++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/web/app/components/explore/app-card/index.tsx b/web/app/components/explore/app-card/index.tsx index b212394ff4..ff56b457f2 100644 --- a/web/app/components/explore/app-card/index.tsx +++ b/web/app/components/explore/app-card/index.tsx @@ -34,7 +34,7 @@ const AppCard = ({
- +
{appBasicInfo.name}
diff --git a/web/app/components/explore/sidebar/app-nav-item/index.tsx b/web/app/components/explore/sidebar/app-nav-item/index.tsx index d1173f8b28..8ec16a0964 100644 --- a/web/app/components/explore/sidebar/app-nav-item/index.tsx +++ b/web/app/components/explore/sidebar/app-nav-item/index.tsx @@ -2,12 +2,15 @@ import cn from 'classnames' import { useRouter } from 'next/navigation' import ItemOperation from '@/app/components/explore/item-operation' +import AppIcon from '@/app/components/base/app-icon' import s from './style.module.css' export interface IAppNavItemProps { name: string id: string + icon: string + icon_background: string isSelected: boolean isPinned: boolean togglePin: () => void @@ -18,11 +21,13 @@ export interface IAppNavItemProps { export default function AppNavItem({ name, id, + icon, + icon_background, isSelected, isPinned, togglePin, uninstallable, - onDelete + onDelete, }: IAppNavItemProps) { const router = useRouter() const url = `/explore/installed/${id}` @@ -39,15 +44,16 @@ export default function AppNavItem({ router.push(url) // use Link causes popup item always trigger jump. Can not be solved by e.stopPropagation(). }} > -
-
+ {/*
+ /> */} +
{name}
{ diff --git a/web/app/components/explore/sidebar/index.tsx b/web/app/components/explore/sidebar/index.tsx index 418c4d3ea3..e5c058228e 100644 --- a/web/app/components/explore/sidebar/index.tsx +++ b/web/app/components/explore/sidebar/index.tsx @@ -84,11 +84,13 @@ const SideBar: FC<{ maxHeight: 'calc(100vh - 250px)' }} > - {installedApps.map(({id, is_pinned, uninstallable, app : { name }}) => { + {installedApps.map(({id, is_pinned, uninstallable, app : { name, icon, icon_background }}) => { return (