提交 5eaf4df7 编辑于 作者: yuudi's avatar yuudi
浏览文件

fix: user page templating

上级 ed081b09
......@@ -48,8 +48,8 @@
</el-tooltip>
{%- else -%}
{% for group in clan_groups -%}
<a href="{{ url_for('yobot_clan', group_id=group.group_id) }}">
<el-button type="primary">公会:{{ group.info.group_name }}</el-button>
<a href="{{ url_for('yobot_clan', group_id=group['group_id']) }}">
<el-button type="primary">公会:{{ group['group_name'] }}</el-button>
</a>
{% endfor -%}
{%- endif %}
......
......@@ -419,7 +419,8 @@ class Login:
return await render_template(
'user.html',
user=User.get_by_id(session['yobot_user']),
clan_groups=list(clan_groups),
clan_groups=[{'group_id': g.group_id, 'group_name': g.info.group_name}
for g in clan_groups],
)
@app.route(
......
......@@ -30,6 +30,7 @@ class User(_BaseModel):
authority_group = IntegerField(default=100)
privacy = IntegerField(default=MAX_TRY_TIMES) # 密码错误次数
clan_group_id = BigIntegerField(null=True)
last_login_time = BigIntegerField(default=0)
last_login_ipaddr = IPField(default='0.0.0.0')
password = FixedCharField(max_length=64, null=True)
......
......@@ -33,8 +33,8 @@ else:
class Yobot:
Version = "[v3.6.3-beta.2]"
Version_id = 193
Version = "[v3.6.3-beta.3]"
Version_id = 194
# "git rev-list --count HEAD"
def __init__(self, *,
......
Supports Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册