mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
- Store the names locally in FreedomBox interface as Network Manager does not support adding a name to a client. - Auto-generate names for ones that currently don't have names and when auto-adding a client. - Allow editing the client name on edit page and manual add page. - Show name in: - WireGuard page - Add client page. - Auto-add client page. - Delete client page. - Show client page. - Link to show client page from name instead of public key in WireGuard. - Add Edit/Delete buttons in auto-add client page. - Style delete client page differently. - Forget all client names when app is uninstalled. Tests: - Unit and functional tests work. - When editing a client, name field is shown. Changing the name works. Changing the public key and name also works. - When adding a client manually, name field is shown. Setting a default name works. Setting a non-default name works. - On the WireGuard main page, name of client is shown and has link to show client page. Links works. There is no link on the pubic key. - When adding a client manually, the name is shown at the top of the page along with the name field at the bottom. - When auto-adding a client. Name is shown in the success notice message. Edit and delete buttons are shown and they work. - On delete client page, information is shown as table. Name and public key are shown. - On show client page, name of the client is shown. - When clients are added without the patches and patches are applied, when viewing WireGuard page, all existing clients are given a name automatically. - After app is uninstalled, the freedombox sqlite3 database does not contain the key 'wireguard_client_names' in 'freedombox_kvstore' table. Uninstalling without any clients does not lead to an error. Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
37 lines
753 B
HTML
37 lines
753 B
HTML
{% extends "base.html" %}
|
|
{% comment %}
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
{% endcomment %}
|
|
|
|
{% load bootstrap %}
|
|
{% load i18n %}
|
|
|
|
{% block content %}
|
|
|
|
<h3>{{ title }}</h3>
|
|
|
|
<p>
|
|
{% trans "Are you sure that you want to delete this client?" %}
|
|
</p>
|
|
<table class="table">
|
|
<tbody>
|
|
<tr class="client-name">
|
|
<th>{% trans "Name" %}</th>
|
|
<td>{{ name }}</td>
|
|
</tr>
|
|
<tr class="client-public-key">
|
|
<th>{% trans "Public Key" %}</th>
|
|
<td>{{ public_key }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<form class="form form-delete-client" method="post">
|
|
{% csrf_token %}
|
|
|
|
<input type="submit" class="btn btn-danger"
|
|
value="{% trans "Delete" %}"/>
|
|
</form>
|
|
|
|
{% endblock %}
|