Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💄 style: add preview for image file #3690

Merged
merged 1 commit into from
Aug 30, 2024
Merged

Conversation

arvinxx
Copy link
Contributor

@arvinxx arvinxx commented Aug 30, 2024

add image file preview for File Preview

image

📝 补充信息 | Additional Information

refs: https://github.com/cyntler/react-doc-viewer/blob/main/src/renderers/png/index.tsx

Implement Steps:

  1. add a folder in src/features/FileViewer/Renderer named Image
  2. create a React Compoent with DocRenderer type and then implement the renderer
  3. set the renderer with fileTypes and weight (weight can be 0 by default)

实现步骤:

  1. src/features/FileViewer/Renderer 目录下新建一个名为 Image 的文件夹
  2. 创建一个 React 组件,类型为 DocRenderer,然后实现该渲染器
  3. 为该渲染器设置 fileTypesweight 属性(weight 默认可以设为 0)

Copy link

vercel bot commented Aug 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lobe-chat-database ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2024 1:49pm
lobe-chat-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2024 1:49pm

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Aug 30, 2024
@lobehubbot
Copy link
Member

👍 @arvinxx

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@dosubot dosubot bot added the 💄 Design Design an style | 样式问题 label Aug 30, 2024
Copy link

codecov bot commented Aug 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.77%. Comparing base (2630bbc) to head (7f6a580).
Report is 524 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #3690    +/-   ##
========================================
  Coverage   91.77%   91.77%            
========================================
  Files         448      448            
  Lines       29639    29639            
  Branches     3058     2075   -983     
========================================
  Hits        27202    27202            
  Misses       2437     2437            
Flag Coverage Δ
app 91.77% <ø> (ø)
server 97.46% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@arvinxx arvinxx merged commit e13aa39 into main Aug 30, 2024
12 checks passed
@arvinxx arvinxx deleted the feat/support-image-previe branch August 30, 2024 13:51
@lobehubbot
Copy link
Member

❤️ Great PR @arvinxx ❤️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.
项目的成长离不开用户反馈和贡献,感谢您的贡献! 如果您对 LobeHub 开发者社区感兴趣,请加入我们的 discord,然后私信 @arvinxx@canisminor1990。他们会邀请您加入我们的私密开发者频道。我们将会讨论关于 Lobe Chat 的开发,分享和讨论全球范围内的 AI 消息。

@lobehubbot
Copy link
Member

🎉 This PR is included in version 1.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💄 Design Design an style | 样式问题 released size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants