Skip to content

Commit

Permalink
pre fix
Browse files Browse the repository at this point in the history
  • Loading branch information
krrish-sehgal committed Jan 26, 2025
1 parent cac9748 commit f6ea4f9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
5 changes: 1 addition & 4 deletions website/migrations/0185_room.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

dependencies = [
("website", "0184_merge_0183_merge_20250124_0618_0183_slackbotactivity"),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
Expand Down Expand Up @@ -54,9 +53,7 @@ class Migration(migrations.Migration):
),
(
"users",
models.ManyToManyField(
blank=True, related_name="rooms", to=settings.AUTH_USER_MODEL
),
models.ManyToManyField(blank=True, related_name="rooms", to=settings.AUTH_USER_MODEL),
),
],
),
Expand Down
33 changes: 18 additions & 15 deletions website/templates/room.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
{% extends "base.html" %}
{% block title %}{{ room.name }}{% endblock title %}
{% block title %}
{{ room.name }}
{% endblock title %}
{% block content %}
{% include "includes/sidenav.html" %}
<div class="max-w-4xl mx-auto py-8">
<h1 class="text-3xl font-bold text-gray-900">{{ room.name }}</h1>
<div id="log-history" class="mt-4 p-4 bg-gray-100 rounded-lg h-96 overflow-y-auto">
<!-- Messages will be appended here -->
{% include "includes/sidenav.html" %}
<div class="max-w-4xl mx-auto py-8">
<h1 class="text-3xl font-bold text-gray-900">{{ room.name }}</h1>
<div id="log-history"
class="mt-4 p-4 bg-gray-100 rounded-lg h-96 overflow-y-auto">
<!-- Messages will be appended here -->
</div>
<input id="message-field"
type="text"
placeholder="Type a message..."
class="border rounded-lg px-4 py-2 w-full" />
<button id="send-button"
class="bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded-lg mt-2">Send</button>
</div>
<input id="message-field" type="text" placeholder="Type a message..."
class="border rounded-lg px-4 py-2 w-full" />
<button id="send-button"
class="bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded-lg mt-2">
Send
</button>
</div>
<script>
<script>
const roomId = {{ room.id }};
const username = "{{ request.user.username|escapejs }}"; // Add user's name
let socket;
Expand Down Expand Up @@ -81,5 +84,5 @@ <h1 class="text-3xl font-bold text-gray-900">{{ room.name }}</h1>
connectWebSocket().catch(error => {
console.error('WebSocket connection failed:', error);
});
</script>
</script>
{% endblock content %}

0 comments on commit f6ea4f9

Please sign in to comment.