commit 9513e634a0518894bd110c230586ad81e4760b07
parent ca736ba051dfed15e1ccfab3da0162bc6c95b549
Author: Nullptrderef <nullptrderef@proton.me>
Date: Tue, 20 Aug 2024 10:31:48 +0200
fix: resolve #9092
Diffstat:
3 files changed, 34 insertions(+), 14 deletions(-)
diff --git a/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx b/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx
@@ -159,7 +159,16 @@ export function ShowTosContentView({
</section>
)}
{terms.content && (
- <section style={{ justifyContent: "space-around", display: "flex" }}>
+ <section
+ style={{
+ justifyContent: "space-around",
+ display: "flex",
+ position: "relative",
+ resize: "vertical",
+ overflow: "hidden",
+ marginTop: "4px",
+ }}
+ >
{terms.content.type === "xml" &&
(!terms.content.document ? (
<WarningBox>
@@ -186,7 +195,17 @@ export function ShowTosContentView({
</div>
))}
{terms.content.type === "html" && (
- <iframe style={{ width: "100%" }} srcDoc={terms.content.html} />
+ <iframe
+ style={{
+ width: "100%",
+ height: "100%",
+ border: "2px solid #0003",
+ borderRadius: "4px",
+ }}
+ src={`data:text/html;utf-8,${encodeURIComponent(
+ terms.content.html,
+ )}`}
+ />
)}
{terms.content.type === "pdf" && (
<a href={terms.content.location.toString()} download="tos.pdf">
diff --git a/packages/taler-wallet-webextension/src/cta/termsExample.ts b/packages/taler-wallet-webextension/src/cta/termsExample.ts
@@ -21,17 +21,18 @@
*/
export const termsHtml = `<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Terms Of Service — Taler Terms of Service</title>
-</head><body>
- <div>
- Terms of service
- </div>
- <div>
- A complete separated html with it's own design
- </div>
-</body>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Terms Of Service — Taler Terms of Service</title>
+ </head>
+ <body>
+ <div>
+ Terms of service
+ </div>
+ <div>
+ A complete separated html with it's own design
+ </div>
+ </body>
</html>
`;
export const termsPlain = `
diff --git a/packages/taler-wallet-webextension/src/pwa/index.html b/packages/taler-wallet-webextension/src/pwa/index.html
@@ -20,7 +20,7 @@
/* Setup the popup overlay */
.overlay {
- /* TODO: Consider moving it ot the top right of the screen, like an actual popup usually is */
+ /* TODO: Consider moving it to the top right of the screen, like an actual popup usually is */
position: fixed;
top: 0px;
left: 0px;