Fix new messages indicator

This commit is contained in:
Jon Staab
2025-11-25 17:06:21 -08:00
parent e083719ceb
commit df17929681
6 changed files with 14 additions and 6 deletions

View File

@@ -9,6 +9,8 @@
* Add better room membership management
* Refactor stores for performance
* Hide nav when keyboard is open
* Handle flotilla links in-app
* Fix new messages indicator z-index
# 1.5.3

View File

@@ -6,12 +6,15 @@
import ContentLinkDetail from "@app/components/ContentLinkDetail.svelte"
import ContentLinkBlockImage from "@app/components/ContentLinkBlockImage.svelte"
import {pushModal} from "@app/util/modal"
import {PLATFORM_URL} from "@app/core/state"
const {value, event} = $props()
let hideImage = $state(false)
const url = value.url.toString()
const external = !url.startsWith(PLATFORM_URL)
const href = external ? url : url.replace(PLATFORM_URL, "")
const loadPreview = async () => {
const json = await postJson(dufflepud("link/preview"), {url})
@@ -30,7 +33,7 @@
const expand = () => pushModal(ContentLinkDetail, {value, event}, {fullscreen: true})
</script>
<Link external href={url} class="my-2 block">
<Link {external} {href} class="my-2 block">
<div class="overflow-hidden rounded-box">
{#if url.match(/\.(mov|webm|mp4)$/)}
<video controls src={url} class="max-h-96 object-contain object-center">

View File

@@ -6,10 +6,13 @@
import Link from "@lib/components/Link.svelte"
import ContentLinkDetail from "@app/components/ContentLinkDetail.svelte"
import {pushModal} from "@app/util/modal"
import {PLATFORM_URL} from "@app/core/state"
const {value} = $props()
const url = value.url.toString()
const external = !url.startsWith(PLATFORM_URL)
const href = external ? url : url.replace(PLATFORM_URL, "")
const expand = () => pushModal(ContentLinkDetail, {url}, {fullscreen: true})
</script>
@@ -21,7 +24,7 @@
{displayUrl(url)}
</a>
{:else}
<Link external href={url} class="link-content whitespace-nowrap">
<Link {external} {href} class="link-content whitespace-nowrap">
<Icon icon={LinkRound} size={3} class="inline-block" />
{displayUrl(url)}
</Link>

View File

@@ -1,6 +1,6 @@
import {Capacitor} from '@capacitor/core'
import {Capacitor} from "@capacitor/core"
import {Keyboard} from "@capacitor/keyboard"
import {noop} from '@welshman/lib'
import {noop} from "@welshman/lib"
export const syncKeyboard = () => {
if (!Capacitor.isNativePlatform()) return noop

View File

@@ -485,7 +485,7 @@
{/if}
{#if showFixedNewMessages}
<div class="relative z-feature flex justify-center">
<div class="relative z-popover flex justify-center">
<div transition:fly={{duration: 200}} class="fixed top-12">
<Button class="btn btn-primary btn-xs rounded-full" onclick={scrollToNewMessages}>
New Messages

View File

@@ -342,7 +342,7 @@
{/if}
{#if showFixedNewMessages}
<div class="relative z-feature flex justify-center">
<div class="relative z-popover flex justify-center">
<div transition:fly={{duration: 200}} class="fixed top-12">
<Button class="btn btn-primary btn-xs rounded-full" onclick={scrollToNewMessages}>
New Messages