feat: set proper page title for chats rooms
This commit is contained in:
parent
0ae441c31a
commit
7de16a0ea2
@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="csrf-token" content={get_csrf_token()} />
|
||||
<.live_title suffix=" · Phoenix Framework">
|
||||
<.live_title suffix=" · Slax">
|
||||
<%= assigns[:page_title] || "Slax" %>
|
||||
</.live_title>
|
||||
<link phx-track-static rel="stylesheet" href={~p"/assets/app.css"} />
|
||||
|
@ -58,7 +58,7 @@ defmodule SlaxWeb.ChatRoomLive do
|
||||
Chat.get_first_room!()
|
||||
end
|
||||
|
||||
{:noreply, assign(socket, hide_topic?: false, room: room)}
|
||||
{:noreply, assign(socket, hide_topic?: false, page_title: "# #{room.name}", room: room)}
|
||||
end
|
||||
|
||||
@impl Phoenix.LiveView
|
||||
|
Loading…
x
Reference in New Issue
Block a user