Add build hash

This commit is contained in:
Jon Staab
2025-01-28 14:51:33 -08:00
parent 48a45f3a3a
commit b129ef4242
3 changed files with 10 additions and 0 deletions

View File

@@ -7,6 +7,7 @@
* Replace nsec.app signup with njump.me
* Add new messages button in rooms
* Add media server settings
* Add build hash to about page
# 0.2.5

View File

@@ -14,6 +14,10 @@ fi
# https://stackoverflow.com/a/69127685/1467342
eval "$temp_env"
if [[ -z $VITE_BUILD_HASH ]]; then
export VITE_BUILD_HASH=$(git rev-parse --short HEAD)
fi
if [[ $VITE_PLATFORM_LOGO =~ ^https://* ]]; then
curl $VITE_PLATFORM_LOGO > static/logo.png
export VITE_PLATFORM_LOGO=static/logo.png

View File

@@ -6,6 +6,8 @@
import {PLATFORM_NAME} from "@app/state"
import {pushModal} from "@app/modal"
const hash = import.meta.env.VITE_BUILD_HASH
const pubkey = "97c70a44366a6535c145b333f973ea86dfdc2d7a99da618c40c64705ad98e322"
const openProfile = () => pushModal(ProfileDetail, {pubkey})
@@ -48,6 +50,9 @@
class="link"
href="https://www.figma.com/community/file/1166831539721848736">480 Design</Link>
</p>
{#if hash}
<p class="text-xs">Running build {hash.slice(0, 8)}</p>
{/if}
</div>
<div class="flex justify-center gap-4">
<div class="tooltip" data-tip="Source Code">