Small fixes

This commit is contained in:
nsde 2023-09-23 17:08:19 +02:00
parent f21e610938
commit cb3175d149
5 changed files with 12 additions and 8 deletions

2
.gitignore vendored
View file

@ -1,5 +1,5 @@
!.gitkeep !.gitkeep
imprint.html
data/ data/
# Byte-compiled / optimized / DLL files # Byte-compiled / optimized / DLL files

View file

@ -22,7 +22,11 @@ def get_finances():
def register(app): def register(app):
@app.route('/finances') @app.route('/finances')
def finances_view(): def finances_view():
data = get_finances() try:
data = get_finances()
except Exception:
return flask.Response('Error fetching finances from database. This might be cause the data is still being processed. Sorry.', status=500)
finances = { finances = {
'donations_total': round(sum([i['amount_usd'] for i in data['donations']])), 'donations_total': round(sum([i['amount_usd'] for i in data['donations']])),
'donations_num': len(data['donations']), 'donations_num': len(data['donations']),

View file

@ -13,7 +13,8 @@
<b>API credits: </b> {{ user.credits or 0 }}<br> <b>API credits: </b> {{ user.credits or 0 }}<br>
<b>Secret API key (click to reveal): </b> <b>Secret API key (click to reveal): </b>
<br> <br>
<span class="secret">{{ user.api_key or '-' }}</span> <!-- <span class="secret">{{ user.api_key or '-' }}</span> -->
<span class="secret">{{ "API key not shown for security reasons" or '-' }}</span>
<br>(Click again to copy) <br>(Click again to copy)
<br> <br>
<script> <script>

View file

@ -3,18 +3,18 @@
<header> <header>
<h1>Free Generative AI for <span class="special-gradient">Everyone</span></h1> <h1>Free Generative AI for <span class="special-gradient">Everyone</span></h1>
<h3>Open source ・ no CC required</h3> <h3>Open source</h3>
<a href="https://discord.nova-oss.com" target="_blank"> <a href="https://discord.nova-oss.com" target="_blank">
<button class="special"> <button class="special">
<i class="bi bi-discord"></i> <i class="bi bi-discord"></i>
Join 3,400+ members Join 3,600+ members
</button> </button>
</a> </a>
<a href="/login"> <!-- <a href="/login">
<button class="secondary"> <button class="secondary">
Log in <mark>beta</mark> Log in <mark>beta</mark>
</button> </button>
</a> </a> -->
<br> <br>
</header> </header>
<main> <main>

View file

@ -1 +0,0 @@
<meta http-equiv="REFRESH" content="0; url=https://youtu.be/dQw4w9WgXcQ">