From 69e59db2f992878b9e166bba61071fd63499a370 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Wed, 28 Feb 2024 11:48:51 -0300
Subject: allow selecting format in devmode

---
 .../src/components/TermsOfService/views.tsx                 | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

(limited to 'packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx')

diff --git a/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx b/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx
index 79e49427e..40cfba3bc 100644
--- a/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx
+++ b/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx
@@ -28,6 +28,7 @@ import {
 import { Button } from "../../mui/Button.js";
 import { State } from "./index.js";
 import { SelectList } from "../SelectList.js";
+import { EnabledBySettings } from "../EnabledBySettings.js";
 
 export function ShowButtonsAcceptedTosView({
   termsAccepted,
@@ -122,6 +123,7 @@ export function ShowTosContentView({
   showingTermsOfService,
   terms,
   tosLang,
+  tosFormat,
 }: State.ShowContent): VNode {
   const { i18n } = useTranslationContext();
   const ableToReviewTermsOfService =
@@ -130,6 +132,15 @@ export function ShowTosContentView({
   return (
     <section>
       <Input style={{ display: "flex", justifyContent: "end" }}>
+        <EnabledBySettings name="selectTosFormat">
+          <SelectList
+            label={i18n.str`Format`}
+            list={tosFormat.list}
+            name="format"
+            value={tosFormat.value}
+            onChange={tosFormat.onChange}
+          />
+        </EnabledBySettings>
         <SelectList
           label={i18n.str`Language`}
           list={tosLang.list}
@@ -176,7 +187,7 @@ export function ShowTosContentView({
               </div>
             ))}
           {terms.content.type === "html" && (
-            <iframe style={{width: "100%"}} srcDoc={terms.content.html} />
+            <iframe style={{ width: "100%" }} srcDoc={terms.content.html} />
           )}
           {terms.content.type === "pdf" && (
             <a href={terms.content.location.toString()} download="tos.pdf">
-- 
cgit v1.2.3

