[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
Signed by: zotan
GPG key ID: D044E84C5BE01605
4 changed files with 6 additions and 3 deletions

View file

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

View file

@ -7,7 +7,7 @@
:to="url" :to="url"
@click.stop @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="main">
<span class="username">@{{ username }}</span> <span class="username">@{{ username }}</span>
<span <span

View file

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

View file

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