waffle/frontend/src/components/ChannelView.svelte

34 lines
1,009 B
Svelte
Raw Normal View History

<script>
import ChannelTopBar from "./ChannelTopBar.svelte";
import MessageInput from "./MessageInput.svelte";
2022-04-20 03:44:48 +03:00
import Messages from "./Messages.svelte";
import { quadInOut } from "svelte/easing";
import { maybeFly } from "../animations";
2023-06-25 18:10:17 +03:00
import { showSidebar, statusBarStore } from "../stores";
export let channel;
</script>
2022-04-15 02:39:13 +03:00
<style>
.main-container {
background-color: var(--background-color-2);
2022-04-22 23:01:44 +03:00
overflow: hidden;
2022-04-15 02:39:13 +03:00
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
2023-01-08 23:26:22 +02:00
contain: content;
2022-04-15 02:39:13 +03:00
}
</style>
2023-06-25 18:10:17 +03:00
<div class="main-container" class:round-left="{ $showSidebar }" in:maybeFly="{{ duration: 175, x: -10, easing: quadInOut }}">
2023-01-08 17:48:18 +02:00
{#if $statusBarStore}
<div class="info-bar">
<span class="info-text">{ $statusBarStore }</span>
</div>
{/if}
<ChannelTopBar channel={ channel } />
<Messages channelId="{ channel.id }" />
<MessageInput channel={ channel } />
2022-04-15 02:39:13 +03:00
</div>