From 7c04fbd806998fc4fa2690ff8d462542375c4d78 Mon Sep 17 00:00:00 2001
From: Sebastian
Date: Wed, 26 Apr 2023 14:54:07 -0300
Subject: [PATCH] add version text
---
packages/demobank-ui/src/declaration.d.ts | 3 +++
packages/demobank-ui/src/pages/BankFrame.tsx | 12 +++++++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/packages/demobank-ui/src/declaration.d.ts b/packages/demobank-ui/src/declaration.d.ts
index a37485272..462287c59 100644
--- a/packages/demobank-ui/src/declaration.d.ts
+++ b/packages/demobank-ui/src/declaration.d.ts
@@ -421,3 +421,6 @@ namespace SandboxBackend {
type CashoutStatusResponseWithId = CashoutStatusResponse & { id: string };
}
}
+
+declare const __VERSION__: string;
+declare const __GIT_HASH__: string;
diff --git a/packages/demobank-ui/src/pages/BankFrame.tsx b/packages/demobank-ui/src/pages/BankFrame.tsx
index d8942a8e7..b1f3a7c5a 100644
--- a/packages/demobank-ui/src/pages/BankFrame.tsx
+++ b/packages/demobank-ui/src/pages/BankFrame.tsx
@@ -27,6 +27,14 @@ import { useSettings } from "../hooks/settings.js";
import { ErrorMessage, onNotificationUpdate } from "../hooks/notification.js";
const IS_PUBLIC_ACCOUNT_ENABLED = false;
+const GIT_HASH = typeof __GIT_HASH__ !== "undefined" ? __GIT_HASH__ : undefined;
+const VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : undefined;
+
+const versionText = VERSION
+ ? GIT_HASH
+ ? `Version ${VERSION} (${GIT_HASH.substring(0, 8)})`
+ : VERSION
+ : "";
const logger = new Logger("BankFrame");
@@ -156,7 +164,9 @@ export function BankFrame({
- Copyright © 2014—2022 Taler Systems SA
+
+ Copyright © 2014—2022 Taler Systems SA. {versionText}
+