fix: adjusted max-width in McpDescription.tsx

This commit is contained in:
kangfenmao 2025-05-22 22:57:11 +08:00
parent 9f579334f8
commit bcb93fc2d0
5 changed files with 5 additions and 3 deletions

View File

@ -17,7 +17,7 @@
} }
.ant-tabs-tab-btn { .ant-tabs-tab-btn {
outline: none; outline: none !important;
} }
.ant-segmented-group { .ant-segmented-group {

View File

@ -10,7 +10,7 @@ import {
import { useAppDispatch } from '@renderer/store' import { useAppDispatch } from '@renderer/store'
import { setSidebarIcons } from '@renderer/store/settings' import { setSidebarIcons } from '@renderer/store/settings'
import { message } from 'antd' import { message } from 'antd'
import { Folder, Languages, LayoutGrid, FileSearch, MessageSquareQuote, Palette, Sparkle } from 'lucide-react' import { FileSearch, Folder, Languages, LayoutGrid, MessageSquareQuote, Palette, Sparkle } from 'lucide-react'
import { FC, useCallback, useMemo } from 'react' import { FC, useCallback, useMemo } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import styled from 'styled-components' import styled from 'styled-components'

View File

@ -43,6 +43,7 @@ const MCPDescription: FC<McpDescriptionProps> = ({ searchKey }) => {
} }
const Section = styled.div` const Section = styled.div`
padding-top: 8px; padding-top: 8px;
max-width: calc(100vw - var(--sidebar-width) - var(--settings-width) - 75px);
` `
export default memo(MCPDescription) export default memo(MCPDescription)

View File

@ -585,6 +585,7 @@ const McpSettings: React.FC = () => {
) )
} }
] ]
if (server.searchKey) { if (server.searchKey) {
tabs.push({ tabs.push({
key: 'description', key: 'description',

View File

@ -1,7 +1,7 @@
import { BundledLanguage, BundledTheme } from 'shiki/bundle/web'
import { getTokenStyleObject, type HighlighterGeneric, SpecialLanguage, ThemedToken } from 'shiki/core' import { getTokenStyleObject, type HighlighterGeneric, SpecialLanguage, ThemedToken } from 'shiki/core'
import { AsyncInitializer } from './asyncInitializer' import { AsyncInitializer } from './asyncInitializer'
import { BundledLanguage, BundledTheme } from 'shiki/bundle/web'
export const DEFAULT_LANGUAGES = ['javascript', 'typescript', 'python', 'java', 'markdown', 'json'] export const DEFAULT_LANGUAGES = ['javascript', 'typescript', 'python', 'java', 'markdown', 'json']
export const DEFAULT_THEMES = ['one-light', 'material-theme-darker'] export const DEFAULT_THEMES = ['one-light', 'material-theme-darker']