This repository has been archived on 2023-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
web-gpt/project/templates/index.html

31 lines
998 B
HTML
Raw Normal View History

2023-03-31 22:11:34 +08:00
{% extends "base.html" %}
{% block content %}
2023-04-02 02:05:33 +08:00
<h2 class="subtitle">
{% if user and user.is_authenticated %}
你好,{{ user.name }}
{% else %}
你好,游客!
{% endif %}
</h2>
2023-04-01 19:38:43 +08:00
{% if user and user.is_authenticated %}
2023-04-02 02:05:33 +08:00
{% if user.isActivated %}
<a href="{{ url_for('main.chat') }}">
<button type="button" class="btn btn-primary">开始聊天</button>
</a>
{% else %}
<p class="text-warning">您的账号暂未激活,请等待管理员激活此账号。</p>
{% endif %}
{% else %}
<a href="{{ url_for('auth.login') }}">
<button type="button" class="btn btn-primary">登录</button>
</a>
<a href="{{ url_for('auth.signup') }}">
<button type="button" class="btn btn-default">注册</button>
</a>
2023-03-31 22:11:34 +08:00
{% endif %}
2023-04-02 02:05:33 +08:00
{% with messages = get_flashed_messages() %}
{% if messages %}<div class="notification is-danger">{{ messages[0] }}</div>{% endif %}
{% endwith %}
{% endblock content %}