|
1 | 1 | import React, { useState } from 'react'; |
2 | | -import { TextField, Button, Grid, Paper, Typography, Box, Avatar, Tabs, Tab, IconButton, List, ListItem, ListItemText, ListItemIcon, ListItemSecondaryAction } from '@mui/material'; |
| 2 | +import { TextField, Button, Grid, Paper, Typography, Box, Avatar, Tabs, Tab, IconButton, List, ListItem, ListItemIcon, ListItemSecondaryAction } from '@mui/material'; |
3 | 3 | import { useProfile } from './hooks'; |
4 | 4 | import { styled } from '@mui/material/styles'; |
5 | 5 | import { showError, showSuccess } from '../../../dialog-handler/dialog-handler'; |
@@ -363,22 +363,40 @@ export const Profile: React.FC = () => { |
363 | 363 | <ListItemIcon sx={{ color: 'primary.main' }}> |
364 | 364 | {getBookmarkIcon(bookmark.bookmarkType)} |
365 | 365 | </ListItemIcon> |
366 | | - <ListItemText |
367 | | - primary={ |
368 | | - <Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}> |
369 | | - <Typography variant="subtitle1" sx={{ fontWeight: 600 }}> |
370 | | - {bookmark.title} |
371 | | - </Typography> |
372 | | - </Box> |
373 | | - } |
374 | | - secondary={ |
375 | | - bookmark.description && ( |
376 | | - <Typography variant="body2" sx={{ color: 'text.secondary', mt: 0.5 }}> |
377 | | - {bookmark.description} |
378 | | - </Typography> |
379 | | - ) |
380 | | - } |
381 | | - /> |
| 366 | + <Box sx={{ flexGrow: 1, minWidth: 0, pr: 8 }}> |
| 367 | + <Typography variant="subtitle1" sx={{ fontWeight: 600, mb: 0.5 }}> |
| 368 | + {bookmark.title} |
| 369 | + </Typography> |
| 370 | + {bookmark.description && ( |
| 371 | + <MarkdownView |
| 372 | + content={bookmark.description.length > 200 |
| 373 | + ? bookmark.description.substring(0, 200) + '...' |
| 374 | + : bookmark.description |
| 375 | + } |
| 376 | + sx={{ |
| 377 | + p: 0, |
| 378 | + '& .markdown-content': { |
| 379 | + fontSize: '0.875rem', |
| 380 | + color: 'text.secondary', |
| 381 | + '& p': { margin: 0 }, |
| 382 | + '& h1, & h2, & h3, & h4, & h5, & h6': { |
| 383 | + fontSize: '0.875rem', |
| 384 | + fontWeight: 'normal', |
| 385 | + margin: 0 |
| 386 | + }, |
| 387 | + '& ul, & ol': { |
| 388 | + margin: 0, |
| 389 | + paddingLeft: 16 |
| 390 | + }, |
| 391 | + '& li': { margin: 0 }, |
| 392 | + '& code': { |
| 393 | + fontSize: '0.8125rem' |
| 394 | + } |
| 395 | + } |
| 396 | + }} |
| 397 | + /> |
| 398 | + )} |
| 399 | + </Box> |
382 | 400 | <ListItemSecondaryAction> |
383 | 401 | <IconButton |
384 | 402 | edge="end" |
|
0 commit comments