{% extends "base.html" %} {% block title %}系统设置 · 本地导航{% endblock %} {% block body %}

系统设置

{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %}
{% for cat, msg in messages %}
{{ msg }}
{% endfor %}
{% endif %} {% endwith %}

账户安全

当前用户:{{ current_user.username }}

{{ pwd_form.hidden_tag() }}
{{ pwd_form.current_password.label }} {{ pwd_form.current_password() }} {% if pwd_form.current_password.errors %}
{{ pwd_form.current_password.errors[0] }}
{% endif %}
{{ pwd_form.new_password.label }} {{ pwd_form.new_password() }} {% if pwd_form.new_password.errors %}
{{ pwd_form.new_password.errors[0] }}
{% endif %}
{{ pwd_form.confirm_password.label }} {{ pwd_form.confirm_password() }} {% if pwd_form.confirm_password.errors %}
{{ pwd_form.confirm_password.errors[0] }}
{% endif %}
{{ pwd_form.submit(class="btn btn-primary", style="width: auto") }}

数据备份与恢复

数据库文件:{{ db_path }} {% if db_size %} (约 {{ "%.1f"|format(db_size / 1024) }} KB) {% else %} (文件不存在或为空) {% endif %}

{{ restore_form.hidden_tag() }}
{{ restore_form.backup_file.label }} {{ restore_form.backup_file() }} {% if restore_form.backup_file.errors %}
{{ restore_form.backup_file.errors[0] }}
{% endif %}

恢复完成后请重启 LocalNav 服务。

{{ restore_form.submit(class="btn btn-secondary", style="width: auto") }}
{% endblock %}