mirror of
https://github.com/optim-enterprises-bv/Mailu.git
synced 2025-11-02 02:57:56 +00:00
Show mailu version in web interface after logging in
This commit is contained in:
@@ -18,6 +18,7 @@ DEFAULT_CONFIG = {
|
||||
'TEMPLATES_AUTO_RELOAD': True,
|
||||
'MEMORY_SESSIONS': False,
|
||||
'FETCHMAIL_ENABLED': True,
|
||||
'MAILU_VERSION': 'unknown',
|
||||
# Database settings
|
||||
'DB_FLAVOR': None,
|
||||
'DB_USER': 'mailu',
|
||||
@@ -157,6 +158,10 @@ class ConfigManager:
|
||||
self.config['HOSTNAME'] = hostnames[0]
|
||||
self.config['DEFAULT_SPAM_THRESHOLD'] = int(self.config['DEFAULT_SPAM_THRESHOLD'])
|
||||
self.config['PROXY_AUTH_WHITELIST'] = set(ipaddress.ip_network(cidr, False) for cidr in (cidr.strip() for cidr in self.config['PROXY_AUTH_WHITELIST'].split(',')) if cidr)
|
||||
try:
|
||||
self.config['MAILU_VERSION'] = open('/version', 'r').read()
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
# update the app config
|
||||
app.config.update(self.config)
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
<i class="fa fa-code-branch" aria-hidden="true"></i><span class="sr-only">fork</span>
|
||||
on <a href="https://github.com/Mailu/Mailu">Github</a>
|
||||
</span>
|
||||
<div style="font-size:60%;line-height:0"><span class="fa-pull-right">{{ config["MAILU_VERSION"] }}</span></div>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="{{ url_for('static', filename='vendor.js') }}"></script>
|
||||
|
||||
Reference in New Issue
Block a user