Skip to content

Commit

Permalink
🐛 fix: fix setting typo
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Jun 26, 2023
1 parent 6e6dad8 commit 9419345
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 123 deletions.
197 changes: 98 additions & 99 deletions javascript/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/pages/Content/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Content = memo<DivProps>(({ className, ...props }) => {
const setting = useAppStore((st) => st.setting, isEqual);
const { cx, styles } = useStyles({
isPrimaryColor: Boolean(setting.primaryColor),
isPromptResizable: setting.promotTextarea === 'resizable',
isPromptResizable: setting.promptTextarea === 'resizable',
});
const { mobile } = useResponsive();

Expand Down
24 changes: 6 additions & 18 deletions src/pages/Footer/data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,35 +77,23 @@ export const columns: FProps['columns'] = [
{
items: [
{
description: 'AIGC Components',
openExternal: true,
title: '🤯 Lobe UI',
url: 'https://github.com/lobehub/lobe-ui',
},
{
description: 'Chatbot Client',
description: 'Minifier ExtraNetwrok Covers',
openExternal: true,
title: '🤯 Lobe Chat',
url: 'https://github.com/lobehub/lobe-chat',
title: '✂️ Cover Minifier',
url: 'https://github.com/canisminor1990/sd-webui-cover-minifier',
},
{
description: 'Node Flow Editor',
description: 'AIGC Components',
openExternal: true,
title: '🤯 Lobe Flow',
url: 'https://github.com/lobehub/lobe-flow',
title: '🤯 Lobe UI',
url: 'https://github.com/lobehub/lobe-ui',
},
{
description: 'AI Commit CLI',
openExternal: true,
title: '💌 Lobe Commit',
url: 'https://github.com/lobehub/lobe-commit',
},
{
description: 'Lint Config',
openExternal: true,
title: '📐 Lobe Lint',
url: 'https://github.com/lobehub/lobe-lint',
},
],
title: 'More Products',
},
Expand Down
5 changes: 4 additions & 1 deletion src/pages/QuickSettingSidebar/Inner.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { DivProps } from '@lobehub/ui';
import isEqual from 'fast-deep-equal';
import { memo, useEffect, useRef } from 'react';

import { SidebarBody } from '@/components';
import PromptGroup from '@/slots/PromptEditor';
import { useAppStore } from '@/store';

const Inner = memo<DivProps>(() => {
const setting = useAppStore((st) => st.setting, isEqual);
const sidebarReference: any = useRef<HTMLElement>();

useEffect(() => {
Expand All @@ -14,7 +17,7 @@ const Inner = memo<DivProps>(() => {

return (
<SidebarBody>
<PromptGroup />
{setting.promptEditor && <PromptGroup />}
<div ref={sidebarReference} />
</SidebarBody>
);
Expand Down
9 changes: 9 additions & 0 deletions src/slots/Setting/SettingForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ const SettingForm = memo(() => {
<Item className={styles.item} label="Display mode" name="promotTextarea">
<Segmented options={['scroll', 'resizable']} />
</Item>
<Divider style={{ margin: 0 }} />
<Item
className={styles.item}
label="Prompt editor"
name="promptEditor"
valuePropName="checked"
>
<Switch />
</Item>
</div>
<div className={styles.group}>
<div className={styles.title}>
Expand Down
6 changes: 4 additions & 2 deletions src/store/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ export interface WebuiSetting {
logoType: 'lobe' | 'kitchen' | 'custom';
neutralColor: NeutralColor | undefined;
primaryColor: PrimaryColor | undefined;
promotTextarea: 'scroll' | 'resizable';
promptEditor: boolean;
promptTextarea: 'scroll' | 'resizable';
sidebarExpand: boolean;
sidebarFixedMode: 'fixed' | 'float';
sidebarWidth: number;
Expand All @@ -48,7 +49,8 @@ export const defaultSetting: WebuiSetting = {
logoType: 'lobe',
neutralColor: undefined,
primaryColor: undefined,
promotTextarea: 'scroll',
promptEditor: true,
promptTextarea: 'scroll',
sidebarExpand: true,
sidebarFixedMode: 'fixed',
sidebarWidth: 280,
Expand Down
2 changes: 0 additions & 2 deletions src/styles/components/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ export default (token: Theme) => css`
overflow: hidden;
flex: 1;
padding: 8px 16px;
font-size: 14px;
font-weight: 500;
line-height: 1;
Expand Down

0 comments on commit 9419345

Please sign in to comment.