feat: update licensing terms and UI components
- Revised the licensing agreement to introduce a User-Segmented Dual Licensing model, detailing conditions for individual and organizational use. - Enhanced UI components to display a specific empty state image in various popups and pages. - Adjusted styles in MiniAppIconsManager and MiniAppSettings for improved layout and appearance. - Updated default web search provider to 'local-bing' and modified font size in ProviderOAuth description for better readability. - Changed window style setting from 'transparent' to 'opaque' for a more consistent user experience.
This commit is contained in:
@@ -48,7 +48,7 @@ const MinAppsPopover: FC<Props> = ({ children }) => {
|
||||
))}
|
||||
{isEmpty(minapps) && (
|
||||
<Center>
|
||||
<Empty />
|
||||
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
|
||||
</Center>
|
||||
)}
|
||||
</AppsContainer>
|
||||
|
||||
@@ -183,7 +183,7 @@ const FilesPage: FC = () => {
|
||||
{dataSource && dataSource?.length > 0 ? (
|
||||
<FileList id={fileType} list={dataSource} files={sortedFiles} />
|
||||
) : (
|
||||
<Empty />
|
||||
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
|
||||
)}
|
||||
</MainContent>
|
||||
</ContentContainer>
|
||||
|
||||
@@ -54,7 +54,7 @@ const TopicMessages: FC<Props> = ({ topic, ...props }) => {
|
||||
<Divider style={{ margin: '8px auto 15px' }} variant="dashed" />
|
||||
</div>
|
||||
))}
|
||||
{isEmpty && <Empty />}
|
||||
{isEmpty && <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />}
|
||||
{!isEmpty && (
|
||||
<HStack justifyContent="center">
|
||||
<Button onClick={() => onContinueChat(topic)} icon={<MessageOutlined />}>
|
||||
|
||||
@@ -32,6 +32,7 @@ const Mermaid: React.FC<Props> = ({ chart }) => {
|
||||
}
|
||||
}, [chart, theme])
|
||||
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
const renderMermaid = useCallback(debounce(renderMermaidBase, 1000), [renderMermaidBase])
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { getShikiInstance } from '@renderer/utils/shiki'
|
||||
import { Card } from 'antd'
|
||||
import MarkdownIt from 'markdown-it'
|
||||
import { npxFinder } from 'npx-scope-finder'
|
||||
import { useEffect, useRef, useState } from 'react'
|
||||
import { useCallback, useEffect, useRef, useState } from 'react'
|
||||
import styled from 'styled-components'
|
||||
|
||||
interface McpDescriptionProps {
|
||||
@@ -22,18 +22,18 @@ const MCPDescription = ({ searchKey }: McpDescriptionProps) => {
|
||||
)
|
||||
const { theme } = useTheme()
|
||||
|
||||
useEffect(() => {
|
||||
const sk = getShikiInstance(theme)
|
||||
md.current.use(sk)
|
||||
getMcpInfo()
|
||||
}, [theme, searchKey])
|
||||
|
||||
const getMcpInfo = async () => {
|
||||
const getMcpInfo = useCallback(async () => {
|
||||
setLoading(true)
|
||||
const packages = await npxFinder(searchKey).finally(() => setLoading(false))
|
||||
const readme = packages[0]?.original?.readme ?? '暂无描述'
|
||||
setRenderedMarkdown(md.current.render(readme))
|
||||
}
|
||||
}, [md, searchKey])
|
||||
|
||||
useEffect(() => {
|
||||
const sk = getShikiInstance(theme)
|
||||
md.current.use(sk)
|
||||
getMcpInfo()
|
||||
}, [getMcpInfo, theme])
|
||||
|
||||
return (
|
||||
<Section>
|
||||
|
||||
@@ -112,7 +112,7 @@ const MiniAppIconsManager: FC<MiniAppManagerProps> = ({
|
||||
|
||||
return (
|
||||
<DragDropContext onDragEnd={onDragEnd}>
|
||||
<ProgramSection>
|
||||
<ProgramSection style={{ background: 'transparent' }}>
|
||||
{(['visible', 'disabled'] as const).map((listType) => (
|
||||
<ProgramColumn key={listType}>
|
||||
<h4>{t(`settings.miniapps.${listType}`)}</h4>
|
||||
|
||||
@@ -93,7 +93,7 @@ const MiniAppSettings: FC = () => {
|
||||
/>
|
||||
</BorderedContainer>
|
||||
<SettingDivider />
|
||||
<SettingRow>
|
||||
<SettingRow style={{ height: 40, alignItems: 'center' }}>
|
||||
<SettingLabelGroup>
|
||||
<SettingRowTitle>{t('settings.miniapps.open_link_external.title')}</SettingRowTitle>
|
||||
</SettingLabelGroup>
|
||||
|
||||
@@ -77,7 +77,7 @@ const ProviderLogo = styled.img`
|
||||
`
|
||||
|
||||
const Description = styled.div`
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
color: var(--color-text-2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -149,7 +149,7 @@ export const initialState: SettingsState = {
|
||||
trayOnClose: true,
|
||||
tray: true,
|
||||
theme: ThemeMode.auto,
|
||||
windowStyle: 'transparent',
|
||||
windowStyle: 'opaque',
|
||||
fontSize: 14,
|
||||
topicPosition: 'left',
|
||||
showTopicTime: false,
|
||||
|
||||
@@ -26,7 +26,7 @@ export interface WebSearchState {
|
||||
}
|
||||
|
||||
const initialState: WebSearchState = {
|
||||
defaultProvider: '',
|
||||
defaultProvider: 'local-bing',
|
||||
providers: [
|
||||
{
|
||||
id: 'tavily',
|
||||
|
||||
Reference in New Issue
Block a user