mirror of
https://github.com/YFGaia/dify-plus.git
synced 2026-06-26 16:02:18 +08:00
f26fe2f4d2
# Conflicts:
# .gitignore
# README.md
# api/.env.example
# api/Dockerfile
# api/commands.py
# api/configs/app_config.py
# api/controllers/console/__init__.py
# api/controllers/console/apikey.py
# api/controllers/console/app/statistic.py
# api/controllers/service_api/app/app.py
# api/controllers/service_api/app/audio.py
# api/controllers/service_api/app/completion.py
# api/controllers/service_api/app/conversation.py
# api/controllers/service_api/app/file.py
# api/controllers/service_api/app/message.py
# api/controllers/service_api/app/workflow.py
# api/controllers/service_api/wraps.py
# api/controllers/web/completion.py
# api/core/app/apps/advanced_chat/app_generator.py
# api/core/app/apps/advanced_chat/generate_task_pipeline.py
# api/core/app/apps/agent_chat/app_generator.py
# api/core/app/apps/workflow/app_generator.py
# api/core/app/apps/workflow/generate_task_pipeline.py
# api/core/app/task_pipeline/workflow_cycle_manage.py
# api/core/helper/code_executor/code_executor.py
# api/core/tools/builtin_tool/providers/code/tools/simple_code.py
# api/core/workflow/nodes/code/code_node.py
# api/docker/entrypoint.sh
# api/events/event_handlers/__init__.py
# api/extensions/ext_celery.py
# api/extensions/ext_commands.py
# api/models/model.py
# api/models/workflow.py
# api/poetry.lock
# api/pyproject.toml
# api/services/app_service.py
# api/services/feature_service.py
# api/services/workspace_service.py
# web/.env.example
# web/Dockerfile
# web/app/(commonLayout)/apps/Apps.tsx
# web/app/components/apps/app-card.tsx
# web/app/components/base/chat/embedded-chatbot/index.tsx
# web/app/components/base/mermaid/index.tsx
# web/app/components/develop/index.tsx
# web/app/components/develop/secret-key/secret-key-modal.tsx
# web/app/components/develop/secret-key/style.module.css
# web/app/components/develop/template/template.zh.mdx
# web/app/components/explore/app-list/index.tsx
# web/app/components/explore/category.tsx
# web/app/components/explore/sidebar/index.tsx
# web/app/components/header/account-dropdown/index.tsx
# web/app/components/header/index.tsx
# web/app/components/share/utils.ts
# web/app/layout.tsx
# web/app/signin/components/mail-and-password-auth.tsx
# web/app/signin/normal-form.tsx
# web/app/signin/page.module.css
# web/context/app-context.tsx
# web/i18n/i18next-config.ts
# web/i18n/ja-JP/login.ts
# web/i18n/ko-KR/login.ts
#
if dify_config.WORKFLOW_LOG_CLEANUP_ENABLED:
# 2:00 AM every day
imports.append("schedule.clean_workflow_runlogs_precise")
beat_schedule["clean_workflow_runlogs_precise"] = {
"task": "schedule.clean_workflow_runlogs_precise.clean_workflow_runlogs_precise",
"schedule": crontab(minute="0", hour="2"),
} web/package.json
# web/pnpm-lock.yaml
# web/types/feature.ts
61 lines
1.9 KiB
TypeScript
61 lines
1.9 KiB
TypeScript
'use client'
|
|
import type { FC } from 'react'
|
|
import React from 'react'
|
|
import { useTranslation } from 'react-i18next'
|
|
import cn from '@/utils/classnames'
|
|
import exploreI18n from '@/i18n/en-US/explore'
|
|
import type { AppCategory } from '@/models/explore'
|
|
import { ThumbsUp } from '@/app/components/base/icons/src/vender/line/alertsAndFeedback'
|
|
|
|
const categoryI18n = exploreI18n.category
|
|
|
|
export type ICategoryProps = {
|
|
className?: string
|
|
list: string[]
|
|
value: string
|
|
onChange: (value: string) => void
|
|
/**
|
|
* default value for search param 'category' in en
|
|
*/
|
|
allCategoriesEn: string
|
|
}
|
|
|
|
const Category: FC<ICategoryProps> = ({
|
|
className,
|
|
list,
|
|
value,
|
|
onChange,
|
|
allCategoriesEn,
|
|
}) => {
|
|
const { t } = useTranslation()
|
|
const isAllCategories = !list.includes(value as AppCategory) || value === allCategoriesEn
|
|
|
|
const itemClassName = (isSelected: boolean) => cn(
|
|
'flex h-[32px] cursor-pointer items-center rounded-lg border-[0.5px] border-transparent px-3 py-[7px] font-medium leading-[18px] text-text-tertiary hover:bg-components-main-nav-nav-button-bg-active',
|
|
isSelected && 'border-components-main-nav-nav-button-border bg-components-main-nav-nav-button-bg-active text-components-main-nav-nav-button-text-active shadow-xs',
|
|
)
|
|
|
|
return (
|
|
<div className={cn(className, 'flex flex-wrap gap-1 text-[13px]')}>
|
|
<div
|
|
className={itemClassName(isAllCategories)}
|
|
onClick={() => onChange(allCategoriesEn)}
|
|
>
|
|
<ThumbsUp className='mr-1 h-3.5 w-3.5' />
|
|
{t('explore.apps.allCategories')}
|
|
</div>
|
|
{list.filter(name => name !== allCategoriesEn).map(name => (
|
|
<div
|
|
key={name}
|
|
className={itemClassName(name === value)}
|
|
onClick={() => onChange(name)}
|
|
>
|
|
{(categoryI18n as any)[name] ? t(`explore.category.${name}`) : name}
|
|
</div>
|
|
))}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default React.memo(Category)
|