mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-02 16:35:19 +02:00
fix(ui): Add pasted images to dropzone
This adds pasted images to the dropzone to provide the same experience
as when using the dropzone. This gives the possibility to preview and
delete the image. Additionally it provides a copy button to copy the
markdown code for inserting the image.
Removed the old implementation in `repo-legacy.js` and generalized
everything in `common-global.js` as common implementation.
Replaced old jquery code with plain JS.
Fixes #4588
(cherry picked from commit 6e66380408
)
This commit is contained in:
parent
f71e5ac323
commit
de0c6b1dd2
10 changed files with 303 additions and 158 deletions
|
@ -22,6 +22,12 @@ type Attachment struct {
|
|||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
// WebAttachment the generic attachment with mime type
|
||||
type WebAttachment struct {
|
||||
*Attachment
|
||||
MimeType string `json:"mime_type"`
|
||||
}
|
||||
|
||||
// EditAttachmentOptions options for editing attachments
|
||||
// swagger:model
|
||||
type EditAttachmentOptions struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue