mirror of
https://github.com/Lynnesbian/FediBooks/
synced 2024-11-25 08:38:59 +00:00
display bot icons!
This commit is contained in:
parent
f46e954f5a
commit
e8c666c711
2 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@
|
||||||
<div class="container" style="min-height: 300px;">
|
<div class="container" style="min-height: 300px;">
|
||||||
{% for bot in bots %}
|
{% for bot in bots %}
|
||||||
<div class="row light">
|
<div class="row light">
|
||||||
<div class="panel-icon {{ "online" if bot['enabled'] else "offline"}}"></div>
|
<div class="panel-icon {{ "online" if bot['enabled'] else "offline"}}" style="{{ "background-image: url('" + bot['icon'] + "')" if bot['icon'] else "" }}"></div>
|
||||||
<div class="panel-text">
|
<div class="panel-text">
|
||||||
{% set handle_list = bot['handle'].split('@') %}
|
{% set handle_list = bot['handle'].split('@') %}
|
||||||
<div class="panel-name">@{{ handle_list[1] }}<span class="subtle tiny">@{{ handle_list[2] }}</span></div>
|
<div class="panel-name">@{{ handle_list[1] }}<span class="subtle tiny">@{{ handle_list[2] }}</span></div>
|
||||||
|
|
2
webui.py
2
webui.py
|
@ -44,7 +44,7 @@ def home():
|
||||||
c.execute("SELECT COUNT(*) FROM `bots` WHERE user_id = %s AND enabled = TRUE", (session['user_id'],))
|
c.execute("SELECT COUNT(*) FROM `bots` WHERE user_id = %s AND enabled = TRUE", (session['user_id'],))
|
||||||
active_count = c.fetchone()[0]
|
active_count = c.fetchone()[0]
|
||||||
dc = mysql.connection.cursor(MySQLdb.cursors.DictCursor)
|
dc = mysql.connection.cursor(MySQLdb.cursors.DictCursor)
|
||||||
dc.execute("SELECT `handle`, `enabled`, `last_post`, `post_frequency` FROM `bots` WHERE user_id = %s", (session['user_id'],))
|
dc.execute("SELECT `handle`, `enabled`, `last_post`, `post_frequency`, `icon` FROM `bots` WHERE user_id = %s", (session['user_id'],))
|
||||||
bots = dc.fetchall()
|
bots = dc.fetchall()
|
||||||
dc.close()
|
dc.close()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue