Rename Button to StyledButton, simplify A

This commit is contained in:
2026-06-14 10:47:23 +02:00
parent 7751c29529
commit f036a246a8
11 changed files with 82 additions and 111 deletions
+7 -5
View File
@@ -4,14 +4,14 @@ from django.shortcuts import get_object_or_404, redirect
from django.urls import reverse
from common.components import (
Fragment,
A,
AddForm,
Button,
ButtonGroup,
Icon,
paginated_table_content,
DeviceFilterBar,
Fragment,
Icon,
StyledButton,
paginated_table_content,
)
from common.layout import render_page
from common.time import dateformat, local_strftime
@@ -34,7 +34,9 @@ def list_devices(request: HttpRequest) -> HttpResponse:
devices, page_obj, elided_page_range = paginate(request, devices)
data = {
"header_action": A([], Button([], "Add device"), url_name="games:add_device"),
"header_action": A(href=reverse("games:add_device"))[
StyledButton()["Add device"]
],
"columns": [
"Name",
"Type",