2025-11-06 00:59:17 +00:00
|
|
|
<script lang="ts">
|
|
|
|
|
import EyeClosed from "@assets/icons/eye-closed.svg?dataurl"
|
|
|
|
|
import Lock from "@assets/icons/lock.svg?dataurl"
|
|
|
|
|
import Microphone from "@assets/icons/microphone.svg?dataurl"
|
|
|
|
|
import Icon from "@lib/components/Icon.svelte"
|
|
|
|
|
import Button from "@lib/components/Button.svelte"
|
2026-07-28 16:16:26 +00:00
|
|
|
import {rooms} from "@app/core"
|
2025-11-06 00:59:17 +00:00
|
|
|
|
2026-07-28 16:16:26 +00:00
|
|
|
type Props = {
|
|
|
|
|
h: string
|
|
|
|
|
url: string
|
2025-11-06 00:59:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const {url, h}: Props = $props()
|
|
|
|
|
|
2026-07-28 16:16:26 +00:00
|
|
|
const room = $rooms.forRoom(url, h)
|
2025-11-06 00:59:17 +00:00
|
|
|
</script>
|
|
|
|
|
|
2026-07-28 16:16:26 +00:00
|
|
|
{#if $room?.meta?.isHidden()}
|
2025-11-06 00:59:17 +00:00
|
|
|
<Button
|
2026-06-24 20:56:53 +00:00
|
|
|
class="button button-neutral button-sm tip tip-left"
|
2025-11-06 00:59:17 +00:00
|
|
|
data-tip="This room is not visible to non-members.">
|
|
|
|
|
<Icon size={4} icon={EyeClosed} />
|
|
|
|
|
</Button>
|
2026-07-28 16:16:26 +00:00
|
|
|
{:else if $room?.meta?.isPrivate()}
|
2025-11-06 00:59:17 +00:00
|
|
|
<Button
|
2026-06-24 20:56:53 +00:00
|
|
|
class="button button-neutral button-sm tip tip-left"
|
2025-11-06 00:59:17 +00:00
|
|
|
data-tip="Only members can view messages.">
|
|
|
|
|
<Icon size={4} icon={Lock} />
|
|
|
|
|
</Button>
|
2026-07-28 16:16:26 +00:00
|
|
|
{:else if $room?.meta?.isRestricted()}
|
2025-11-06 00:59:17 +00:00
|
|
|
<Button
|
2026-06-24 20:56:53 +00:00
|
|
|
class="button button-neutral button-sm tip tip-left"
|
2025-11-06 00:59:17 +00:00
|
|
|
data-tip="Only members can send messages.">
|
|
|
|
|
<Icon size={4} icon={Microphone} />
|
|
|
|
|
</Button>
|
|
|
|
|
{/if}
|