Tweak room name display
This commit is contained in:
parent
c694654417
commit
5843b3e33a
4 changed files with 7 additions and 8 deletions
|
|
@ -59,9 +59,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if isRoomOrRelay}
|
{#if isRoomOrRelay}
|
||||||
<div>
|
<ContentLinkUrl {url} class="link-content whitespace-nowrap" />
|
||||||
<ContentLinkUrl {url} class="link-content whitespace-nowrap" />
|
|
||||||
</div>
|
|
||||||
{:else}
|
{:else}
|
||||||
<Link {external} {href} class="my-2 block">
|
<Link {external} {href} class="my-2 block">
|
||||||
<div class="overflow-hidden rounded-2xl">
|
<div class="overflow-hidden rounded-2xl">
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
import LinkRound from "@assets/icons/link-round.svg?dataurl"
|
import LinkRound from "@assets/icons/link-round.svg?dataurl"
|
||||||
import Icon from "@lib/components/Icon.svelte"
|
import Icon from "@lib/components/Icon.svelte"
|
||||||
import Link from "@lib/components/Link.svelte"
|
import Link from "@lib/components/Link.svelte"
|
||||||
import RoomNameWithImage from "@app/components/RoomNameWithImage.svelte"
|
import RoomName from "@app/components/RoomName.svelte"
|
||||||
import {PLATFORM_URL} from "@app/env"
|
import {PLATFORM_URL} from "@app/env"
|
||||||
import {isRoomId, splitRoomId} from "@app/groups"
|
import {isRoomId, splitRoomId} from "@app/groups"
|
||||||
import {makeRoomPath, makeSpacePath} from "@app/routes"
|
import {makeRoomPath, makeSpacePath} from "@app/routes"
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
|
|
||||||
<Link {external} {href} class={className}>
|
<Link {external} {href} class={className}>
|
||||||
{#if roomReference}
|
{#if roomReference}
|
||||||
<RoomNameWithImage {...roomReference} />
|
#<RoomName {...roomReference} />
|
||||||
{:else if relayReference}
|
{:else if relayReference}
|
||||||
<span class="text-primary">{displayRelayUrl(relayReference)}</span>
|
<span class="text-primary">{displayRelayUrl(relayReference)}</span>
|
||||||
{:else}
|
{:else}
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,15 @@
|
||||||
interface Props {
|
interface Props {
|
||||||
h: string
|
h: string
|
||||||
url: string
|
url: string
|
||||||
|
size?: number
|
||||||
class?: string
|
class?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const {url, h, ...props}: Props = $props()
|
const {url, h, size, ...props}: Props = $props()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="inline-flex min-w-0 items-center gap-2 {props.class}">
|
<div class="inline-flex min-w-0 items-center gap-2 {props.class}">
|
||||||
<RoomImage {url} {h} />
|
<RoomImage {url} {h} {size} />
|
||||||
<div class="min-w-0 overflow-hidden text-ellipsis">
|
<div class="min-w-0 overflow-hidden text-ellipsis">
|
||||||
<RoomName {url} {h} />
|
<RoomName {url} {h} />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -351,7 +351,7 @@ body.keyboard-open .room__compose {
|
||||||
|
|
||||||
/* link-content (tiptap pill) */
|
/* link-content (tiptap pill) */
|
||||||
.link-content {
|
.link-content {
|
||||||
@apply bg-surface text-content max-w-full overflow-hidden px-1 text-ellipsis whitespace-nowrap;
|
@apply bg-surface-more text-content max-w-full overflow-hidden px-1 text-ellipsis whitespace-nowrap;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue