commit 832cf23a94f821ab0d36cb2fa3d463380fd0d05a
parent 9bc63cf1989df86fabc7dcf401ea8cde64a0c5e3
Author: Sebastian <sebasjm@gmail.com>
Date: Mon, 28 Oct 2024 13:33:59 -0300
new link in the send-to screen
Diffstat:
1 file changed, 36 insertions(+), 21 deletions(-)
diff --git a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/views.tsx b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/views.tsx
@@ -14,7 +14,11 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
-import { KnownBankAccountsInfo, PaytoUri, stringifyPaytoUri } from "@gnu-taler/taler-util";
+import {
+ KnownBankAccountsInfo,
+ PaytoUri,
+ stringifyPaytoUri,
+} from "@gnu-taler/taler-util";
import { useTranslationContext } from "@gnu-taler/web-util/browser";
import { styled } from "@linaria/react";
import { Fragment, h, VNode } from "preact";
@@ -250,7 +254,10 @@ export function ReadyGetView({
<Grid item xs={1}>
<Paper style={{ padding: 8 }}>
<p>
- <i18n.Translate>From a <pre style={{display:"inline"}}>taler://</pre> URI or QR code</i18n.Translate>
+ <i18n.Translate>
+ From a <pre style={{ display: "inline" }}>taler://</pre> URI
+ or QR code
+ </i18n.Translate>
</p>
<a href={Pages.qr}>
<i18n.Translate>Enter URI here</i18n.Translate>
@@ -291,7 +298,7 @@ export function ReadySendView({
<RowExample
info={info}
onClick={() => {
- onSelectAccount(info.uri)
+ onSelectAccount(info.uri);
}}
// disabled={!amountHandler.onInput}
/>
@@ -324,6 +331,19 @@ export function ReadySendView({
</Button>
</Paper>
</Grid>
+ <Grid item xs={1}>
+ <Paper style={{ padding: 8 }}>
+ <p>
+ <i18n.Translate>
+ To a <pre style={{ display: "inline" }}>taler://</pre> URI or
+ QR code
+ </i18n.Translate>
+ </p>
+ <a href={Pages.qr}>
+ <i18n.Translate>Enter URI here</i18n.Translate>
+ </a>
+ </Paper>
+ </Grid>
</Grid>
</Grid>
</Container>
@@ -333,26 +353,23 @@ export function ReadySendView({
function RowExample({
info,
disabled,
- onClick
+ onClick,
}: {
info: KnownBankAccountsInfo;
disabled?: boolean;
onClick?: () => void;
}): VNode {
-
-
return (
<MediaExample data-disabled={disabled} onClick={onClick}>
<MediaLeft>
<CircleDiv>
- <SvgIcon
- title={info.alias}
- dangerouslySetInnerHTML={{
- __html: bankIcon,
- }}
- color="currentColor"
- />
-
+ <SvgIcon
+ title={info.alias}
+ dangerouslySetInnerHTML={{
+ __html: bankIcon,
+ }}
+ color="currentColor"
+ />
</CircleDiv>
</MediaLeft>
<MediaBody>
@@ -371,20 +388,19 @@ function RowExample({
);
}
-
function describeAccount(p: PaytoUri): string {
if (!p.isKnown) {
- return stringifyPaytoUri(p)
+ return stringifyPaytoUri(p);
}
switch (p.targetType) {
case "iban": {
- return p.iban
+ return p.iban;
}
case "x-taler-bank": {
- return `${p.host}/${p.account}`
+ return `${p.host}/${p.account}`;
}
case "bitcoin": {
- return `${p.address}`
+ return `${p.address}`;
}
}
-}
-\ No newline at end of file
+}