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
🐛 fix: dragging text mistakenly as image #2111
Merged
Merged
Changes from 18 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
df9db56
fix drag
sxjeru 6b9b4ad
Merge branch 'lobehub:main' into fork
sxjeru 575edf9
fix
sxjeru 2d04df9
fix
sxjeru 9546398
fix image drag
sxjeru 6cdc2db
Merge branch 'lobehub:main' into fork
sxjeru 01da452
simplify
sxjeru 9c77ef5
Merge branch 'fork' of https://github.com/sxjeru/lobe-chat into fork
sxjeru 2a10f68
Merge branch 'lobehub:main' into fork
sxjeru 9ac7da0
Restrict types of support browser
sxjeru fa1621c
Merge branch 'fork' of https://github.com/sxjeru/lobe-chat into fork
sxjeru 7dfc52b
Merge branch 'main' into fork
sxjeru 63c5d62
Merge branch 'main' into fork
sxjeru 55421e1
update
sxjeru 934febe
fix
sxjeru 1ebc461
everything done
sxjeru 669fc24
Merge branch 'main' into fork
sxjeru a00d251
Update DragUpload.tsx
sxjeru 7ebecf9
refactor function
sxjeru 995c43c
Merge remote-tracking branch 'upstream/main' into fork
sxjeru 17f136a
Avoid nested if
sxjeru 578e137
Merge branch 'main' into fork
sxjeru 600655c
support all browser
sxjeru 9096283
Merge branch 'main' into fork
arvinxx fb7cccf
Merge remote-tracking branch 'upstream/main' into fork
sxjeru d51bdb5
Merge branch 'fork' of https://github.com/sxjeru/lobe-chat into fork
sxjeru cd4bcdb
del getEngine()
sxjeru File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if 的风格,如果可以的话建议改成如果不匹配就 return 这种,而不是 if 里匹配再执行。
因为 if 里执行会导致括号层级加深一级,对查看代码上会有一定的语法干扰
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if 嵌套处理了一下。 17f136a
本身的判断没有改,因为以后可能计划实现拖拽图片链接也能上传,从而支持 macOS 和 Firefox 。
这样目前的判断条件是可用的,当然还需思考这个条件是否可以忽略,因为似乎不存在拖拽了但 items 为空的情况。