feat: add placeholder for OPENAI_API_KEY input (#3486)
This commit is contained in:
@@ -8,6 +8,8 @@ import { useAtomValue } from 'jotai';
|
|||||||
import type { FC, ReactNode } from 'react';
|
import type { FC, ReactNode } from 'react';
|
||||||
import { useRef } from 'react';
|
import { useRef } from 'react';
|
||||||
|
|
||||||
|
import { pluginItem } from './style.css';
|
||||||
|
|
||||||
const PluginSettingWrapper: FC<{
|
const PluginSettingWrapper: FC<{
|
||||||
id: string;
|
id: string;
|
||||||
title?: ReactNode;
|
title?: ReactNode;
|
||||||
@@ -45,7 +47,9 @@ export const Plugins = () => {
|
|||||||
data-testid="plugins-title"
|
data-testid="plugins-title"
|
||||||
/>
|
/>
|
||||||
{allowedPlugins.map(plugin => (
|
{allowedPlugins.map(plugin => (
|
||||||
<PluginSettingWrapper key={plugin} id={plugin} title={plugin} />
|
<div className={pluginItem} key={plugin}>
|
||||||
|
<PluginSettingWrapper key={plugin} id={plugin} title={plugin} />
|
||||||
|
</div>
|
||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -7,3 +7,10 @@ export const settingWrapper = style({
|
|||||||
minWidth: '150px',
|
minWidth: '150px',
|
||||||
maxWidth: '250px',
|
maxWidth: '250px',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const pluginItem = style({
|
||||||
|
borderBottom: '1px solid var(--affine-border-color)',
|
||||||
|
transition: '0.3s',
|
||||||
|
padding: '24px 8px',
|
||||||
|
fontSize: 'var(--affine-font-sm)',
|
||||||
|
});
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ export const DebugContent = (): ReactElement => {
|
|||||||
<div>
|
<div>
|
||||||
<FlexWrapper justifyContent="space-between">
|
<FlexWrapper justifyContent="space-between">
|
||||||
<Input
|
<Input
|
||||||
|
width={280}
|
||||||
|
height={32}
|
||||||
defaultValue={key ?? undefined}
|
defaultValue={key ?? undefined}
|
||||||
onChange={useCallback(
|
onChange={useCallback(
|
||||||
(newValue: string) => {
|
(newValue: string) => {
|
||||||
@@ -18,6 +20,7 @@ export const DebugContent = (): ReactElement => {
|
|||||||
},
|
},
|
||||||
[setKey]
|
[setKey]
|
||||||
)}
|
)}
|
||||||
|
placeholder="Enter your API_KEY here"
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
size="large"
|
size="large"
|
||||||
|
|||||||
Reference in New Issue
Block a user