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. 4
      front/volume/src/components/Chat.svelte

2
front/volume/src/App.svelte

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

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

@ -2,6 +2,8 @@
import { content, show_popup } from './Alert/content'
const showDialog = () => {
}
export interface ChannelsType {
id: number;

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

@ -56,6 +56,7 @@
socket.disconnect();
});
//--------------------------------------------------------------------------------/
const sendMessage = () => {
@ -288,7 +289,8 @@
await show_popup("Press \"Okay\" to leave this channel?", false);
if ($content == 'ok') {
socket.emit("LeaveChanel", async (response) => {
console.log(response.status);
console.log(response.status);
dispatch("return-home");
});
}
}

Loading…
Cancel
Save