diff options
| author | 2025-10-17 15:52:17 +0200 | |
|---|---|---|
| committer | 2025-10-17 15:52:17 +0200 | |
| commit | 06ec1f69e11fc52c0e2c6b5f12c3c89b9ef18436 (patch) | |
| tree | fba675613f56303e692fdab0b7d3274a3bb22357 /src/components/Content | |
| parent | da3947e721ceb1cbc748aa1c74fe809ccbc47c2f (diff) | |
| download | client-2.2.0.tar.gz client-2.2.0.tar.bz2 client-2.2.0.zip | |
Diffstat (limited to 'src/components/Content')
| -rw-r--r-- | src/components/Content/Content.tsx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/components/Content/Content.tsx b/src/components/Content/Content.tsx index 94fca32..19736fb 100644 --- a/src/components/Content/Content.tsx +++ b/src/components/Content/Content.tsx | |||
| @@ -128,6 +128,21 @@ function ContentBody({ data, raw = false }: Omit<ContentProps, "setRaw">) { | |||
| 128 | ); | 128 | ); |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | if (contentType?.startsWith("application/x-www-form-urlencoded")) { | ||
| 132 | return ( | ||
| 133 | <ReactJson | ||
| 134 | src={Object.fromEntries(new URLSearchParams(atob(data.body)))} | ||
| 135 | theme={darkMode ? "monokai" : undefined} | ||
| 136 | style={{ | ||
| 137 | padding: "1em", | ||
| 138 | width: "100%", | ||
| 139 | height: "100%", | ||
| 140 | overflowY: "auto", | ||
| 141 | }} | ||
| 142 | /> | ||
| 143 | ); | ||
| 144 | } | ||
| 145 | |||
| 131 | if (contentType?.startsWith("audio")) { | 146 | if (contentType?.startsWith("audio")) { |
| 132 | return <audio src={`data:${contentType};base64,${data.body}`} />; | 147 | return <audio src={`data:${contentType};base64,${data.body}`} />; |
| 133 | } | 148 | } |
