added version string to title

This commit is contained in:
Chris 2023-11-23 15:05:50 +00:00
parent 41310e012d
commit 78860f3329
6 changed files with 22 additions and 5 deletions

3
.gitignore vendored
View file

@ -1 +1,2 @@
config.ini
config.ini
web/version.txt

View file

@ -35,17 +35,21 @@ _buildConfig() {
echo "SHOW_LOGS=${SHOW_LOGS:-false}"
echo "PASSWORD=${PASSWORD:-}"
echo "ALLOWED_IPS=${ALLOWED_IPS:-}"
echo ""
echo "[MAILSERVER]"
echo "MAILPORT=${MAILPORT:-25}"
echo "DISCARD_UNKNOWN=${DISCARD_UNKNOWN:-true}"
echo "ATTACHMENTS_MAX_SIZE=${ATTACHMENTS_MAX_SIZE:-0}"
echo ""
echo "[DATETIME]"
echo "DATEFORMAT=${DATEFORMAT:-D.M.YYYY HH:mm}"
echo ""
echo "[CLEANUP]"
echo "DELETE_OLDER_THAN_DAYS=${DELETE_OLDER_THAN_DAYS:-false}"
echo ""
GIT_VERSION=$(git describe --tags --always)
echo "[VERSION]"
echo "VERSION=${GIT_VERSION:-dev}"
}
_buildConfig > /var/www/opentrashmail/config.ini

1
version.txt Normal file
View file

@ -0,0 +1 @@
dev

View file

@ -26,6 +26,10 @@ tr.htmx-swapping td {
text-align: center;
}
.version {
font-size: 0.8em;
color: #999;
}
/* pico css overrides */

File diff suppressed because one or more lines are too long

View file

@ -13,7 +13,7 @@
<body>
<div class="topnav" id="OTMTopnav">
<a href="/"><img src="/imgs/logo_300_light.png" width="50px" /> Open Trashmail</a>
<a href="/"><img src="/imgs/logo_300_light.png" width="50px" /> Open Trashmail <small class="version"><?=getVersion()?></small></a>
<a><input id="email" hx-post="/api/address" hx-target="#main" name="email" type="email" style="margin-bottom:0px" hx-trigger="input changed delay:500ms" placeholder="email address" aria-label="email address"></a>
<a href="/random" hx-get="/api/random" hx-target="#main"><i class="fas fa-random"></i> Generate random</a>
<?php if($settings['SHOW_ACCOUNT_LIST']): ?><a href="/listaccounts" hx-get="/api/listaccounts" hx-target="#main" hx-push-url="/listaccounts"><i class="fas fa-list"></i> List accounts</a><?php endif; ?>