mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 10:16:27 +00:00
add up/download button to ContentTooLarge view
This commit is contained in:
parent
03a596d1d9
commit
3ebb58f641
@ -1,5 +1,7 @@
|
||||
import React from 'react'
|
||||
import { formatSize } from '../../utils.js'
|
||||
import UploadContentButton from './UploadContentButton'
|
||||
import DownloadContentButton from './DownloadContentButton'
|
||||
|
||||
export function ContentEmpty({ flow, message }) {
|
||||
return (
|
||||
@ -17,11 +19,19 @@ export function ContentMissing({ flow, message }) {
|
||||
)
|
||||
}
|
||||
|
||||
export function ContentTooLarge({ message, onClick }) {
|
||||
export function ContentTooLarge({ message, onClick, uploadContent, flow }) {
|
||||
return (
|
||||
<div className="alert alert-warning">
|
||||
<button onClick={onClick} className="btn btn-xs btn-warning pull-right">Display anyway</button>
|
||||
{formatSize(message.contentLength)} content size.
|
||||
<div>
|
||||
<div className="alert alert-warning">
|
||||
|
||||
<button onClick={onClick} className="btn btn-xs btn-warning pull-right">Display anyway</button>
|
||||
{formatSize(message.contentLength)} content size.
|
||||
</div>
|
||||
<div className="view-options text-center">
|
||||
<UploadContentButton uploadContent={uploadContent}/>
|
||||
|
||||
<DownloadContentButton flow={flow} message={message}/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user