forked from coracle/flotilla
Remove general room
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import type {Snippet} from 'svelte'
|
||||
import type {Snippet} from "svelte"
|
||||
import {page} from "$app/stores"
|
||||
|
||||
type Props = {
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
import {
|
||||
userSettingValues,
|
||||
decodeRelay,
|
||||
GENERAL,
|
||||
tagRoom,
|
||||
userRoomsByUrl,
|
||||
displayChannel,
|
||||
@@ -41,7 +40,7 @@
|
||||
import {popKey} from "@app/implicit"
|
||||
import {pushToast} from "@app/toast"
|
||||
|
||||
const {room = GENERAL} = $page.params
|
||||
const {room} = $page.params
|
||||
const mounted = now()
|
||||
const lastChecked = $checked[$page.url.pathname]
|
||||
const url = decodeRelay($page.params.relay)
|
||||
@@ -252,22 +251,20 @@
|
||||
{/snippet}
|
||||
{#snippet action()}
|
||||
<div class="row-2">
|
||||
{#if room !== GENERAL}
|
||||
{#if $userRoomsByUrl.get(url)?.has(room)}
|
||||
<Button class="btn btn-neutral btn-sm" onclick={leaveRoom}>
|
||||
<Icon icon="arrows-a-logout-2" />
|
||||
Leave Room
|
||||
</Button>
|
||||
{:else}
|
||||
<Button class="btn btn-neutral btn-sm" disabled={joiningRoom} onclick={joinRoom}>
|
||||
{#if joiningRoom}
|
||||
<span class="loading loading-spinner loading-sm"></span>
|
||||
{:else}
|
||||
<Icon icon="login-2" />
|
||||
{/if}
|
||||
Join Room
|
||||
</Button>
|
||||
{/if}
|
||||
{#if $userRoomsByUrl.get(url)?.has(room)}
|
||||
<Button class="btn btn-neutral btn-sm" onclick={leaveRoom}>
|
||||
<Icon icon="arrows-a-logout-2" />
|
||||
Leave Room
|
||||
</Button>
|
||||
{:else}
|
||||
<Button class="btn btn-neutral btn-sm" disabled={joiningRoom} onclick={joinRoom}>
|
||||
{#if joiningRoom}
|
||||
<span class="loading loading-spinner loading-sm"></span>
|
||||
{:else}
|
||||
<Icon icon="login-2" />
|
||||
{/if}
|
||||
Join Room
|
||||
</Button>
|
||||
{/if}
|
||||
<MenuSpaceButton {url} />
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import CalendarEventItem from "@app/components/CalendarEventItem.svelte"
|
||||
import CalendarEventCreate from "@app/components/CalendarEventCreate.svelte"
|
||||
import {pushModal} from "@app/modal"
|
||||
import {GENERAL, getEventsForUrl, decodeRelay} from "@app/state"
|
||||
import {getEventsForUrl, decodeRelay} from "@app/state"
|
||||
import {makeCalendarFeed} from "@app/requests"
|
||||
import {setChecked} from "@app/notifications"
|
||||
|
||||
@@ -92,10 +92,8 @@
|
||||
})
|
||||
|
||||
onMount(() => {
|
||||
const feedFilters = [{kinds: [EVENT_TIME], "#h": [GENERAL]}]
|
||||
const subscriptionFilters = [
|
||||
{kinds: [DELETE, REACTION, EVENT_TIME], "#h": [GENERAL], since: now()},
|
||||
]
|
||||
const feedFilters = [{kinds: [EVENT_TIME]}]
|
||||
const subscriptionFilters = [{kinds: [DELETE, REACTION, EVENT_TIME], since: now()}]
|
||||
|
||||
;({events, cleanup} = makeCalendarFeed({
|
||||
element: element!,
|
||||
|
||||
Reference in New Issue
Block a user