Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions MediaAPI.Web/src/assets/Templates/ResponseTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export function buildResponseHtml(requestUrl: string, jsonStr: string): string {
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/png" href="/logo.png" />
<title>media-api response</title>
<style>
:root {
Expand Down Expand Up @@ -56,21 +57,21 @@ export function buildResponseHtml(requestUrl: string, jsonStr: string): string {
/* JSON frame with border and padding */
.json-frame {
background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--grad-1) border-box;
border: 1px solid transparent; border-radius: 12px; padding: 12px; margin: 6px 4px 16px 4px;
border: 1px solid transparent; border-radius: 12px; padding: 8px 12px 12px 12px; margin: 6px 4px 16px 4px;
box-shadow: 0 10px 28px rgba(0,0,0,.45), 0 0 12px rgba(77,182,255,.12);
}
/* Inner scroll area to keep scrollbars inside the frame */
.json-scroll {
overflow: auto;
scrollbar-gutter: stable both-edges;
padding-right: 8px;
padding-bottom: 8px;
border-radius: 8px;
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* Pre itself is purely content now */
pre {
background: transparent;
border: none; border-radius: 0; padding: 0; margin: 0;
border: none; border-radius: 0; padding: 0; margin: 0 0 6px 0;
color: #ffffff; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 13px; line-height: 1.5; overflow: visible;
}
Expand Down
4 changes: 2 additions & 2 deletions MediaAPI.Web/src/pages/ApiDocs/ApiDocs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ export default function ApiDocs() {
newWindow.document.body.style.fontFamily =
"'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif";
newWindow.document.body.innerHTML = `<pre style="padding:12px;margin:16px;color:#a5a5a5;">Fetching response...</pre>`;
const iconSvg = await fetch("/code.svg").then((res) => res.text());
const link = newWindow.document.createElement("link");
link.rel = "icon";
link.href = `data:image/svg+xml,${encodeURIComponent(iconSvg)}`;
link.type = "image/png";
link.href = "/logo.png";
newWindow.document.head.appendChild(link);
}

Expand Down