mirror of
https://github.com/coracle-social/flotilla.git
synced 2025-12-10 02:47:06 +00:00
Fix new messages indicator
This commit is contained in:
@@ -9,6 +9,8 @@
|
|||||||
* Add better room membership management
|
* Add better room membership management
|
||||||
* Refactor stores for performance
|
* Refactor stores for performance
|
||||||
* Hide nav when keyboard is open
|
* Hide nav when keyboard is open
|
||||||
|
* Handle flotilla links in-app
|
||||||
|
* Fix new messages indicator z-index
|
||||||
|
|
||||||
# 1.5.3
|
# 1.5.3
|
||||||
|
|
||||||
|
|||||||
@@ -6,12 +6,15 @@
|
|||||||
import ContentLinkDetail from "@app/components/ContentLinkDetail.svelte"
|
import ContentLinkDetail from "@app/components/ContentLinkDetail.svelte"
|
||||||
import ContentLinkBlockImage from "@app/components/ContentLinkBlockImage.svelte"
|
import ContentLinkBlockImage from "@app/components/ContentLinkBlockImage.svelte"
|
||||||
import {pushModal} from "@app/util/modal"
|
import {pushModal} from "@app/util/modal"
|
||||||
|
import {PLATFORM_URL} from "@app/core/state"
|
||||||
|
|
||||||
const {value, event} = $props()
|
const {value, event} = $props()
|
||||||
|
|
||||||
let hideImage = $state(false)
|
let hideImage = $state(false)
|
||||||
|
|
||||||
const url = value.url.toString()
|
const url = value.url.toString()
|
||||||
|
const external = !url.startsWith(PLATFORM_URL)
|
||||||
|
const href = external ? url : url.replace(PLATFORM_URL, "")
|
||||||
|
|
||||||
const loadPreview = async () => {
|
const loadPreview = async () => {
|
||||||
const json = await postJson(dufflepud("link/preview"), {url})
|
const json = await postJson(dufflepud("link/preview"), {url})
|
||||||
@@ -30,7 +33,7 @@
|
|||||||
const expand = () => pushModal(ContentLinkDetail, {value, event}, {fullscreen: true})
|
const expand = () => pushModal(ContentLinkDetail, {value, event}, {fullscreen: true})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Link external href={url} class="my-2 block">
|
<Link {external} {href} class="my-2 block">
|
||||||
<div class="overflow-hidden rounded-box">
|
<div class="overflow-hidden rounded-box">
|
||||||
{#if url.match(/\.(mov|webm|mp4)$/)}
|
{#if url.match(/\.(mov|webm|mp4)$/)}
|
||||||
<video controls src={url} class="max-h-96 object-contain object-center">
|
<video controls src={url} class="max-h-96 object-contain object-center">
|
||||||
|
|||||||
@@ -6,10 +6,13 @@
|
|||||||
import Link from "@lib/components/Link.svelte"
|
import Link from "@lib/components/Link.svelte"
|
||||||
import ContentLinkDetail from "@app/components/ContentLinkDetail.svelte"
|
import ContentLinkDetail from "@app/components/ContentLinkDetail.svelte"
|
||||||
import {pushModal} from "@app/util/modal"
|
import {pushModal} from "@app/util/modal"
|
||||||
|
import {PLATFORM_URL} from "@app/core/state"
|
||||||
|
|
||||||
const {value} = $props()
|
const {value} = $props()
|
||||||
|
|
||||||
const url = value.url.toString()
|
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})
|
const expand = () => pushModal(ContentLinkDetail, {url}, {fullscreen: true})
|
||||||
</script>
|
</script>
|
||||||
@@ -21,7 +24,7 @@
|
|||||||
{displayUrl(url)}
|
{displayUrl(url)}
|
||||||
</a>
|
</a>
|
||||||
{:else}
|
{: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" />
|
<Icon icon={LinkRound} size={3} class="inline-block" />
|
||||||
{displayUrl(url)}
|
{displayUrl(url)}
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {Capacitor} from '@capacitor/core'
|
import {Capacitor} from "@capacitor/core"
|
||||||
import {Keyboard} from "@capacitor/keyboard"
|
import {Keyboard} from "@capacitor/keyboard"
|
||||||
import {noop} from '@welshman/lib'
|
import {noop} from "@welshman/lib"
|
||||||
|
|
||||||
export const syncKeyboard = () => {
|
export const syncKeyboard = () => {
|
||||||
if (!Capacitor.isNativePlatform()) return noop
|
if (!Capacitor.isNativePlatform()) return noop
|
||||||
|
|||||||
@@ -485,7 +485,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if showFixedNewMessages}
|
{#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">
|
<div transition:fly={{duration: 200}} class="fixed top-12">
|
||||||
<Button class="btn btn-primary btn-xs rounded-full" onclick={scrollToNewMessages}>
|
<Button class="btn btn-primary btn-xs rounded-full" onclick={scrollToNewMessages}>
|
||||||
New Messages
|
New Messages
|
||||||
|
|||||||
@@ -342,7 +342,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if showFixedNewMessages}
|
{#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">
|
<div transition:fly={{duration: 200}} class="fixed top-12">
|
||||||
<Button class="btn btn-primary btn-xs rounded-full" onclick={scrollToNewMessages}>
|
<Button class="btn btn-primary btn-xs rounded-full" onclick={scrollToNewMessages}>
|
||||||
New Messages
|
New Messages
|
||||||
|
|||||||
Reference in New Issue
Block a user