Conversations: the app starts without the libredesk link; attachments downloadable from the transcript frame
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
45db86d1ff
commit
adc5ae12bd
4 files changed
+20
-6
No files matched your search
@@ -36,9 +36,9 @@ export function Selector({ selection, choose }) {
|
||||
}
|
||||
|
||||
// A markdown rendered by the server (report, summary, transcript), at the height of its content once its images are loaded;
|
||||
// sandboxed: no script runs in it
|
||||
export function Page({ title, src }) {
|
||||
// sandboxed: no script runs in it (sandbox "allow-same-origin allow-downloads" where its links are attachments to save)
|
||||
export function Page({ title, src, sandbox = "allow-same-origin" }) {
|
||||
const frame = useRef();
|
||||
const fit = () => { const b = frame.current?.contentDocument?.body; if (b) frame.current.style.height = `${b.scrollHeight + 20}px`; };
|
||||
return <iframe ref={frame} title={title} sandbox="allow-same-origin" onLoad={fit} style={{ border: 0, width: "100%", height: 400 }} src={src} />;
|
||||
return <iframe ref={frame} title={title} sandbox={sandbox} onLoad={fit} style={{ border: 0, width: "100%", height: 400 }} src={src} />;
|
||||
}
|
||||
@@ -77,7 +77,7 @@ export default function Conversations() {
|
||||
</Card>
|
||||
{open && (
|
||||
<Card shadow="sm" withBorder>
|
||||
<Page key={`${open}-${dark}`} title="Transcript" src={`/api/conversations/${encodeURIComponent(open)}/report.html?dark=${dark}`} />
|
||||
<Page key={`${open}-${dark}`} title="Transcript" sandbox="allow-same-origin allow-downloads" src={`/api/conversations/${encodeURIComponent(open)}/report.html?dark=${dark}`} />
|
||||
</Card>
|
||||
)}
|
||||
</Stack>
|
||||
|
||||
Reference in new issue
Block a user