[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] 01/04: rename tip to rewards
From: |
gnunet |
Subject: |
[taler-wallet-core] 01/04: rename tip to rewards |
Date: |
Mon, 05 Feb 2024 13:18:43 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
commit fc42d265b907973a04b607f81b61716931ca62d0
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Sun Feb 4 18:29:05 2024 -0300
rename tip to rewards
---
packages/taler-wallet-webextension/src/NavigationBar.tsx | 3 ++-
.../taler-wallet-webextension/src/platform/chrome.ts | 2 +-
.../src/popup/TalerActionFound.tsx | 6 +++---
.../taler-wallet-webextension/src/wallet/Application.tsx | 16 +++++++++++++++-
4 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/packages/taler-wallet-webextension/src/NavigationBar.tsx
b/packages/taler-wallet-webextension/src/NavigationBar.tsx
index 167f1797c..97b1fbcde 100644
--- a/packages/taler-wallet-webextension/src/NavigationBar.tsx
+++ b/packages/taler-wallet-webextension/src/NavigationBar.tsx
@@ -126,6 +126,7 @@ export const Pages = {
ctaRecovery: "/cta/recovery",
ctaRefund: "/cta/refund",
ctaTips: "/cta/tip",
+ ctaRewards: "/cta/rewards",
ctaWithdraw: "/cta/withdraw",
ctaDeposit: "/cta/deposit",
ctaInvoiceCreate: pageDefinition<{ amount?: string }>(
@@ -146,7 +147,7 @@ const talerUriActionToPageName: {
} = {
[TalerUriAction.Withdraw]: "ctaWithdraw",
[TalerUriAction.Pay]: "ctaPay",
- [TalerUriAction.Reward]: "ctaTips",
+ [TalerUriAction.Reward]: "ctaRewards",
[TalerUriAction.Refund]: "ctaRefund",
[TalerUriAction.PayPull]: "ctaInvoicePay",
[TalerUriAction.PayPush]: "ctaTransferPickup",
diff --git a/packages/taler-wallet-webextension/src/platform/chrome.ts
b/packages/taler-wallet-webextension/src/platform/chrome.ts
index 68fa63474..18d282342 100644
--- a/packages/taler-wallet-webextension/src/platform/chrome.ts
+++ b/packages/taler-wallet-webextension/src/platform/chrome.ts
@@ -207,7 +207,7 @@ function openWalletURIFromPopup(uri: TalerUri): void {
break;
case TalerUriAction.Reward:
url = chrome.runtime.getURL(
- `static/wallet.html#/cta/tip?talerUri=${encodeURIComponent(talerUri)}`,
+
`static/wallet.html#/cta/rewards?talerUri=${encodeURIComponent(talerUri)}`,
);
break;
case TalerUriAction.Refund:
diff --git a/packages/taler-wallet-webextension/src/popup/TalerActionFound.tsx
b/packages/taler-wallet-webextension/src/popup/TalerActionFound.tsx
index e120334e8..304c15f0b 100644
--- a/packages/taler-wallet-webextension/src/popup/TalerActionFound.tsx
+++ b/packages/taler-wallet-webextension/src/popup/TalerActionFound.tsx
@@ -19,7 +19,7 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
-import { parseTalerUri, TalerUri, TalerUriAction } from
"@gnu-taler/taler-util";
+import { parseTalerUri, stringifyTalerUri, TalerUri, TalerUriAction } from
"@gnu-taler/taler-util";
import { useTranslationContext } from "@gnu-taler/web-util/browser";
import { Fragment, h, VNode } from "preact";
import { Title } from "../components/styled/index.js";
@@ -69,10 +69,10 @@ function ContentByUriType({
return (
<div>
<p>
- <i18n.Translate>This page has a tip action.</i18n.Translate>
+ <i18n.Translate>This page has a reward action.</i18n.Translate>
</p>
<Button variant="contained" color="success" onClick={onConfirm}>
- <i18n.Translate>Open tip page</i18n.Translate>
+ <i18n.Translate>Open reward page</i18n.Translate>
</Button>
</div>
);
diff --git a/packages/taler-wallet-webextension/src/wallet/Application.tsx
b/packages/taler-wallet-webextension/src/wallet/Application.tsx
index df0e968b9..3867845f2 100644
--- a/packages/taler-wallet-webextension/src/wallet/Application.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Application.tsx
@@ -368,7 +368,21 @@ export function Application(): VNode {
<Route
path={Pages.ctaTips}
component={({ talerUri }: { talerUri: string }) => (
- <CallToActionTemplate title={i18n.str`Digital cash tip`}>
+ <CallToActionTemplate title={i18n.str`Digital cash rewards`}>
+ <TipPage
+ talerTipUri={decodeURIComponent(talerUri)}
+ onCancel={() => redirectTo(Pages.balance)}
+ onSuccess={(tid: string) =>
+ redirectTo(Pages.balanceTransaction({ tid }))
+ }
+ />
+ </CallToActionTemplate>
+ )}
+ />
+ <Route
+ path={Pages.ctaRewards}
+ component={({ talerUri }: { talerUri: string }) => (
+ <CallToActionTemplate title={i18n.str`Digital cash rewards`}>
<TipPage
talerTipUri={decodeURIComponent(talerUri)}
onCancel={() => redirectTo(Pages.balance)}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.