fix: add missed modifications of <AppIcon />
(#7512)
This commit is contained in:
parent
6f968bafb2
commit
60ef7ba855
@ -9,7 +9,7 @@ import { randomString } from '@/utils'
|
|||||||
export type IAppBasicProps = {
|
export type IAppBasicProps = {
|
||||||
iconType?: 'app' | 'api' | 'dataset' | 'webapp' | 'notion'
|
iconType?: 'app' | 'api' | 'dataset' | 'webapp' | 'notion'
|
||||||
icon?: string
|
icon?: string
|
||||||
icon_background?: string
|
icon_background?: string | null
|
||||||
name: string
|
name: string
|
||||||
type: string | React.ReactNode
|
type: string | React.ReactNode
|
||||||
hoverTip?: string
|
hoverTip?: string
|
||||||
|
@ -24,6 +24,7 @@ import { LeftIndent02 } from '@/app/components/base/icons/src/vender/line/editor
|
|||||||
import { FileText } from '@/app/components/base/icons/src/vender/line/files'
|
import { FileText } from '@/app/components/base/icons/src/vender/line/files'
|
||||||
import WorkflowToolConfigureButton from '@/app/components/tools/workflow-tool/configure-button'
|
import WorkflowToolConfigureButton from '@/app/components/tools/workflow-tool/configure-button'
|
||||||
import type { InputVar } from '@/app/components/workflow/types'
|
import type { InputVar } from '@/app/components/workflow/types'
|
||||||
|
import { appDefaultIconBackground } from '@/config'
|
||||||
|
|
||||||
export type AppPublisherProps = {
|
export type AppPublisherProps = {
|
||||||
disabled?: boolean
|
disabled?: boolean
|
||||||
@ -212,8 +213,8 @@ const AppPublisher = ({
|
|||||||
detailNeedUpdate={!!toolPublished && published}
|
detailNeedUpdate={!!toolPublished && published}
|
||||||
workflowAppId={appDetail?.id}
|
workflowAppId={appDetail?.id}
|
||||||
icon={{
|
icon={{
|
||||||
content: appDetail?.icon,
|
content: (appDetail.icon_type === 'image' ? '🤖' : appDetail?.icon) || '🤖',
|
||||||
background: appDetail?.icon_background,
|
background: (appDetail.icon_type === 'image' ? appDefaultIconBackground : appDetail?.icon_background) || appDefaultIconBackground,
|
||||||
}}
|
}}
|
||||||
name={appDetail?.name}
|
name={appDetail?.name}
|
||||||
description={appDetail?.description}
|
description={appDetail?.description}
|
||||||
|
@ -43,9 +43,12 @@ const ConfigPanel = () => {
|
|||||||
<>
|
<>
|
||||||
<div className='flex items-center h-8 text-2xl font-semibold text-gray-800'>
|
<div className='flex items-center h-8 text-2xl font-semibold text-gray-800'>
|
||||||
<AppIcon
|
<AppIcon
|
||||||
|
iconType={appData?.site.icon_type}
|
||||||
icon={appData?.site.icon}
|
icon={appData?.site.icon}
|
||||||
background='transparent'
|
background='transparent'
|
||||||
|
imageUrl={appData?.site.icon_url}
|
||||||
size='small'
|
size='small'
|
||||||
|
className="mr-2"
|
||||||
/>
|
/>
|
||||||
{appData?.site.title}
|
{appData?.site.title}
|
||||||
</div>
|
</div>
|
||||||
|
@ -48,9 +48,12 @@ const ConfigPanel = () => {
|
|||||||
<>
|
<>
|
||||||
<div className='flex items-center h-8 text-2xl font-semibold text-gray-800'>
|
<div className='flex items-center h-8 text-2xl font-semibold text-gray-800'>
|
||||||
<AppIcon
|
<AppIcon
|
||||||
|
iconType={appData?.site.icon_type}
|
||||||
icon={appData?.site.icon}
|
icon={appData?.site.icon}
|
||||||
|
imageUrl={appData?.site.icon_url}
|
||||||
background='transparent'
|
background='transparent'
|
||||||
size='small'
|
size='small'
|
||||||
|
className="mr-2"
|
||||||
/>
|
/>
|
||||||
{appData?.site.title}
|
{appData?.site.title}
|
||||||
</div>
|
</div>
|
||||||
|
@ -87,8 +87,10 @@ const AppNav = () => {
|
|||||||
})(isCurrentWorkspaceEditor, app)
|
})(isCurrentWorkspaceEditor, app)
|
||||||
return {
|
return {
|
||||||
id: app.id,
|
id: app.id,
|
||||||
|
icon_type: app.icon_type,
|
||||||
icon: app.icon,
|
icon: app.icon,
|
||||||
icon_background: app.icon_background,
|
icon_background: app.icon_background,
|
||||||
|
icon_url: app.icon_url,
|
||||||
name: app.name,
|
name: app.name,
|
||||||
mode: app.mode,
|
mode: app.mode,
|
||||||
link,
|
link,
|
||||||
|
@ -16,13 +16,16 @@ import { Route } from '@/app/components/base/icons/src/vender/solid/mapsAndTrave
|
|||||||
import { useAppContext } from '@/context/app-context'
|
import { useAppContext } from '@/context/app-context'
|
||||||
import { useStore as useAppStore } from '@/app/components/app/store'
|
import { useStore as useAppStore } from '@/app/components/app/store'
|
||||||
import { FileArrow01, FilePlus01, FilePlus02 } from '@/app/components/base/icons/src/vender/line/files'
|
import { FileArrow01, FilePlus01, FilePlus02 } from '@/app/components/base/icons/src/vender/line/files'
|
||||||
|
import type { AppIconType } from '@/types/app'
|
||||||
|
|
||||||
export type NavItem = {
|
export type NavItem = {
|
||||||
id: string
|
id: string
|
||||||
name: string
|
name: string
|
||||||
link: string
|
link: string
|
||||||
|
icon_type: AppIconType | null
|
||||||
icon: string
|
icon: string
|
||||||
icon_background: string
|
icon_background: string
|
||||||
|
icon_url: string | null
|
||||||
mode?: string
|
mode?: string
|
||||||
}
|
}
|
||||||
export type INavSelectorProps = {
|
export type INavSelectorProps = {
|
||||||
@ -82,7 +85,7 @@ const NavSelector = ({ curNav, navs, createText, isApp, onCreate, onLoadmore }:
|
|||||||
router.push(nav.link)
|
router.push(nav.link)
|
||||||
}} title={nav.name}>
|
}} title={nav.name}>
|
||||||
<div className='relative w-6 h-6 mr-2 rounded-md'>
|
<div className='relative w-6 h-6 mr-2 rounded-md'>
|
||||||
<AppIcon size='tiny' icon={nav.icon} background={nav.icon_background} />
|
<AppIcon size='tiny' iconType={nav.icon_type} icon={nav.icon} background={nav.icon_background} imageUrl={nav.icon_url}/>
|
||||||
{!!nav.mode && (
|
{!!nav.mode && (
|
||||||
<span className={cn(
|
<span className={cn(
|
||||||
'absolute w-3.5 h-3.5 -bottom-0.5 -right-0.5 p-0.5 bg-white rounded border-[0.5px] border-[rgba(0,0,0,0.02)] shadow-sm',
|
'absolute w-3.5 h-3.5 -bottom-0.5 -right-0.5 p-0.5 bg-white rounded border-[0.5px] border-[rgba(0,0,0,0.02)] shadow-sm',
|
||||||
|
@ -133,7 +133,7 @@ const WorkflowToolAsModal: FC<Props> = ({
|
|||||||
<div>
|
<div>
|
||||||
<div className='py-2 leading-5 text-sm font-medium text-gray-900'>{t('tools.createTool.name')} <span className='ml-1 text-red-500'>*</span></div>
|
<div className='py-2 leading-5 text-sm font-medium text-gray-900'>{t('tools.createTool.name')} <span className='ml-1 text-red-500'>*</span></div>
|
||||||
<div className='flex items-center justify-between gap-3'>
|
<div className='flex items-center justify-between gap-3'>
|
||||||
<AppIcon size='large' onClick={() => { setShowEmojiPicker(true) }} className='cursor-pointer' icon={emoji.content} background={emoji.background} />
|
<AppIcon size='large' onClick={() => { setShowEmojiPicker(true) }} className='cursor-pointer' iconType='emoji' icon={emoji.content} background={emoji.background} />
|
||||||
<input
|
<input
|
||||||
type='text'
|
type='text'
|
||||||
className='grow h-10 px-3 text-sm font-normal bg-gray-100 rounded-lg border border-transparent outline-none appearance-none caret-primary-600 placeholder:text-gray-400 hover:bg-gray-50 hover:border hover:border-gray-300 focus:bg-gray-50 focus:border focus:border-gray-300 focus:shadow-xs'
|
className='grow h-10 px-3 text-sm font-normal bg-gray-100 rounded-lg border border-transparent outline-none appearance-none caret-primary-600 placeholder:text-gray-400 hover:bg-gray-50 hover:border hover:border-gray-300 focus:bg-gray-50 focus:border focus:border-gray-300 focus:shadow-xs'
|
||||||
|
@ -14,10 +14,10 @@ export type SiteInfo = {
|
|||||||
title: string
|
title: string
|
||||||
chat_color_theme?: string
|
chat_color_theme?: string
|
||||||
chat_color_theme_inverted?: boolean
|
chat_color_theme_inverted?: boolean
|
||||||
icon_type?: AppIconType
|
icon_type?: AppIconType | null
|
||||||
icon?: string
|
icon?: string
|
||||||
icon_background?: string
|
icon_background?: string | null
|
||||||
icon_url?: string
|
icon_url?: string | null
|
||||||
description?: string
|
description?: string
|
||||||
default_language?: Locale
|
default_language?: Locale
|
||||||
prompt_public?: boolean
|
prompt_public?: boolean
|
||||||
|
Loading…
Reference in New Issue
Block a user