mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-24 19:40:31 +02:00
Add fullscreen mode for chat
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -2,10 +2,9 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
from chat.models import Channel
|
||||
|
||||
|
||||
class ChatView(LoginRequiredMixin, TemplateView):
|
||||
"""
|
||||
@ -13,9 +12,4 @@ class ChatView(LoginRequiredMixin, TemplateView):
|
||||
with Javascript and websockets.
|
||||
"""
|
||||
template_name = "chat/chat.html"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
from asgiref.sync import async_to_sync
|
||||
context['channels'] = async_to_sync(Channel.get_accessible_channels)(self.request.user, 'read')
|
||||
return context
|
||||
extra_context = {'title': _("Chat")}
|
||||
|
Reference in New Issue
Block a user