Compare commits
No commits in common. "59145c3dc2ad15d4b65d24a9daa5303a8bae97d9" and "304cef3c113c605be36db8cd6892ea7576a0a72a" have entirely different histories.
59145c3dc2
...
304cef3c11
4 changed files with 16 additions and 25 deletions
|
@ -10,6 +10,7 @@
|
|||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-left: 1px solid var(--background-color-2);
|
||||
}
|
||||
|
||||
.top-bar {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import { gatewayStatus, selectedChannel } from "../../../stores";
|
||||
import { gatewayStatus } from "../../../stores";
|
||||
import ChannelView from "./ChannelView.svelte";
|
||||
import Sidebar from "./Sidebar.svelte";
|
||||
</script>
|
||||
|
@ -12,30 +12,24 @@
|
|||
flex-direction: row;
|
||||
}
|
||||
|
||||
.fullscreen-message {
|
||||
.loading-screen {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
background-color: var(--background-color-1);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="flex-container">
|
||||
{#if $gatewayStatus.ready}
|
||||
<div class="flex-container">
|
||||
<Sidebar />
|
||||
{#if $selectedChannel.id === -1}
|
||||
<div class="fullscreen-message">
|
||||
no channel selected.
|
||||
<ChannelView channel={{ name: "channel name" }} />
|
||||
</div>
|
||||
{:else}
|
||||
<ChannelView channel={$selectedChannel} />
|
||||
{/if}
|
||||
{:else}
|
||||
<div class="fullscreen-message">
|
||||
<div class="loading-screen">
|
||||
connecting...
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<script>
|
||||
import { HashIcon } from "svelte-feather-icons";
|
||||
import { channels, selectedChannel } from "../../../stores";
|
||||
import { channels } from "../../../stores";
|
||||
</script>
|
||||
|
||||
<div class="sidebar">
|
||||
{#each $channels as channel (channel.id)}
|
||||
<button on:click="{ () => $selectedChannel = channel }" class="sidebar-button" class:selected={ channel.id === $selectedChannel.id }>
|
||||
<button class="sidebar-button" >
|
||||
<div>
|
||||
<HashIcon />
|
||||
</div>
|
||||
|
@ -21,7 +21,6 @@
|
|||
max-width: 255px;
|
||||
padding: var(--space-sm);
|
||||
background-color: var(--background-color-1);
|
||||
border-right: 1px solid var(--background-color-2);
|
||||
}
|
||||
|
||||
.sidebar-button {
|
||||
|
@ -56,7 +55,6 @@
|
|||
height: 24px;
|
||||
}
|
||||
|
||||
.sidebar-button.selected,
|
||||
.sidebar-button:hover {
|
||||
background-color: var(--background-color-2);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import { writable } from "svelte/store";
|
||||
import gateway, { GatewayEventType } from "./gateway";
|
||||
|
||||
class Store {
|
||||
|
@ -111,4 +110,3 @@ class GatewayStatusStore extends Store {
|
|||
|
||||
export const channels = new ChannelsStore();
|
||||
export const gatewayStatus = new GatewayStatusStore();
|
||||
export const selectedChannel = writable({ id: -1, name: "none", creator_id: -1 });
|
||||
|
|
Loading…
Reference in a new issue