[client] Allow async+lazy rendering of all images in timeline views

This commit is contained in:
Laura Hausmann 2023-11-23 17:16:52 +01:00
parent 3cb46cd6fc
commit 789fd97512
No known key found for this signature in database
GPG Key ID: D044E84C5BE01605
4 changed files with 6 additions and 3 deletions

View File

@ -15,6 +15,7 @@
:class="{ cover }"
:style="{ 'object-fit': cover ? 'cover' : null }"
loading="lazy"
decoding="async"
@load="onLoad"
/>
</template>

View File

@ -7,7 +7,7 @@
:to="url"
@click.stop
>
<img class="icon" :src="`/avatar/@${username}@${host}`" alt="" />
<img class="icon" :src="`/avatar/@${username}@${host}`" alt="" loading="lazy" decoding="async" />
<span class="main">
<span class="username">@{{ username }}</span>
<span

View File

@ -8,7 +8,7 @@
:title="acct(user)"
@click="onClick"
>
<img class="inner" :src="url" decoding="async" />
<img class="inner" :src="url" loading="lazy" decoding="async" />
<MkUserOnlineIndicator
v-if="showIndicator && user.instance == null"
class="indicator"
@ -26,7 +26,7 @@
:target="target"
@click.stop
>
<img class="inner" :src="url" decoding="async" />
<img class="inner" :src="url" loading="lazy" decoding="async" />
<MkUserOnlineIndicator
v-if="showIndicator && user.instance == null"
class="indicator"

View File

@ -7,6 +7,7 @@
:alt="alt"
:title="alt"
decoding="async"
loading="lazy"
/>
<img
v-else-if="char && !useOsNativeEmojis"
@ -15,6 +16,7 @@
:alt="alt"
:title="alt"
decoding="async"
loading="lazy"
/>
<span v-else-if="char && useOsNativeEmojis">{{ char }}</span>
<span v-else>{{ emoji }}</span>