diff --git a/chat/static/chat.webmanifest b/chat/static/chat.webmanifest index afddf74..156d0a1 100644 --- a/chat/static/chat.webmanifest +++ b/chat/static/chat.webmanifest @@ -3,19 +3,27 @@ "description": "Chat pour le TFJM²", "display": "standalone", "icons": [ + { + "src": "tfjm-square.svg", + "sizes": "any", + "type": "image/svg+xml", + "purpose": "maskable" + }, { "src": "tfjm-512.png", "sizes": "512x512", - "type": "image/png" + "type": "image/png", + "purpose": "maskable" }, { "src": "tfjm-192.png", "sizes": "192x192", - "type": "image/png" + "type": "image/png", + "purpose": "maskable" } ], "name": "Chat TFJM²", "short_name": "Chat TFJM²", - "start_url": "/chat/fullscreen/", + "start_url": "/chat/fullscreen", "theme_color": "black" } diff --git a/chat/templates/chat/content.html b/chat/templates/chat/content.html index bb7e62d..34c0396 100644 --- a/chat/templates/chat/content.html +++ b/chat/templates/chat/content.html @@ -51,7 +51,7 @@ - + diff --git a/chat/urls.py b/chat/urls.py index 72465fc..09a7fbe 100644 --- a/chat/urls.py +++ b/chat/urls.py @@ -3,12 +3,12 @@ from django.urls import path from django.utils.translation import gettext_lazy as _ -from django.views.generic import TemplateView - +from tfjm.views import LoginRequiredTemplateView app_name = 'chat' urlpatterns = [ - path('', TemplateView.as_view(template_name="chat/chat.html", extra_context={'title': _("Chat")}), name='chat'), - path('fullscreen/', TemplateView.as_view(template_name="chat/fullscreen.html"), name='fullscreen'), + path('', LoginRequiredTemplateView.as_view(template_name="chat/chat.html", + extra_context={'title': _("Chat")}), name='chat'), + path('fullscreen/', LoginRequiredTemplateView.as_view(template_name="chat/fullscreen.html"), name='fullscreen'), ] diff --git a/tfjm/static/tfjm-192.png b/tfjm/static/tfjm-192.png index 09e57f4..a212e44 100644 Binary files a/tfjm/static/tfjm-192.png and b/tfjm/static/tfjm-192.png differ diff --git a/tfjm/static/tfjm-512.png b/tfjm/static/tfjm-512.png index 5837e3b..5be044a 100644 Binary files a/tfjm/static/tfjm-512.png and b/tfjm/static/tfjm-512.png differ diff --git a/tfjm/static/tfjm-square.svg b/tfjm/static/tfjm-square.svg new file mode 100644 index 0000000..7e76588 --- /dev/null +++ b/tfjm/static/tfjm-square.svg @@ -0,0 +1,91 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/tfjm/views.py b/tfjm/views.py index 6ccea34..64ae580 100644 --- a/tfjm/views.py +++ b/tfjm/views.py @@ -3,6 +3,7 @@ from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.models import User +from django.views.generic import TemplateView from haystack.generic_views import SearchView @@ -40,5 +41,9 @@ class UserRegistrationMixin(LoginRequiredMixin): return super().dispatch(request, *args, **kwargs) +class LoginRequiredTemplateView(LoginRequiredMixin, TemplateView): + pass + + class AdminSearchView(AdminMixin, SearchView): pass