Browse Source

dispatch home

master
Pheuw1 2 years ago
parent
commit
616987164f
  1. 2
      front/volume/src/App.svelte
  2. 2
      front/volume/src/components/Channels.svelte
  3. 2
      front/volume/src/components/Chat.svelte

2
front/volume/src/App.svelte

@ -11,6 +11,7 @@
MATCHMAKING = "/matchmaking", MATCHMAKING = "/matchmaking",
PROFILE_ID = "/profile_id", PROFILE_ID = "/profile_id",
} }
</script> </script>
<script lang="ts"> <script lang="ts">
@ -226,6 +227,7 @@
on:add-friend={addFriend} on:add-friend={addFriend}
on:invite-to-game={pong.inviteToGame} on:invite-to-game={pong.inviteToGame}
on:send-message={openDirectChat} on:send-message={openDirectChat}
on:return-home={resetAppState}
/> />
</div> </div>
{/if} {/if}

2
front/volume/src/components/Channels.svelte

@ -3,6 +3,8 @@
const showDialog = () => { const showDialog = () => {
} }
export interface ChannelsType { export interface ChannelsType {
id: number; id: number;
name: string; name: string;

2
front/volume/src/components/Chat.svelte

@ -56,6 +56,7 @@
socket.disconnect(); socket.disconnect();
}); });
//--------------------------------------------------------------------------------/ //--------------------------------------------------------------------------------/
const sendMessage = () => { const sendMessage = () => {
@ -289,6 +290,7 @@
if ($content == 'ok') { if ($content == 'ok') {
socket.emit("LeaveChanel", async (response) => { socket.emit("LeaveChanel", async (response) => {
console.log(response.status); console.log(response.status);
dispatch("return-home");
}); });
} }
} }

Loading…
Cancel
Save