diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-10-09 11:45:46 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-10-09 11:45:46 -0400 |
| commit | fecc78192ff1ad83c6a2f41e35a65ac189d25c6f (patch) | |
| tree | 481d82e99cf8aad8fe256d8186ae72bcee23bf9f /hi-ui/src/routes | |
| parent | dd62b823e01934a0f841256fdb17b551091896bf (diff) | |
| parent | 2f0b77e8fd02a137047c8975a573626cd76310ff (diff) | |
Merge branch 'wip/event-vocabulary'
Diffstat (limited to 'hi-ui/src/routes')
| -rw-r--r-- | hi-ui/src/routes/+page.svelte | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/hi-ui/src/routes/+page.svelte b/hi-ui/src/routes/+page.svelte index 932582d..dd5f2f7 100644 --- a/hi-ui/src/routes/+page.svelte +++ b/hi-ui/src/routes/+page.svelte @@ -2,7 +2,7 @@ import { onMount } from 'svelte'; import { boot, subscribeToEvents } from '../apiServer'; - import { currentUser, channelsList, messages } from '../store'; + import { currentUser, logins, channelsList, messages } from '../store'; import ActiveChannel from '../lib/ActiveChannel.svelte'; import ChannelList from '../lib/ChannelList.svelte'; @@ -22,15 +22,9 @@ id: boot.login.id, username: boot.login.name, })); - let channels = boot.channels.map((channel) => ({ - id: channel.id, - name: channel.name, - })); - channelsList.update((value) => value.setChannels(channels)); - let bootMessages = boot.channels.map((channel) => [channel.id, channel.messages]); - for (let [channel, channelMessages] of bootMessages) { - messages.update((value) => value.addMessages(channel, channelMessages)); - } + logins.update((value) => value.setLogins(boot.logins)); + channelsList.update((value) => value.setChannels(boot.channels)); + messages.update((value) => value.setMessages(boot.messages)); } onMount(async () => { @@ -38,6 +32,7 @@ let response = await boot(); switch (response.status) { case 200: + debugger; onBooted(response.data); subscribeToEvents(response.data.resume_point); break; |
