Response viewer for PDF (#48)

This PR adds a response viewer for PDF files using `react-pdf`
This commit is contained in:
Gregory Schier
2024-06-10 08:57:08 -07:00
committed by GitHub
parent 302a69ed98
commit 016c3f7dac
9 changed files with 750 additions and 29 deletions

View File

@@ -5,6 +5,12 @@ import { createRoot } from 'react-dom/client';
import { attachConsole } from 'tauri-plugin-log-api';
import { App } from './components/App';
import './main.css';
import { pdfjs } from 'react-pdf';
pdfjs.GlobalWorkerOptions.workerSrc = new URL(
'pdfjs-dist/build/pdf.worker.min.mjs',
import.meta.url,
).toString();
// Hide decorations here because it doesn't work in Rust for some reason (bug?)
const osType = await type();