From d6282349420f5b1004f0c2f7c5f49fafdf7c9b4e Mon Sep 17 00:00:00 2001 From: balibabu Date: Thu, 7 Aug 2025 17:37:53 +0800 Subject: [PATCH] Feat: Restore the button's background color #3221 (#9307) ### What problem does this PR solve? Feat: Restore the button's background color #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --- web/src/components/chat-input.tsx | 46 ------- web/src/components/ui/badge.tsx | 2 - web/src/components/ui/button.tsx | 17 +-- web/src/components/ui/container.tsx | 19 --- web/src/components/ui/input.tsx | 2 +- web/src/components/ui/loading-button.tsx | 2 - web/src/components/ui/select.tsx | 2 +- web/src/components/ui/tabs.tsx | 2 +- web/src/components/ui/textarea.tsx | 2 +- web/src/pages/agents/template-card.tsx | 2 +- web/src/pages/chunk/index.tsx | 3 +- .../dataset/setting/advanced-setting-form.tsx | 7 +- .../dataset/setting/chunk-method-card.tsx | 4 +- .../pages/dataset/testing/testing-form.tsx | 5 +- web/src/pages/datasets/dataset-card.tsx | 5 +- web/src/pages/home/application-card.tsx | 11 +- web/src/pages/home/header.tsx | 113 ------------------ web/src/pages/next-search/index.tsx | 4 +- web/src/pages/next-searches/search-card.tsx | 2 +- web/src/pages/profile-setting/model/index.tsx | 5 +- .../profile-setting/model/model-card.tsx | 4 +- web/src/pages/profile-setting/plan/index.tsx | 8 +- .../profile-setting/plan/pricing-card.tsx | 6 +- .../pages/profile-setting/profile/index.tsx | 6 +- .../pages/profile-setting/prompt/index.tsx | 2 +- web/src/pages/profile-setting/team/index.tsx | 6 +- web/tailwind.config.js | 4 - web/tailwind.css | 1 - 28 files changed, 41 insertions(+), 251 deletions(-) delete mode 100644 web/src/components/chat-input.tsx delete mode 100644 web/src/components/ui/container.tsx delete mode 100644 web/src/pages/home/header.tsx diff --git a/web/src/components/chat-input.tsx b/web/src/components/chat-input.tsx deleted file mode 100644 index 246385b2b..000000000 --- a/web/src/components/chat-input.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import { useEventListener } from 'ahooks'; -import { Mic, Paperclip, Send } from 'lucide-react'; -import { useRef, useState } from 'react'; -import { Button } from './ui/button'; -import { Textarea } from './ui/textarea'; - -export function ChatInput() { - const textareaRef = useRef(null); - const [textareaHeight, setTextareaHeight] = useState(40); - - useEventListener( - 'keydown', - (ev) => { - if (ev.shiftKey && ev.code === 'Enter') { - setTextareaHeight((h) => { - return h + 10; - }); - } - }, - { - target: textareaRef, - }, - ); - - return ( -
- - + diff --git a/web/src/pages/datasets/dataset-card.tsx b/web/src/pages/datasets/dataset-card.tsx index 0ddc99df6..0e074d5a8 100644 --- a/web/src/pages/datasets/dataset-card.tsx +++ b/web/src/pages/datasets/dataset-card.tsx @@ -72,10 +72,7 @@ export function SeeAllCard() { const { navigateToDatasetList } = useNavigatePage(); return ( - + See All diff --git a/web/src/pages/home/application-card.tsx b/web/src/pages/home/application-card.tsx index 63e97b971..fc118d5d7 100644 --- a/web/src/pages/home/application-card.tsx +++ b/web/src/pages/home/application-card.tsx @@ -1,5 +1,5 @@ import { MoreButton } from '@/components/more-button'; -import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'; +import { RAGFlowAvatar } from '@/components/ragflow-avatar'; import { Card, CardContent } from '@/components/ui/card'; import { formatDate } from '@/utils/date'; import { ChevronRight } from 'lucide-react'; @@ -17,10 +17,11 @@ export function ApplicationCard({ app }: ApplicationCardProps) {
- - - CN - +

{app.title} diff --git a/web/src/pages/home/header.tsx b/web/src/pages/home/header.tsx deleted file mode 100644 index f36516d08..000000000 --- a/web/src/pages/home/header.tsx +++ /dev/null @@ -1,113 +0,0 @@ -import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'; -import { Button } from '@/components/ui/button'; -import { Container } from '@/components/ui/container'; -import { Segmented, SegmentedValue } from '@/components/ui/segmented'; -import { useTranslate } from '@/hooks/common-hooks'; -import { useNavigateWithFromState } from '@/hooks/route-hook'; -import { - ChevronDown, - Cpu, - Github, - Library, - MessageSquareText, - Search, - Star, - Zap, -} from 'lucide-react'; -import { useCallback, useMemo, useState } from 'react'; -import { useLocation } from 'umi'; - -export function HomeHeader() { - const { t } = useTranslate('header'); - const { pathname } = useLocation(); - const navigate = useNavigateWithFromState(); - const [currentPath, setCurrentPath] = useState('/home'); - - const tagsData = useMemo( - () => [ - { path: '/home', name: t('knowledgeBase'), icon: Library }, - { path: '/chat', name: t('chat'), icon: MessageSquareText }, - { path: '/search', name: t('search'), icon: Search }, - { path: '/flow', name: t('flow'), icon: Cpu }, - // { path: '/file', name: t('fileManager'), icon: FileIcon }, - ], - [t], - ); - - const options = useMemo(() => { - return tagsData.map((tag) => { - const HeaderIcon = tag.icon; - - return { - label: ( -
- - {tag.name} -
- ), - value: tag.path, - }; - }); - }, [tagsData]); - - // const currentPath = useMemo(() => { - // return tagsData.find((x) => pathname.startsWith(x.path))?.name || 'home'; - // }, [pathname, tagsData]); - - const handleChange = (path: SegmentedValue) => { - // navigate(path as string); - setCurrentPath(path as string); - }; - - const handleLogoClick = useCallback(() => { - navigate('/'); - }, [navigate]); - - return ( -
-
- logo - -
-
- -
-
- - V 0.13.0 - - - - - - CN - - yifanwu92@gmail.com - - -
-
- ); -} diff --git a/web/src/pages/next-search/index.tsx b/web/src/pages/next-search/index.tsx index 489067ee8..391f15935 100644 --- a/web/src/pages/next-search/index.tsx +++ b/web/src/pages/next-search/index.tsx @@ -13,9 +13,7 @@ export default function SearchPage() { - +

diff --git a/web/src/pages/next-searches/search-card.tsx b/web/src/pages/next-searches/search-card.tsx index 3f8188a63..5b1e5a385 100644 --- a/web/src/pages/next-searches/search-card.tsx +++ b/web/src/pages/next-searches/search-card.tsx @@ -15,7 +15,7 @@ export function SearchCard({ data }: IProps) { const { navigateToSearch } = useNavigatePage(); return ( - +

Model library

- +
{modelLibraryList.map((x, idx) => ( diff --git a/web/src/pages/profile-setting/model/model-card.tsx b/web/src/pages/profile-setting/model/model-card.tsx index d84fd8917..dad059298 100644 --- a/web/src/pages/profile-setting/model/model-card.tsx +++ b/web/src/pages/profile-setting/model/model-card.tsx @@ -104,7 +104,7 @@ export function AddModelCard() { -
@@ -126,7 +126,7 @@ export function ModelLibraryCard() {

LLM,TEXT EMBEDDING, SPEECH2TEXT, MODERATION

-
diff --git a/web/src/pages/profile-setting/plan/index.tsx b/web/src/pages/profile-setting/plan/index.tsx index ebfb0cad7..2da8dad37 100644 --- a/web/src/pages/profile-setting/plan/index.tsx +++ b/web/src/pages/profile-setting/plan/index.tsx @@ -79,20 +79,20 @@ export default function Plan() { return (

Plan & balance

- +
Balance $ 100.00
The value equals to 1,000 tokens or 10.00 GBs of storage -
- +
Upgrade to access
@@ -107,7 +107,7 @@ export default function Plan() { options={options} value={val} onChange={handleChange} - className="bg-colors-background-inverse-standard inline-flex" + className="inline-flex" >
{pricingData.map((plan, index) => ( diff --git a/web/src/pages/profile-setting/plan/pricing-card.tsx b/web/src/pages/profile-setting/plan/pricing-card.tsx index 13354f631..2f0024cdf 100644 --- a/web/src/pages/profile-setting/plan/pricing-card.tsx +++ b/web/src/pages/profile-setting/plan/pricing-card.tsx @@ -38,10 +38,7 @@ export function PricingCard({
- + {isPro && } {isEnterprise && } {title} @@ -59,7 +56,6 @@ export function PricingCard({ )}
diff --git a/web/src/pages/profile-setting/prompt/index.tsx b/web/src/pages/profile-setting/prompt/index.tsx index 7ae30ab99..0c569f01c 100644 --- a/web/src/pages/profile-setting/prompt/index.tsx +++ b/web/src/pages/profile-setting/prompt/index.tsx @@ -16,7 +16,7 @@ const PromptManagement = () => {

Prompt templates

- diff --git a/web/src/pages/profile-setting/team/index.tsx b/web/src/pages/profile-setting/team/index.tsx index d919b2f30..c04d03b60 100644 --- a/web/src/pages/profile-setting/team/index.tsx +++ b/web/src/pages/profile-setting/team/index.tsx @@ -32,7 +32,7 @@ const TeamManagement = () => {

Team management

- @@ -46,7 +46,7 @@ const TeamManagement = () => {
- +

Project

@@ -63,7 +63,7 @@ const TeamManagement = () => {
- + {teamMembers.map((member, idx) => ( diff --git a/web/tailwind.config.js b/web/tailwind.config.js index 06e51dc4c..aab2b9455 100644 --- a/web/tailwind.config.js +++ b/web/tailwind.config.js @@ -178,10 +178,6 @@ module.exports = { DEFAULT: 'var(--colors-background-inverse-strong)', foreground: 'var(--background-inverse-standard-foreground)', }, - 'colors-background-inverse-weak': { - DEFAULT: 'var(--colors-background-inverse-weak)', - foreground: 'var(--background-inverse-standard-foreground)', - }, 'colors-background-neutral-standard': { DEFAULT: 'var(--colors-background-neutral-standard)', foreground: 'var(--background-inverse-standard-foreground)', diff --git a/web/tailwind.css b/web/tailwind.css index 2b92885b6..dbcf7ebc1 100644 --- a/web/tailwind.css +++ b/web/tailwind.css @@ -189,7 +189,6 @@ ); --colors-background-inverse-standard: rgba(230, 227, 246, 0.15); --colors-background-inverse-strong: rgba(255, 255, 255, 0.8); - --colors-background-inverse-weak: rgba(184, 181, 203, 0.15); --colors-background-neutral-standard: rgba(11, 10, 18, 1); --colors-background-neutral-strong: rgba(29, 26, 44, 1); --colors-background-neutral-weak: rgba(17, 16, 23, 1);