From 3bf11c506a804cb70c03b86f02a5c7adc3ed9a41 Mon Sep 17 00:00:00 2001 From: Giulio Date: Mon, 17 May 2021 23:04:56 +0200 Subject: [PATCH] lobby name in document title --- frontend/src/components/Lobby.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/components/Lobby.vue b/frontend/src/components/Lobby.vue index 29b3d1e..c31c7d0 100644 --- a/frontend/src/components/Lobby.vue +++ b/frontend/src/components/Lobby.vue @@ -117,6 +117,11 @@ export default { sockets: { room(data) { this.lobbyName = data.name + if (!data.started) { + document.title = this.lobbyName +' | PewPew!' + } else if (data.started && !this.started) { + document.title = 'PewPew!' + } this.started = data.started this.password = data.password this.privateRoom = data.password !== '' @@ -228,6 +233,7 @@ export default { }, leaveRoom() { window.location.replace(window.location.origin) + document.title = 'PewPew!' }, toggleExpansions(name) { if (!this.isRoomOwner) return;