commit 87c10f6c8a5e89b9252605a38023a9cc8c604db3
parent 6816052615341fc8049d47a49959c6c0e4c7697b
Author: Sebastian <sebasjm@gmail.com>
Date: Mon, 23 Jan 2023 11:51:33 -0300
depleted rollback
Diffstat:
6 files changed, 106 insertions(+), 106 deletions(-)
diff --git a/packages/merchant-backend-ui/README.md b/packages/merchant-backend-ui/README.md
@@ -4,11 +4,11 @@ Merchant Backend pages
This project generate 5 templates for the merchant backend:
- * DeletedTip
- * OfferRefund
- * OfferTip
- * RequestPayment
- * ShowOrderDetails
+- DepletedTip
+- OfferRefund
+- OfferTip
+- RequestPayment
+- ShowOrderDetails
This pages are to be serve from the merchant-backend service and will be queried for browser that may or may not have JavaScript enabled, so we are going to do server side rendering.
The merchant-backend service is currently supporting mustache library for server side rendering.
diff --git a/packages/merchant-backend-ui/rollup.config.js b/packages/merchant-backend-ui/rollup.config.js
@@ -110,7 +110,7 @@ const pageDefinition = (name) => ({
export default [
pageDefinition("OfferTip"),
pageDefinition("OfferRefund"),
- pageDefinition("DeletedTip"),
+ pageDefinition("DepletedTip"),
pageDefinition("RequestPayment"),
pageDefinition("ShowOrderDetails"),
]
diff --git a/packages/merchant-backend-ui/src/pages/DeletedTip.stories.tsx b/packages/merchant-backend-ui/src/pages/DeletedTip.stories.tsx
@@ -1,40 +0,0 @@
-/*
- This file is part of GNU Taler
- (C) 2021 Taler Systems S.A.
-
- GNU Taler is free software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the Free Software
- Foundation; either version 3, or (at your option) any later version.
-
- GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along with
- GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
- */
-
-/**
- *
- * @author Sebastian Javier Marchano (sebasjm)
- */
-
-import { h, VNode, FunctionalComponent } from "preact";
-import { DeletedTip as TestedComponent } from "./DeletedTip";
-
-export default {
- title: "DeletedTip",
- component: TestedComponent,
- argTypes: {},
-};
-
-function createExample<Props>(
- Component: FunctionalComponent<Props>,
- props: Partial<Props>,
-) {
- const r = (args: any) => <Component {...args} />;
- r.args = props;
- return r;
-}
-
-export const Example = createExample(TestedComponent, {});
diff --git a/packages/merchant-backend-ui/src/pages/DeletedTip.tsx b/packages/merchant-backend-ui/src/pages/DeletedTip.tsx
@@ -1,60 +0,0 @@
-/*
- This file is part of GNU Taler
- (C) 2021 Taler Systems S.A.
-
- GNU Taler is free software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the Free Software
- Foundation; either version 3, or (at your option) any later version.
-
- GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along with
- GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
- */
-
-/**
- *
- * @author Sebastian Javier Marchano (sebasjm)
- */
-import { Fragment, h, render, VNode } from "preact";
-import { render as renderToString } from "preact-render-to-string";
-import { Footer } from "../components/Footer";
-import "../css/pure-min.css";
-import "../css/style.css";
-import { Page } from "../styled";
-
-function Head(): VNode {
- return <title>Status of your tip</title>;
-}
-
-export function DeletedTip(): VNode {
- return (
- <Page>
- <section>
- <h1>Tip already collected</h1>
- <div>You have already collected this tip.</div>
- </section>
- <Footer />
- </Page>
- );
-}
-
-export function mount(): void {
- try {
- render(<DeletedTip />, document.body);
- } catch (e) {
- console.error("got error", e);
- if (e instanceof Error) {
- document.body.innerText = `Fatal error: "${e.message}". Please report this bug at https://bugs.gnunet.org/.`;
- }
- }
-}
-
-export function buildTimeRendering(): { head: string; body: string } {
- return {
- head: renderToString(<Head />),
- body: renderToString(<DeletedTip />),
- };
-}
diff --git a/packages/merchant-backend-ui/src/pages/DepletedTip.stories.tsx b/packages/merchant-backend-ui/src/pages/DepletedTip.stories.tsx
@@ -0,0 +1,40 @@
+/*
+ This file is part of GNU Taler
+ (C) 2021 Taler Systems S.A.
+
+ GNU Taler is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+ */
+
+/**
+ *
+ * @author Sebastian Javier Marchano (sebasjm)
+ */
+
+import { h, VNode, FunctionalComponent } from "preact";
+import { DepletedTip as TestedComponent } from "./DepletedTip";
+
+export default {
+ title: "DepletedTip",
+ component: TestedComponent,
+ argTypes: {},
+};
+
+function createExample<Props>(
+ Component: FunctionalComponent<Props>,
+ props: Partial<Props>,
+) {
+ const r = (args: any) => <Component {...args} />;
+ r.args = props;
+ return r;
+}
+
+export const Example = createExample(TestedComponent, {});
diff --git a/packages/merchant-backend-ui/src/pages/DepletedTip.tsx b/packages/merchant-backend-ui/src/pages/DepletedTip.tsx
@@ -0,0 +1,60 @@
+/*
+ This file is part of GNU Taler
+ (C) 2021 Taler Systems S.A.
+
+ GNU Taler is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+ */
+
+/**
+ *
+ * @author Sebastian Javier Marchano (sebasjm)
+ */
+import { Fragment, h, render, VNode } from "preact";
+import { render as renderToString } from "preact-render-to-string";
+import { Footer } from "../components/Footer";
+import "../css/pure-min.css";
+import "../css/style.css";
+import { Page } from "../styled";
+
+function Head(): VNode {
+ return <title>Status of your tip</title>;
+}
+
+export function DepletedTip(): VNode {
+ return (
+ <Page>
+ <section>
+ <h1>Tip already collected</h1>
+ <div>You have already collected this tip.</div>
+ </section>
+ <Footer />
+ </Page>
+ );
+}
+
+export function mount(): void {
+ try {
+ render(<DepletedTip />, document.body);
+ } catch (e) {
+ console.error("got error", e);
+ if (e instanceof Error) {
+ document.body.innerText = `Fatal error: "${e.message}". Please report this bug at https://bugs.gnunet.org/.`;
+ }
+ }
+}
+
+export function buildTimeRendering(): { head: string; body: string } {
+ return {
+ head: renderToString(<Head />),
+ body: renderToString(<DepletedTip />),
+ };
+}