File tree Expand file tree Collapse file tree 5 files changed +12
-13
lines changed
Expand file tree Collapse file tree 5 files changed +12
-13
lines changed Original file line number Diff line number Diff line change 55 import { onDestroy } from " svelte" ;
66 import { flip } from " svelte/animate" ;
77 import { app } from " $lib/app.svelte" ;
8+ import { getSidebarContext } from " $lib/context" ;
89 import type { Channel } from " $lib/models/channel.svelte" ;
910 import { settings } from " $lib/settings" ;
1011 import Draggable from " ./Draggable.svelte" ;
1112 import Droppable from " ./Droppable.svelte" ;
12- import { getSidebarContext } from " ./Sidebar.svelte" ;
1313 import StreamTooltip from " ./StreamTooltip.svelte" ;
1414 import { Separator } from " ./ui/separator" ;
1515
Original file line number Diff line number Diff line change 77<script lang =" ts" >
88 import DotsThreeCircle from " ~icons/ph/dots-three-circle" ;
99 import Users from " ~icons/ph/users-bold" ;
10+ import { getSidebarContext } from " $lib/context" ;
1011 import type { Channel } from " $lib/models/channel.svelte" ;
11- import { getSidebarContext } from " ./Sidebar.svelte" ;
1212
1313 const sidebar = getSidebarContext ();
1414
Original file line number Diff line number Diff line change 1- <script lang =" ts" module >
2- import { createContext } from " svelte" ;
3-
4- interface SidebarContext {
5- collapsed: boolean ;
6- }
7-
8- export const [getSidebarContext, setSidebarContext] = createContext <SidebarContext >();
9- </script >
10-
111<script lang =" ts" >
122 import { ScrollArea } from " bits-ui" ;
133 import { MediaQuery } from " svelte/reactivity" ;
166 import Plus from " ~icons/ph/plus" ;
177 import Sidebar from " ~icons/ph/sidebar" ;
188 import { app } from " $lib/app.svelte" ;
9+ import { setSidebarContext } from " $lib/context" ;
10+ import type { SidebarContext } from " $lib/context" ;
1911 import ChannelList from " ./ChannelList.svelte" ;
2012 import JoinDialog from " ./JoinDialog.svelte" ;
2113 import { Button , buttonVariants } from " ./ui/button" ;
Original file line number Diff line number Diff line change 11<script lang =" ts" >
22 import Users from " ~icons/ph/users-bold" ;
3+ import { getSidebarContext } from " $lib/context" ;
34 import { createChannelMenu } from " $lib/menus/channel-menu" ;
45 import { openMenu } from " $lib/util" ;
56 import ChannelListItem from " ./ChannelListItem.svelte" ;
67 import GuestList from " ./GuestList.svelte" ;
7- import { getSidebarContext } from " ./Sidebar.svelte" ;
88 import * as Tooltip from " ./ui/tooltip" ;
99 import type { ChannelListItemProps } from " ./ChannelListItem.svelte" ;
1010
Original file line number Diff line number Diff line change 1+ import { createContext } from "svelte" ;
2+
3+ export interface SidebarContext {
4+ collapsed : boolean ;
5+ }
6+
7+ export const [ getSidebarContext , setSidebarContext ] = createContext < SidebarContext > ( ) ;
You can’t perform that action at this time.
0 commit comments