mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
feat(core): workspace embedding settings (#11801)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced "Indexer & Embedding" workspace settings to manage AI embedding for local content, including document ignoring and attachment uploads. - Added UI components for embedding settings, attachments, and ignored documents with pagination and deletion capabilities. - Provided comprehensive file-type icons for attachments. - **Improvements** - Added a new tab for indexing and embedding in workspace settings navigation. - Included test identifiers on key UI elements to enhance automated testing. - **Localization** - Added English localization strings covering all embedding-related UI text and actions. - **Bug Fixes** - Enabled previously skipped end-to-end tests for embedding settings to improve reliability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -5,7 +5,7 @@ import { settingRow } from './share.css';
|
||||
|
||||
export type SettingRowProps = PropsWithChildren<{
|
||||
name: ReactNode;
|
||||
desc: ReactNode;
|
||||
desc?: ReactNode;
|
||||
style?: CSSProperties;
|
||||
onClick?: () => void;
|
||||
spreadCol?: boolean;
|
||||
@@ -41,7 +41,7 @@ export const SettingRow = ({
|
||||
>
|
||||
<div className="left-col">
|
||||
<div className="name">{name}</div>
|
||||
<div className="desc">{desc}</div>
|
||||
{desc && <div className="desc">{desc}</div>}
|
||||
</div>
|
||||
{spreadCol ? <div className="right-col">{children}</div> : children}
|
||||
</div>
|
||||
|
||||
@@ -7,6 +7,7 @@ interface SettingWrapperProps {
|
||||
id?: string;
|
||||
title?: ReactNode;
|
||||
disabled?: boolean;
|
||||
testId?: string;
|
||||
}
|
||||
|
||||
export const SettingWrapper = ({
|
||||
@@ -14,9 +15,14 @@ export const SettingWrapper = ({
|
||||
title,
|
||||
children,
|
||||
disabled,
|
||||
testId,
|
||||
}: PropsWithChildren<SettingWrapperProps>) => {
|
||||
return (
|
||||
<div id={id} className={clsx(wrapper, disabled && wrapperDisabled)}>
|
||||
<div
|
||||
id={id}
|
||||
className={clsx(wrapper, disabled && wrapperDisabled)}
|
||||
data-testid={testId}
|
||||
>
|
||||
{title ? <div className="title">{title}</div> : null}
|
||||
{children}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user