Show version in footer (#294)

Co-authored-by: ekzyis <ek@stacker.news>
This commit is contained in:
ekzyis 2023-06-01 19:19:45 +02:00 committed by GitHub
parent 15850f0dbb
commit 61e0a100c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View File

@ -43,6 +43,9 @@ LND_CONNECT_ADDRESS=03cc1d0932bb99b0697f5b5e5961b83ab7fd66f1efc4c9f5c7bad66c1bcb
NEXTAUTH_SECRET=3_0W_PhDRZVanbeJsZZGIEljexkKoGbL6qGIqSwTjjI NEXTAUTH_SECRET=3_0W_PhDRZVanbeJsZZGIEljexkKoGbL6qGIqSwTjjI
JWT_SIGNING_PRIVATE_KEY={"kty":"oct","kid":"FvD__hmeKoKHu2fKjUrWbRKfhjimIM4IKshyrJG4KSM","alg":"HS512","k":"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 # prisma db url
DATABASE_URL="postgresql://sn:password@db:5432/stackernews?schema=public" DATABASE_URL="postgresql://sn:password@db:5432/stackernews?schema=public"

View File

@ -207,6 +207,8 @@ export default function Footer ({ noLinks }) {
const DarkModeIcon = darkMode.value ? Sun : Moon const DarkModeIcon = darkMode.value ? Sun : Moon
const LnIcon = lightning === 'yes' ? No : Bolt const LnIcon = lightning === 'yes' ? No : Bolt
const version = process.env.NEXT_PUBLIC_COMMIT_HASH
return ( return (
<footer> <footer>
<Container className='mb-3 mt-4'> <Container className='mb-3 mt-4'>
@ -318,6 +320,7 @@ export default function Footer ({ noLinks }) {
</Link> </Link>
</span> </span>
</small> </small>
<div className="version">version <a href={`https://github.com/stackernews/stacker.news/commit/${version}`}>{version}</a></div>
</Container> </Container>
</footer> </footer>
) )

View File

@ -631,3 +631,9 @@ div[contenteditable]:focus,
color: #212529; color: #212529;
} }
} }
.version {
margin: auto;
font-size: x-small;
color: var(--theme-grey) !important;
}