From 61e0a100c0f9273d9fc362b352da3355ad47d895 Mon Sep 17 00:00:00 2001 From: ekzyis <27162016+ekzyis@users.noreply.github.com> Date: Thu, 1 Jun 2023 19:19:45 +0200 Subject: [PATCH] Show version in footer (#294) Co-authored-by: ekzyis --- .env.sample | 3 +++ components/footer.js | 3 +++ styles/globals.scss | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/.env.sample b/.env.sample index 725bd44d..1daf4749 100644 --- a/.env.sample +++ b/.env.sample @@ -43,6 +43,9 @@ LND_CONNECT_ADDRESS=03cc1d0932bb99b0697f5b5e5961b83ab7fd66f1efc4c9f5c7bad66c1bcb NEXTAUTH_SECRET=3_0W_PhDRZVanbeJsZZGIEljexkKoGbL6qGIqSwTjjI JWT_SIGNING_PRIVATE_KEY={"kty":"oct","kid":"FvD__hmeKoKHu2fKjUrWbRKfhjimIM4IKshyrJG4KSM","alg":"HS512","k":"3_0W_PhDRZVanbeJsZZGIEljexkKoGbL6qGIqSwTjjI"} +# git version +NEXT_PUBLIC_COMMIT_HASH=0de1343 + # prisma db url DATABASE_URL="postgresql://sn:password@db:5432/stackernews?schema=public" diff --git a/components/footer.js b/components/footer.js index a024d643..cc7aa79f 100644 --- a/components/footer.js +++ b/components/footer.js @@ -207,6 +207,8 @@ export default function Footer ({ noLinks }) { const DarkModeIcon = darkMode.value ? Sun : Moon const LnIcon = lightning === 'yes' ? No : Bolt + const version = process.env.NEXT_PUBLIC_COMMIT_HASH + return ( ) diff --git a/styles/globals.scss b/styles/globals.scss index 742a47f2..95e43bc5 100644 --- a/styles/globals.scss +++ b/styles/globals.scss @@ -630,4 +630,10 @@ div[contenteditable]:focus, .popover-header { color: #212529; } +} + +.version { + margin: auto; + font-size: x-small; + color: var(--theme-grey) !important; } \ No newline at end of file