diff options
Diffstat (limited to 'packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx')
-rw-r--r-- | packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx b/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx index 228186a2d..1f8cea7aa 100644 --- a/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx +++ b/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx @@ -97,13 +97,11 @@ export function AttributeEntryScreen(): VNode { function saveAsPDF(): void { const printWindow = window.open("", "", "height=400,width=800"); const divContents = document.getElementById("printThis"); - const styleContents = document.getElementById("style-id"); - if (!printWindow || !divContents || !styleContents) return; + if (!printWindow || !divContents) return; printWindow.document.write( - "<html><head><title>Anastasis Recovery Document</title><style>", + `<html><head><link rel="stylesheet" href="index.css" /><title>Anastasis Recovery Document</title><style>`, ); - printWindow.document.write(styleContents.innerHTML); printWindow.document.write("</style></head><body> </body></html>"); printWindow.document.close(); printWindow.document.body.appendChild(divContents.cloneNode(true)); @@ -132,6 +130,7 @@ export function AttributeEntryScreen(): VNode { secret will be safely stored. If you forget what you have entered or if there is a misspell you will be unable to recover your secret. <p> + {/* TODO: make this actually work reliably cross-browser lol (opens about:blank for me) */} <a onClick={saveAsPDF}>Save the personal information as PDF</a> </p> </ConfirmModal> |