Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

Feat:app list dark mode (#16110)

KVOJJJin7d620ffd5e79
diff --git a/web/app/(commonLayout)/apps/AppCard.tsx b/web/app/(commonLayout)/apps/AppCard.tsx
index e7e12518978..7de801c2c02 100644
--- a/web/app/(commonLayout)/apps/AppCard.tsx
+++ b/web/app/(commonLayout)/apps/AppCard.tsx
@@ -5,8 +5,6 @@ import { useRouter } from 'next/navigation'
import { useCallback, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { RiMoreFill } from '@remixicon/react'
-import s from './style.module.css'
-import cn from '@/utils/classnames'
import type { App } from '@/types/app'
import Confirm from '@/app/components/base/confirm'
import Toast, { ToastContext } from '@/app/components/base/toast'
@@ -31,6 +29,7 @@ import DSLExportConfirmModal from '@/app/components/workflow/dsl-export-confirm-
import { fetchWorkflowDraft } from '@/service/workflow'
import { fetchInstalledAppList } from '@/service/explore'
import { AppTypeIcon } from '@/app/components/app/type-selector'
+import cn from '@/utils/classnames'
export type AppCardProps = {
app: App
@@ -227,37 +226,37 @@ const AppCard = ({ app, onRefresh }: AppCardProps) => {
}
return (
<div className="relative w-full py-1" onMouseLeave={onMouseLeave}>
- <button className={s.actionItem} onClick={onClickSettings}>
- <span className={s.actionName}>{t('app.editApp')}</span>
+ <button className='h-8 w-[calc(100%_-_8px)] py-[6px] px-3 mx-1 flex items-center gap-2 hover:bg-state-base-hover rounded-lg cursor-pointer' onClick={onClickSettings}>
+ <span className='text-text-secondary system-sm-regular'>{t('app.editApp')}</span>
</button>
<Divider className="!my-1" />
- <button className={s.actionItem} onClick={onClickDuplicate}>
- <span className={s.actionName}>{t('app.duplicate')}</span>
+ <button className='h-8 w-[calc(100%_-_8px)] py-[6px] px-3 mx-1 flex items-center gap-2 hover:bg-state-base-hover rounded-lg cursor-pointer' onClick={onClickDuplicate}>
+ <span className='text-text-secondary system-sm-regular'>{t('app.duplicate')}</span>
</button>
- <button className={s.actionItem} onClick={onClickExport}>
- <span className={s.actionName}>{t('app.export')}</span>
+ <button className='h-8 w-[calc(100%_-_8px)] py-[6px] px-3 mx-1 flex items-center gap-2 hover:bg-state-base-hover rounded-lg cursor-pointer' onClick={onClickExport}>
+ <span className='text-text-secondary system-sm-regular'>{t('app.export')}</span>
</button>
{(app.mode === 'completion' || app.mode === 'chat') && (
<>
<Divider className="!my-1" />
<div
- className='h-9 py-2 px-3 mx-1 flex items-center hover:bg-gray-50 rounded-lg cursor-pointer'
+ className='h-9 py-2 px-3 mx-1 flex items-center hover:bg-state-base-hover rounded-lg cursor-pointer'
onClick={onClickSwitch}
>
- <span className='text-gray-700 text-sm leading-5'>{t('app.switch')}</span>
+ <span className='text-text-secondary text-sm leading-5'>{t('app.switch')}</span>
</div>
</>
)}
<Divider className="!my-1" />
- <button className={s.actionItem} onClick={onClickInstalledApp}>
- <span className={s.actionName}>{t('app.openInExplore')}</span>
+ <button className='h-8 w-[calc(100%_-_8px)] py-[6px] px-3 mx-1 flex items-center gap-2 hover:bg-state-base-hover rounded-lg cursor-pointer' onClick={onClickInstalledApp}>
+ <span className='text-text-secondary system-sm-regular'>{t('app.openInExplore')}</span>
</button>
<Divider className="!my-1" />
<div
- className={cn(s.actionItem, s.deleteActionItem, 'group')}
+ className='group h-8 w-[calc(100%_-_8px)] py-[6px] px-3 mx-1 flex items-center gap-2 hover:bg-state-destructive-hover rounded-lg cursor-pointer'
onClick={onClickDelete}
>
- <span className={cn(s.actionName, 'group-hover:text-red-500')}>
+ <span className='text-text-secondary system-sm-regular group-hover:text-text-destructive'>
{t('common.operation.delete')}
</span>
</div>
diff --git a/web/app/(commonLayout)/apps/style.module.css b/web/app/(commonLayout)/apps/style.module.css
deleted file mode 100644
index 880382ec392..00000000000
--- a/web/app/(commonLayout)/apps/style.module.css
+++ /dev/null
@@ -1,29 +0,0 @@
-
-.commonIcon {
- @apply w-4 h-4 inline-block align-middle;
- background-repeat: no-repeat;
- background-position: center center;
- background-size: contain;
-}
-.actionIcon {
- @apply bg-gray-500;
- mask-image: url(~@/assets/action.svg);
-}
-.actionItem {
- @apply h-8 py-[6px] px-3 mx-1 flex items-center gap-2 hover:bg-gray-100 rounded-lg cursor-pointer;
- width: calc(100% - 0.5rem);
-}
-.deleteActionItem {
- @apply hover:bg-red-50 !important;
-}
-.actionName {
- @apply text-gray-700 text-sm;
-}
-
-/* .completionPic {
- background-image: url(~@/app/components/app-sidebar/completion.png)
-}
-
-.expertPic {
- background-image: url(~@/app/components/app-sidebar/expert.png)
-} */
diff --git a/web/app/(commonLayout)/datasets/DatasetCard.tsx b/web/app/(commonLayout)/datasets/DatasetCard.tsx
index ad83a41dff9..016c9dcabba 100644
--- a/web/app/(commonLayout)/datasets/DatasetCard.tsx
+++ b/web/app/(commonLayout)/datasets/DatasetCard.tsx
@@ -84,17 +84,17 @@ const DatasetCard = ({
}
return (
<div className="relative w-full py-1" onMouseLeave={onMouseLeave}>
- <div className='h-8 py-[6px] px-3 mx-1 flex items-center gap-2 hover:bg-gray-100 rounded-lg cursor-pointer' onClick={onClickRename}>
- <span className='text-gray-700 text-sm'>{t('common.operation.settings')}</span>
+ <div className='h-8 py-[6px] px-3 mx-1 flex items-center gap-2 hover:bg-state-base-hover rounded-lg cursor-pointer' onClick={onClickRename}>
+ <span className='text-text-secondary text-sm'>{t('common.operation.settings')}</span>
</div>
{props.showDelete && (
<>
<Divider className="!my-1" />
<div
- className='group h-8 py-[6px] px-3 mx-1 flex items-center gap-2 hover:bg-red-50 rounded-lg cursor-pointer'
+ className='group h-8 py-[6px] px-3 mx-1 flex items-center gap-2 hover:bg-state-destructive-hover rounded-lg cursor-pointer'
onClick={onClickDelete}
>
- <span className={cn('text-gray-700 text-sm', 'group-hover:text-red-500')}>
+ <span className={cn('text-text-secondary text-sm', 'group-hover:text-text-destructive')}>
{t('common.operation.delete')}
</span>
</div>
@@ -135,7 +135,7 @@ const DatasetCard = ({
<Tooltip
popupContent={t('dataset.unavailableTip')}
>
- <span className='shrink-0 inline-flex w-max ml-1 px-1 border border-gray-200 rounded-md text-gray-500 text-xs font-normal leading-[18px]'>{t('dataset.unavailable')}</span>
+ <span className='shrink-0 inline-flex w-max ml-1 px-1 border border-divider-regular rounded-md text-text-tertiary text-xs font-normal leading-[18px]'>{t('dataset.unavailable')}</span>
</Tooltip>
)}
</div>
@@ -150,9 +150,9 @@ const DatasetCard = ({
</>
: <>
<span>{dataset.document_count}{t('dataset.documentCount')}</span>
- <span className='shrink-0 mx-0.5 w-1 text-gray-400'>·</span>
+ <span className='shrink-0 mx-0.5 w-1 text-text-tertiary'>·</span>
<span>{Math.round(dataset.word_count / 1000)}{t('dataset.wordCount')}</span>
- <span className='shrink-0 mx-0.5 w-1 text-gray-400'>·</span>
+ <span className='shrink-0 mx-0.5 w-1 text-text-tertiary'>·</span>
<span>{dataset.app_count}{t('dataset.appCount')}</span>
</>
}
@@ -192,7 +192,7 @@ const DatasetCard = ({
/>
</div>
</div>
- <div className='!hidden group-hover:!flex shrink-0 mx-1 w-[1px] h-[14px] bg-gray-200' />
+ <div className='!hidden group-hover:!flex shrink-0 mx-1 w-[1px] h-[14px] bg-divider-regular' />
<div className='!hidden group-hover:!flex shrink-0'>
<CustomPopover
htmlContent={<Operations showDelete={!isCurrentWorkspaceDatasetOperator} />}
@@ -202,7 +202,7 @@ const DatasetCard = ({
<div
className='flex items-center justify-center w-8 h-8 cursor-pointer rounded-md'
>
- <RiMoreFill className='w-4 h-4 text-gray-700' />
+ <RiMoreFill className='w-4 h-4 text-text-secondary' />
</div>
}
btnClassName={open =>
diff --git a/web/app/(commonLayout)/datasets/DatasetFooter.tsx b/web/app/(commonLayout)/datasets/DatasetFooter.tsx
index b87098000f6..179948dabe8 100644
--- a/web/app/(commonLayout)/datasets/DatasetFooter.tsx
+++ b/web/app/(commonLayout)/datasets/DatasetFooter.tsx
@@ -8,9 +8,9 @@ const DatasetFooter = () => {
return (
<footer className='px-12 py-6 grow-0 shrink-0'>
<h3 className='text-xl font-semibold leading-tight text-gradient'>{t('dataset.didYouKnow')}</h3>
- <p className='mt-1 text-sm font-normal leading-tight text-gray-700'>
- {t('dataset.intro1')}<span className='inline-flex items-center gap-1 text-blue-600'>{t('dataset.intro2')}</span>{t('dataset.intro3')}<br />
- {t('dataset.intro4')}<span className='inline-flex items-center gap-1 text-blue-600'>{t('dataset.intro5')}</span>{t('dataset.intro6')}
+ <p className='mt-1 text-sm font-normal leading-tight text-text-secondary'>
+ {t('dataset.intro1')}<span className='inline-flex items-center gap-1 text-text-accent'>{t('dataset.intro2')}</span>{t('dataset.intro3')}<br />
+ {t('dataset.intro4')}<span className='inline-flex items-center gap-1 text-text-accent'>{t('dataset.intro5')}</span>{t('dataset.intro6')}
</p>
</footer>
)
diff --git a/web/app/components/app/duplicate-modal/index.tsx b/web/app/components/app/duplicate-modal/index.tsx
index 25a5cbf6c11..6d071df3694 100644
--- a/web/app/components/app/duplicate-modal/index.tsx
+++ b/web/app/components/app/duplicate-modal/index.tsx
@@ -1,8 +1,8 @@
'use client'
import React, { useState } from 'react'
import { useTranslation } from 'react-i18next'
+import { RiCloseLine } from '@remixicon/react'
import AppIconPicker from '../../base/app-icon-picker'
-import s from './style.module.css'
import cn from '@/utils/classnames'
import Modal from '@/app/components/base/modal'
import Button from '@/app/components/base/button'
@@ -13,7 +13,7 @@ import { useProviderContext } from '@/context/provider-context'
import AppsFull from '@/app/components/billing/apps-full-in-dialog'
import type { AppIconType } from '@/types/app'
-export interface DuplicateAppModalProps {
+export type DuplicateAppModalProps = {
appName: string
icon_type: AppIconType | null
icon: string
@@ -72,12 +72,14 @@ const DuplicateAppModal = ({
<Modal
isShow={show}
onClose={() => { }}
- className={cn(s.modal, '!max-w-[480px]', 'px-8')}
+ className={cn('relative !max-w-[480px]', 'px-8')}
>
- <span className={s.close} onClick={onHide} />
- <div className={s.title}>{t('app.duplicateTitle')}</div>
- <div className={s.content}>
- <div className={s.subTitle}>{t('explore.appCustomize.subTitle')}</div>
+ <div className='absolute right-4 top-4 p-2 cursor-pointer' onClick={onHide}>
+ <RiCloseLine className='w-4 h-4 text-text-tertiary' />
+ </div>
+ <div className='relative mt-3 mb-9 text-xl font-semibold leading-[30px] text-text-primary'>{t('app.duplicateTitle')}</div>
+ <div className='mb-9 system-sm-regular text-text-secondary'>
+ <div className='mb-2 system-md-medium'>{t('explore.appCustomize.subTitle')}</div>
<div className='flex items-center justify-between space-x-2'>
<AppIcon
size='large'
diff --git a/web/app/components/app/duplicate-modal/style.module.css b/web/app/components/app/duplicate-modal/style.module.css
deleted file mode 100644
index 798a463b8ce..00000000000
--- a/web/app/components/app/duplicate-modal/style.module.css
+++ /dev/null
@@ -1,36 +0,0 @@
-.modal {
- position: relative;
-}
-
-.modal .close {
- position: absolute;
- right: 16px;
- top: 25px;
- width: 32px;
- height: 32px;
- border-radius: 8px;
- background: center no-repeat url(~@/app/components/datasets/create/assets/close.svg);
- background-size: 16px;
- cursor: pointer;
-}
-
-.modal .title {
- @apply mb-9;
- font-weight: 600;
- font-size: 20px;
- line-height: 30px;
- color: #101828;
-}
-
-.modal .content {
- @apply mb-9;
- font-weight: 400;
- font-size: 14px;
- line-height: 20px;
- color: #101828;
-}
-
-.subTitle {
- margin-bottom: 8px;
- font-weight: 500;
-}
\ No newline at end of file
diff --git a/web/app/components/app/switch-app-modal/index.tsx b/web/app/components/app/switch-app-modal/index.tsx
index e1fe809e104..d32f68377b6 100644
--- a/web/app/components/app/switch-app-modal/index.tsx
+++ b/web/app/components/app/switch-app-modal/index.tsx
@@ -6,7 +6,6 @@ import { useContext } from 'use-context-selector'
import { useTranslation } from 'react-i18next'
import { RiCloseLine } from '@remixicon/react'
import AppIconPicker from '../../base/app-icon-picker'
-import s from './style.module.css'
import cn from '@/utils/classnames'
import Checkbox from '@/app/components/base/checkbox'
import Button from '@/app/components/base/button'
@@ -25,7 +24,7 @@ import { AlertTriangle } from '@/app/components/base/icons/src/vender/solid/aler
import AppIcon from '@/app/components/base/app-icon'
import { useStore as useAppStore } from '@/app/components/app/store'
-interface SwitchAppModalProps {
+type SwitchAppModalProps = {
show: boolean
appDetail: App
onSuccess?: () => void
@@ -95,24 +94,24 @@ const SwitchAppModal = ({ show, appDetail, inAppDetail = false, onSuccess, onClo
return (
<>
<Modal
- className={cn('p-8 max-w-[600px] w-[600px]', s.bg)}
+ className={cn('p-8 max-w-[600px] w-[600px]')}
isShow={show}
onClose={() => { }}
>
<div className='absolute right-4 top-4 p-2 cursor-pointer' onClick={onClose}>
- <RiCloseLine className='w-4 h-4 text-gray-500' />
+ <RiCloseLine className='w-4 h-4 text-text-tertiary' />
</div>
- <div className='w-12 h-12 p-3 bg-white rounded-xl border-[0.5px] border-gray-100 shadow-xl'>
+ <div className='w-12 h-12 p-3 bg-background-default-burn rounded-xl border-[0.5px] border-divider-regular shadow-xl'>
<AlertTriangle className='w-6 h-6 text-[rgb(247,144,9)]' />
</div>
- <div className='relative mt-3 text-xl font-semibold leading-[30px] text-gray-900'>{t('app.switch')}</div>
- <div className='my-1 text-gray-500 text-sm leading-5'>
+ <div className='relative mt-3 text-xl font-semibold leading-[30px] text-text-primary'>{t('app.switch')}</div>
+ <div className='my-1 text-text-tertiary text-sm leading-5'>
<span>{t('app.switchTipStart')}</span>
- <span className='text-gray-700 font-medium'>{t('app.switchTip')}</span>
+ <span className='text-text-secondary font-medium'>{t('app.switchTip')}</span>
<span>{t('app.switchTipEnd')}</span>
</div>
<div className='pb-4'>
- <div className='py-2 text-sm font-medium leading-[20px] text-gray-900'>{t('app.switchLabel')}</div>
+ <div className='py-2 text-sm font-medium leading-[20px] text-text-primary'>{t('app.switchLabel')}</div>
<div className='flex items-center justify-between space-x-2'>
<AppIcon
size='large'
@@ -147,7 +146,7 @@ const SwitchAppModal = ({ show, appDetail, inAppDetail = false, onSuccess, onClo
<div className='pt-6 flex justify-between items-center'>
<div className='flex items-center'>
<Checkbox className='shrink-0' checked={removeOriginal} onCheck={() => setRemoveOriginal(!removeOriginal)} />
- <div className="ml-2 text-sm leading-5 text-gray-700 cursor-pointer" onClick={() => setRemoveOriginal(!removeOriginal)}>{t('app.removeOriginal')}</div>
+ <div className="ml-2 text-sm leading-5 text-text-secondary cursor-pointer" onClick={() => setRemoveOriginal(!removeOriginal)}>{t('app.removeOriginal')}</div>
</div>
<div className='flex items-center'>
<Button className='mr-2' onClick={onClose}>{t('app.newApp.Cancel')}</Button>
diff --git a/web/app/components/app/switch-app-modal/style.module.css b/web/app/components/app/switch-app-modal/style.module.css
deleted file mode 100644
index 14367ec5759..00000000000
--- a/web/app/components/app/switch-app-modal/style.module.css
+++ /dev/null
@@ -1,3 +0,0 @@
-.bg {
- background: linear-gradient(180deg, rgba(247, 144, 9, 0.05) 0%, rgba(247, 144, 9, 0.00) 24.41%), #F9FAFB;
-}
diff --git a/web/app/components/base/tag-management/index.tsx b/web/app/components/base/tag-management/index.tsx
index 26d18ffcf75..650e2acd434 100644
--- a/web/app/components/base/tag-management/index.tsx
+++ b/web/app/components/base/tag-management/index.tsx
@@ -64,13 +64,13 @@ const TagManagementModal = ({ show, type }: TagManagementModalProps) => {
isShow={show}
onClose={() => setShowTagManagementModal(false)}
>
- <div className='relative pb-2 text-xl font-semibold leading-[30px] text-gray-900'>{t('common.tag.manageTags')}</div>
+ <div className='relative pb-2 text-xl font-semibold leading-[30px] text-text-primary'>{t('common.tag.manageTags')}</div>
<div className='absolute right-4 top-4 p-2 cursor-pointer' onClick={() => setShowTagManagementModal(false)}>
- <RiCloseLine className='w-4 h-4 text-gray-500' />
+ <RiCloseLine className='w-4 h-4 text-text-tertiary' />
</div>
<div className='mt-3 flex flex-wrap gap-2'>
<input
- className='shrink-0 w-[100px] px-2 py-1 rounded-lg border border-dashed border-gray-200 text-sm leading-5 text-gray-700 outline-none appearance-none placeholder:text-gray-300 caret-primary-600 focus:border-solid'
+ className='shrink-0 w-[100px] px-2 py-1 bg-transparent rounded-lg border border-dashed border-divider-regular text-sm leading-5 text-text-secondary outline-none appearance-none placeholder:text-text-quaternary caret-primary-600 focus:border-solid'
placeholder={t('common.tag.addNew') || ''}
autoFocus
value={name}
diff --git a/web/app/components/base/tag-management/selector.tsx b/web/app/components/base/tag-management/selector.tsx
index 4fdb2c2d8d1..0e8a9dd8d81 100644
--- a/web/app/components/base/tag-management/selector.tsx
+++ b/web/app/components/base/tag-management/selector.tsx
@@ -125,8 +125,8 @@ const Panel = (props: PanelProps) => {
})
return (
- <div className='relative w-full bg-white rounded-lg border-[0.5px] border-gray-200'>
- <div className='p-2 border-b-[0.5px] border-black/5'>
+ <div className='relative w-full bg-components-input-bg-hover rounded-lg border-[0.5px] border-components-panel-border'>
+ <div className='p-2 border-b-[0.5px] border-divider-regular'>
<Input
showLeftIcon
showClearIcon
@@ -138,9 +138,9 @@ const Panel = (props: PanelProps) => {
</div>
{keywords && notExisted && (
<div className='p-1'>
- <div className='flex items-center gap-2 pl-3 py-[6px] pr-2 rounded-lg cursor-pointer hover:bg-gray-100' onClick={createNewTag}>
- <RiAddLine className='h-4 w-4 text-gray-500' />
- <div className='grow text-sm text-gray-700 leading-5 truncate'>
+ <div className='flex items-center gap-2 pl-3 py-[6px] pr-2 rounded-lg cursor-pointer hover:bg-state-base-hover' onClick={createNewTag}>
+ <RiAddLine className='h-4 w-4 text-text-tertiary' />
+ <div className='grow text-sm text-text-secondary leading-5 truncate'>
{`${t('common.tag.create')} `}
<span className='font-medium'>{`"${keywords}"`}</span>
</div>
@@ -155,7 +155,7 @@ const Panel = (props: PanelProps) => {
{filteredSelectedTagList.map(tag => (
<div
key={tag.id}
- className='flex items-center gap-2 pl-3 py-[6px] pr-2 rounded-lg cursor-pointer hover:bg-gray-100'
+ className='flex items-center gap-2 pl-3 py-[6px] pr-2 rounded-lg cursor-pointer hover:bg-state-base-hover'
onClick={() => selectTag(tag)}
>
<Checkbox
@@ -163,13 +163,13 @@ const Panel = (props: PanelProps) => {
checked={selectedTagIDs.includes(tag.id)}
onCheck={() => { }}
/>
- <div title={tag.name} className='grow text-sm text-gray-700 leading-5 truncate'>{tag.name}</div>
+ <div title={tag.name} className='grow text-sm text-text-secondary leading-5 truncate'>{tag.name}</div>
</div>
))}
{filteredTagList.map(tag => (
<div
key={tag.id}
- className='flex items-center gap-2 pl-3 py-[6px] pr-2 rounded-lg cursor-pointer hover:bg-gray-100'
+ className='flex items-center gap-2 pl-3 py-[6px] pr-2 rounded-lg cursor-pointer hover:bg-state-base-hover'
onClick={() => selectTag(tag)}
>
<Checkbox
@@ -177,7 +177,7 @@ const Panel = (props: PanelProps) => {
checked={selectedTagIDs.includes(tag.id)}
onCheck={() => { }}
/>
- <div title={tag.name} className='grow text-sm text-gray-700 leading-5 truncate'>{tag.name}</div>
+ <div title={tag.name} className='grow text-sm text-text-secondary leading-5 truncate'>{tag.name}</div>
</div>
))}
</div>
@@ -185,16 +185,16 @@ const Panel = (props: PanelProps) => {
{!keywords && !filteredTagList.length && !filteredSelectedTagList.length && (
<div className='p-1'>
<div className='p-3 flex flex-col items-center gap-1'>
- <Tag03 className='h-6 w-6 text-gray-300' />
- <div className='text-gray-500 text-xs leading-[14px]'>{t('common.tag.noTag')}</div>
+ <Tag03 className='h-6 w-6 text-text-quaternary' />
+ <div className='text-text-tertiary text-xs leading-[14px]'>{t('common.tag.noTag')}</div>
</div>
</div>
)}
<Divider className='!h-[1px] !my-0' />
<div className='p-1'>
- <div className='flex items-center gap-2 pl-3 py-[6px] pr-2 rounded-lg cursor-pointer hover:bg-gray-100' onClick={() => setShowTagManagementModal(true)}>
- <Tag03 className='h-4 w-4 text-gray-500' />
- <div className='grow text-sm text-gray-700 leading-5 truncate'>
+ <div className='flex items-center gap-2 pl-3 py-[6px] pr-2 rounded-lg cursor-pointer hover:bg-state-base-hover' onClick={() => setShowTagManagementModal(true)}>
+ <Tag03 className='h-4 w-4 text-text-tertiary' />
+ <div className='grow text-sm text-text-secondary leading-5 truncate'>
{t('common.tag.manageTags')}
</div>
</div>
@@ -232,7 +232,7 @@ const TagSelector: FC<TagSelectorProps> = ({
const Trigger = () => {
return (
<div className={cn(
- 'group/tip relative w-full flex items-center gap-1 px-2 py-[7px] rounded-md cursor-pointer hover:bg-gray-100',
+ 'group/tip relative w-full flex items-center gap-1 px-2 py-[7px] rounded-md cursor-pointer hover:bg-state-base-hover',
)}>
<Tag01 className='shrink-0 w-3 h-3' />
<div className='grow text-xs text-start leading-[18px] font-normal truncate'>
@@ -261,8 +261,8 @@ const TagSelector: FC<TagSelectorProps> = ({
btnElement={<Trigger />}
btnClassName={open =>
cn(
- open ? '!bg-gray-100 !text-gray-700' : '!bg-transparent',
- '!w-full !p-0 !border-0 !text-gray-500 hover:!bg-gray-100 hover:!text-gray-700',
+ open ? '!bg-state-base-hover !text-text-secondary' : '!bg-transparent',
+ '!w-full !p-0 !border-0 !text-text-tertiary hover:!bg-state-base-hover hover:!text-text-secondary',
)
}
popupClassName='!w-full !ring-0'
diff --git a/web/app/components/base/tag-management/style.module.css b/web/app/components/base/tag-management/style.module.css
deleted file mode 100644
index 14367ec5759..00000000000
--- a/web/app/components/base/tag-management/style.module.css
+++ /dev/null
@@ -1,3 +0,0 @@
-.bg {
- background: linear-gradient(180deg, rgba(247, 144, 9, 0.05) 0%, rgba(247, 144, 9, 0.00) 24.41%), #F9FAFB;
-}
diff --git a/web/app/components/base/tag-management/tag-item-editor.tsx b/web/app/components/base/tag-management/tag-item-editor.tsx
index 0605f28cf6d..a3a15df8dda 100644
--- a/web/app/components/base/tag-management/tag-item-editor.tsx
+++ b/web/app/components/base/tag-management/tag-item-editor.tsx
@@ -103,29 +103,29 @@ const TagItemEditor: FC<TagItemEditorProps> = ({
return (
<>
- <div className={cn('shrink-0 flex items-center gap-0.5 pr-1 pl-2 py-1 rounded-lg border border-gray-200 text-sm leading-5 text-gray-700')}>
+ <div className={cn('shrink-0 flex items-center gap-0.5 pr-1 pl-2 py-1 rounded-lg border border-components-panel-border text-sm leading-5 text-text-secondary')}>
{!isEditing && (
<>
- <div className='text-sm leading-5 text-gray-700'>
+ <div className='text-sm leading-5 text-text-secondary'>
{tag.name}
</div>
- <div className='shrink-0 px-1 text-sm leading-4.5 text-gray-500 font-medium'>{tag.binding_count}</div>
- <div className='group/edit shrink-0 p-1 rounded-md cursor-pointer hover:bg-black/5' onClick={() => setIsEditing(true)}>
- <RiEditLine className='w-3 h-3 text-gray-500 group-hover/edit:text-gray-800' />
+ <div className='shrink-0 px-1 text-sm leading-4.5 text-text-tertiary font-medium'>{tag.binding_count}</div>
+ <div className='group/edit shrink-0 p-1 rounded-md cursor-pointer hover:bg-state-base-hover' onClick={() => setIsEditing(true)}>
+ <RiEditLine className='w-3 h-3 text-text-tertiary group-hover/edit:text-text-secondary' />
</div>
- <div className='group/remove shrink-0 p-1 rounded-md cursor-pointer hover:bg-black/5' onClick={() => {
+ <div className='group/remove shrink-0 p-1 rounded-md cursor-pointer hover:bg-state-base-hover' onClick={() => {
if (tag.binding_count)
setShowRemoveModal(true)
else
handleRemove()
}}>
- <RiDeleteBinLine className='w-3 h-3 text-gray-500 group-hover/remove:text-gray-800' />
+ <RiDeleteBinLine className='w-3 h-3 text-text-tertiary group-hover/remove:text-text-secondary' />
</div>
</>
)}
{isEditing && (
<input
- className='shrink-0 outline-none appearance-none placeholder:text-gray-300 caret-primary-600'
+ className='shrink-0 outline-none appearance-none placeholder:text-text-quaternary caret-primary-600'
autoFocus
value={name}
onChange={e => setName(e.target.value)}
diff --git a/web/app/components/base/tag-management/tag-remove-modal.tsx b/web/app/components/base/tag-management/tag-remove-modal.tsx
index 3e4d08fe3d3..e86c2461d2a 100644
--- a/web/app/components/base/tag-management/tag-remove-modal.tsx
+++ b/web/app/components/base/tag-management/tag-remove-modal.tsx
@@ -2,7 +2,6 @@
import { useTranslation } from 'react-i18next'
import { RiCloseLine } from '@remixicon/react'
-import s from './style.module.css'
import cn from '@/utils/classnames'
import Button from '@/app/components/base/button'
import Modal from '@/app/components/base/modal'
@@ -21,21 +20,21 @@ const TagRemoveModal = ({ show, tag, onConfirm, onClose }: TagRemoveModalProps)
return (
<Modal
- className={cn('p-8 max-w-[480px] w-[480px]', s.bg)}
+ className={cn('p-8 max-w-[480px] w-[480px]')}
isShow={show}
onClose={() => { }}
>
<div className='absolute right-4 top-4 p-2 cursor-pointer' onClick={onClose}>
- <RiCloseLine className='w-4 h-4 text-gray-500' />
+ <RiCloseLine className='w-4 h-4 text-text-tertiary' />
</div>
- <div className='w-12 h-12 p-3 bg-white rounded-xl border-[0.5px] border-gray-100 shadow-xl'>
+ <div className='w-12 h-12 p-3 bg-background-default-burn rounded-xl border-[0.5px] border-divider-regular shadow-xl'>
<AlertTriangle className='w-6 h-6 text-[rgb(247,144,9)]' />
</div>
- <div className='mt-3 text-xl font-semibold leading-[30px] text-gray-900'>
+ <div className='mt-3 text-xl font-semibold leading-[30px] text-text-primary'>
{`${t('common.tag.delete')} `}
<span>{`"${tag.name}"`}</span>
</div>
- <div className='my-1 text-gray-500 text-sm leading-5'>
+ <div className='my-1 text-text-tertiary text-sm leading-5'>
{t('common.tag.deleteTip')}
</div>
<div className='pt-6 flex items-center justify-end'>
diff --git a/web/app/components/datasets/create/website/base/checkbox-with-label.tsx b/web/app/components/datasets/create/website/base/checkbox-with-label.tsx
index 25d40fe0763..d055a794901 100644
--- a/web/app/components/datasets/create/website/base/checkbox-with-label.tsx
+++ b/web/app/components/datasets/create/website/base/checkbox-with-label.tsx
@@ -25,7 +25,7 @@ const CheckboxWithLabel: FC<Props> = ({
return (
<label className={cn(className, 'flex items-center h-7 space-x-2')}>
<Checkbox checked={isChecked} onCheck={() => onChange(!isChecked)} />
- <div className={cn(labelClassName, 'text-sm font-normal text-gray-800')}>{label}</div>
+ <div className={cn(labelClassName, 'text-sm font-normal text-text-secondary')}>{label}</div>
{tooltip && (
<Tooltip
popupContent={
diff --git a/web/app/components/datasets/rename-modal/index.tsx b/web/app/components/datasets/rename-modal/index.tsx
index 22c7f8e9889..b2159276054 100644
--- a/web/app/components/datasets/rename-modal/index.tsx
+++ b/web/app/components/datasets/rename-modal/index.tsx
@@ -14,7 +14,7 @@ import { ToastContext } from '@/app/components/base/toast'
import type { DataSet } from '@/models/datasets'
import { updateDatasetSetting } from '@/service/datasets'
-interface RenameDatasetModalProps {
+type RenameDatasetModalProps = {
show: boolean
dataset: DataSet
onSuccess?: () => void
@@ -68,13 +68,13 @@ const RenameDatasetModal = ({ show, dataset, onSuccess, onClose }: RenameDataset
isShow={show}
onClose={() => { }}
>
- <div className='relative pb-2 text-xl font-medium leading-[30px] text-gray-900'>{t('datasetSettings.title')}</div>
+ <div className='relative pb-2 text-xl font-medium leading-[30px] text-text-primary'>{t('datasetSettings.title')}</div>
<div className='absolute right-4 top-4 p-2 cursor-pointer' onClick={onClose}>
- <RiCloseLine className='w-4 h-4 text-gray-500' />
+ <RiCloseLine className='w-4 h-4 text-text-tertiary' />
</div>
<div>
<div className={cn('flex justify-between py-4 flex-wrap items-center')}>
- <div className='shrink-0 py-2 text-sm font-medium leading-[20px] text-gray-900'>
+ <div className='shrink-0 py-2 text-sm font-medium leading-[20px] text-text-primary'>
{t('datasetSettings.form.name')}
</div>
<Input
@@ -85,7 +85,7 @@ const RenameDatasetModal = ({ show, dataset, onSuccess, onClose }: RenameDataset
/>
</div>
<div className={cn('flex justify-between py-4 flex-wrap items-center')}>
- <div className='shrink-0 py-2 text-sm font-medium leading-[20px] text-gray-900'>
+ <div className='shrink-0 py-2 text-sm font-medium leading-[20px] text-text-primary'>
{t('datasetSettings.form.desc')}
</div>
<div className='w-full'>
diff --git a/web/app/components/explore/create-app-modal/index.tsx b/web/app/components/explore/create-app-modal/index.tsx
index 152f3b92824..08642fb4862 100644
--- a/web/app/components/explore/create-app-modal/index.tsx
+++ b/web/app/components/explore/create-app-modal/index.tsx
@@ -14,7 +14,7 @@ import { useProviderContext } from '@/context/provider-context'
import AppsFull from '@/app/components/billing/apps-full-in-dialog'
import type { AppIconType } from '@/types/app'
-export interface CreateAppModalProps {
+export type CreateAppModalProps = {
show: boolean
isEditModal?: boolean
appName: string
@@ -89,18 +89,18 @@ const CreateAppModal = ({
className='relative !max-w-[480px] px-8'
>
<div className='absolute right-4 top-4 p-2 cursor-pointer' onClick={onHide}>
- <RiCloseLine className='w-4 h-4 text-gray-500' />
+ <RiCloseLine className='w-4 h-4 text-text-tertiary' />
</div>
{isEditModal && (
- <div className='mb-9 font-semibold text-xl leading-[30px] text-gray-900'>{t('app.editAppTitle')}</div>
+ <div className='mb-9 font-semibold text-xl leading-[30px] text-text-primary'>{t('app.editAppTitle')}</div>
)}
{!isEditModal && (
- <div className='mb-9 font-semibold text-xl leading-[30px] text-gray-900'>{t('explore.appCustomize.title', { name: appName })}</div>
+ <div className='mb-9 font-semibold text-xl leading-[30px] text-text-primary'>{t('explore.appCustomize.title', { name: appName })}</div>
)}
<div className='mb-9'>
{/* icon & name */}
<div className='pt-2'>
- <div className='py-2 text-sm font-medium leading-[20px] text-gray-900'>{t('app.newApp.captionName')}</div>
+ <div className='py-2 text-sm font-medium leading-[20px] text-text-primary'>{t('app.newApp.captionName')}</div>
<div className='flex items-center justify-between space-x-2'>
<AppIcon
size='large'
@@ -121,7 +121,7 @@ const CreateAppModal = ({
</div>
{/* description */}
<div className='pt-2'>
- <div className='py-2 text-sm font-medium leading-[20px] text-gray-900'>{t('app.newApp.captionDescription')}</div>
+ <div className='py-2 text-sm font-medium leading-[20px] text-text-primary'>{t('app.newApp.captionDescription')}</div>
<Textarea
className='resize-none'
placeholder={t('app.newApp.appDescriptionPlaceholder') || ''}
@@ -133,13 +133,13 @@ const CreateAppModal = ({
{isEditModal && (appMode === 'chat' || appMode === 'advanced-chat' || appMode === 'agent-chat') && (
<div className='pt-2'>
<div className='flex justify-between items-center'>
- <div className='py-2 text-sm font-medium leading-[20px] text-gray-900'>{t('app.answerIcon.title')}</div>
+ <div className='py-2 text-sm font-medium leading-[20px] text-text-primary'>{t('app.answerIcon.title')}</div>
<Switch
defaultValue={useIconAsAnswerIcon}
onChange={v => setUseIconAsAnswerIcon(v)}
/>
</div>
- <p className='body-xs-regular text-gray-500'>{t('app.answerIcon.descriptionInExplore')}</p>
+ <p className='body-xs-regular text-text-tertiary'>{t('app.answerIcon.descriptionInExplore')}</p>
</div>
)}
{!isEditModal && isAppsFull && <AppsFull loc='app-explore-create' />}