Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nyiyui committed Oct 12, 2023
1 parent 9c9a59b commit 276a2f7
Show file tree
Hide file tree
Showing 47 changed files with 272 additions and 353 deletions.
Binary file added airy/airy/routes/silica/.ax.py.kate-swp
Binary file not shown.
1 change: 1 addition & 0 deletions airy/airy/routes/silica/ax.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ def uaf_verify(aidid: str, afid: str):
context=aid.context,
form=form,
af=af,
aid=aid,
**template_kwargs,
**(dict(ul=UserLogin.query.get(aid.ulid)) if aid.ulid else {}),
)
Expand Down
16 changes: 16 additions & 0 deletions airy/airy/static/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,19 @@ table td {
padding: 8px;
text-align: center;
}

.aligned-form {
display: table;
.}

.aligned-form p {
display: table-row;
.}

.aligned-form label {
display: table-cell;
.}

.aligned-form input {
display: table-cell;
.}
2 changes: 1 addition & 1 deletion airy/airy/templates/silica/ax/verify_limited.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block title %}{{ _("認証方法確認") }}{% endblock %}

{% block content %}
{{ _("認証方法を確認してください。") }}
{{ macros.ax_af_msg(aid) }}
<form method="post">
{{ form.hidden_tag() }}
{{ form.password.label }} {{ form.password }}
Expand Down
2 changes: 1 addition & 1 deletion airy/airy/templates/silica/ax/verify_otp_totp.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<input type="text" value="{{ taf.feedback.period }}" readonly />
</label>
</div>
{{ _("認証方法を確認してください。") }}
{{ macros.ax_af_msg(aid) }}
<form method="post">
{{ form.hidden_tag() }}
{{ form.code.label }} {{ form.code }}
Expand Down
2 changes: 1 addition & 1 deletion airy/airy/templates/silica/ax/verify_pw.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block title %}{{ _("認証方法確認") }}{% endblock %}

{% block content %}
{{ _("認証方法を確認してください。") }}
{{ macros.ax_af_msg(aid) }}
<form method="post">
{{ form.hidden_tag() }}
{{ form.password.label }} {{ form.password }}
Expand Down
2 changes: 1 addition & 1 deletion airy/airy/templates/silica/ax/verify_webauthn.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% endblock %}

{% block content %}
{{ _("認証方法を確認してください。") }}
{{ macros.ax_af_msg(aid) }}
<div id="js-webauthn-unsupported" style="display: none;">
{{ macros.alert("error", _("WebAuthnがサポートされてません。")) }}
</div>
Expand Down
4 changes: 2 additions & 2 deletions airy/airy/templates/silica/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<link href="https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@400;500&display=swap" rel="stylesheet">
{# アイコン字体 #}
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0" />
<title>{% block title %}{{ _("Silica") }}{% endblock %}</title>
<title>{% block title %}{{ _("Kankin") }}{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="{% block head_description %}{% endblock %}">
<meta name="author" content="{% block head_author %}{% endblock %}">
Expand All @@ -27,7 +27,7 @@
<nav id="nav-header">
<a href="{{ url_for('silica.index') }}">
<img style="padding: 0; height: 1.6rem; display: inline; vertical-align: middle;" src="{{ url_for('static', filename='logo.svg') }}" / >
{{ _('Silica') }}
{{ _('Kankin') }}
</a>
{% if current_user.is_authenticated %}
<a href="{{ url_for('silica.log') }}">{{ _('ログ') }}</a>
Expand Down
16 changes: 8 additions & 8 deletions airy/airy/templates/silica/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,15 @@ <h3>{{ _("認証方法") }}</h3>
</form>
<hr />
<h2>{{ _("プロフィール") }}</h2>
<form method="post" enctype="multipart/form-data">
<label>
ID
<input type="text" disabled value="{{ current_user.id }}" />
</label>
<form method="post" enctype="multipart/form-data" class="aligned-form">
<p>
<label for="profile-form-id">ID</label>
<input id="profile-form-id" type="text" disabled value="{{ current_user.id }}" />
</p>
{{ macros.form_csrf() }}
{{ form.name.label }} {{ form.name }}
{{ form.handle.label }} {{ form.handle }}
{{ form.image.label }} {{ form.image }}
<p>{{ form.name.label }} {{ form.name }}</p>
<p>{{ form.handle.label }} {{ form.handle }}</p>
<p>{{ form.image.label }} {{ form.image }}</p>
<div class="errors">
<ul>
{% for error in form.errors.slug %}
Expand Down
8 changes: 8 additions & 0 deletions airy/airy/templates/silica/macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,11 @@
<input type="submit" value="{{ _('登録を変更・再試行') }}" />
</form>
{% endmacro %}

{% macro ax_af_msg(aid) %}
{% if aid.context == 'login' %}
{{ _("認証方法を確認してください。") }}
{% else %}
{{ _("認証方法を解いてしてください。") }}
{% endif %}
{% endmacro %}
4 changes: 3 additions & 1 deletion airy/airy/templates/silica/uls.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@
</td>
<td>{{ macros.ap(ul.against) }}</td>
<td>
{% if not (me or ul.end) %}
<form method="post" action="{{ url_for('silica.iori_logout', uls=True) }}">
{{ macros.form_csrf() }}
<input type="hidden" name="ulid" value="{{ ul.id }}"/>
<input {% if me or ul.end %}disabled{% endif %} type="submit" value="{{ _('終了') }}" />
<input type="submit" value="{{ _('強制ログアウト') }}" />
</form>
{% endif %}
</td>
</tr>
{% endfor %}
Expand Down
Binary file modified airy/airy/translations/en/LC_MESSAGES/messages.mo
Binary file not shown.
Loading

0 comments on commit 276a2f7

Please sign in to comment.