From 64488a55931fa73bb8e216fa068b33fefd9f6c3a Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Sun, 29 May 2022 01:42:35 -0300
Subject: use logo, website and emai in purchase details

---
 .../src/wallet/Transaction.tsx                     | 40 +++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

(limited to 'packages/taler-wallet-webextension/src/wallet/Transaction.tsx')

diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
index 8165953ab..1170c9222 100644
--- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
@@ -396,7 +396,45 @@ export function TransactionView({
         )}
         <Part
           title={<i18n.Translate>Merchant</i18n.Translate>}
-          text={transaction.info.merchant.name}
+          text={
+            <Fragment>
+              <div style={{ display: "flex", flexDirection: "row" }}>
+                {transaction.info.merchant.logo && (
+                  <div>
+                    <img
+                      src={transaction.info.merchant.logo}
+                      style={{ width: 64, height: 64, margin: 4 }}
+                    />
+                  </div>
+                )}
+                <div>
+                  <p>{transaction.info.merchant.name}</p>
+                  {transaction.info.merchant.website && (
+                    <a
+                      href={transaction.info.merchant.website}
+                      target="_blank"
+                      style={{ textDecorationColor: "gray" }}
+                      rel="noreferrer"
+                    >
+                      <SmallLightText>
+                        {transaction.info.merchant.website}
+                      </SmallLightText>
+                    </a>
+                  )}
+                  {transaction.info.merchant.email && (
+                    <a
+                      href={`mailto:${transaction.info.merchant.email}`}
+                      style={{ textDecorationColor: "gray" }}
+                    >
+                      <SmallLightText>
+                        {transaction.info.merchant.email}
+                      </SmallLightText>
+                    </a>
+                  )}
+                </div>
+              </div>
+            </Fragment>
+          }
           kind="neutral"
         />
         <Part
-- 
cgit v1.2.3

