wip
This commit is contained in:
parent
57f003a984
commit
549f8139bc
2 changed files with 8 additions and 3 deletions
|
@ -13,9 +13,9 @@ def home():
|
|||
messages = select(
|
||||
'''
|
||||
SELECT * FROM messages
|
||||
ORDER BY date DESC
|
||||
WHERE from_url = :filter
|
||||
OR to_url = :filter
|
||||
ORDER BY date DESC
|
||||
''',
|
||||
filter=request.args['filter']
|
||||
)
|
||||
|
@ -30,7 +30,7 @@ def home():
|
|||
|
||||
return render_template(
|
||||
"home.html",
|
||||
users=select(
|
||||
contacts=select(
|
||||
'''
|
||||
SELECT DISTINCT ON (url) url, name
|
||||
FROM (
|
||||
|
|
|
@ -11,7 +11,12 @@
|
|||
<h1 class=logo><a href="{{ url_for('home') }}">STEAM Chat Logs <img src="{{ url_for('static', filename='icon.svg') }}"></a></h1>
|
||||
</header>
|
||||
<main>
|
||||
<ul class=sms_list>
|
||||
<ul class=contacts>
|
||||
{% for contact in contacts: -%}
|
||||
<li><a href="{{ url_for('home', filter=contact['url']) }}">{{ contact['name'] }}</a></li>
|
||||
{% endfor -%}
|
||||
</ul>
|
||||
<ul class=messages>
|
||||
{% for message in messages: -%}
|
||||
<li class=message>
|
||||
<div class=metadata>
|
||||
|
|
Loading…
Reference in a new issue