diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx b/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx index 3a9f9e85d..40cfba3bc 100644 --- a/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx +++ b/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx @@ -15,18 +15,20 @@ */ import { ExchangeTosStatus } from "@gnu-taler/taler-util"; +import { useTranslationContext } from "@gnu-taler/web-util/browser"; import { Fragment, h, VNode } from "preact"; import { CheckboxOutlined } from "../../components/CheckboxOutlined.js"; import { ExchangeXmlTos } from "../../components/ExchangeToS.js"; import { + Input, LinkSuccess, TermsOfServiceStyle, - WarningBox, - WarningText, + WarningBox } from "../../components/styled/index.js"; -import { useTranslationContext } from "@gnu-taler/web-util/browser"; 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, @@ -120,6 +122,8 @@ export function ShowTosContentView({ termsAccepted, showingTermsOfService, terms, + tosLang, + tosFormat, }: State.ShowContent): VNode { const { i18n } = useTranslationContext(); const ableToReviewTermsOfService = @@ -127,6 +131,25 @@ 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} + name="lang" + value={tosLang.value} + onChange={tosLang.onChange} + /> + </Input> + {!terms.content && ( <section style={{ justifyContent: "space-around", display: "flex" }}> <WarningBox> @@ -164,7 +187,7 @@ export function ShowTosContentView({ </div> ))} {terms.content.type === "html" && ( - <iframe src={terms.content.href.toString()} /> + <iframe style={{ width: "100%" }} srcDoc={terms.content.html} /> )} {terms.content.type === "pdf" && ( <a href={terms.content.location.toString()} download="tos.pdf"> |