From 64827402ee1f1eae7cfe9cef6b728a7ffb2bd32b Mon Sep 17 00:00:00 2001 From: Anonymous Date: Sat, 6 Jan 2024 21:30:59 +0300 Subject: [PATCH] perf(feed): lazy load --- Web/Presenters/templates/Gifts/Menu.xml | 4 ++-- Web/Presenters/templates/Gifts/Pick.xml | 14 +++++++------- Web/Presenters/templates/Gifts/UserGifts.xml | 4 ++-- Web/Presenters/templates/Group/View.xml | 2 +- Web/Presenters/templates/Messenger/Index.xml | 12 ++++++------ Web/Presenters/templates/Photos/Album.xml | 4 ++-- Web/Presenters/templates/Photos/AlbumList.xml | 10 +++++----- Web/Presenters/templates/Poll/Voters.xml | 4 ++-- Web/Presenters/templates/Search/Index.xml | 2 +- Web/Presenters/templates/User/Friends.xml | 4 ++-- Web/Presenters/templates/User/Groups.xml | 4 ++-- Web/Presenters/templates/User/View.xml | 4 ++-- Web/Presenters/templates/components/attachment.xml | 4 ++-- .../templates/components/post/oldpost.xml | 4 ++-- 14 files changed, 38 insertions(+), 38 deletions(-) diff --git a/Web/Presenters/templates/Gifts/Menu.xml b/Web/Presenters/templates/Gifts/Menu.xml index d2126099..46c3a2b3 100644 --- a/Web/Presenters/templates/Gifts/Menu.xml +++ b/Web/Presenters/templates/Gifts/Menu.xml @@ -17,7 +17,7 @@ {/block} {block preview} - {$x->getName(tr('__lang'))} + {$x->getName(tr('__lang'))} {/block} {block name} @@ -26,4 +26,4 @@ {block description} {$x->getDescription(tr("__lang"))} -{/block} +{/block} \ No newline at end of file diff --git a/Web/Presenters/templates/Gifts/Pick.xml b/Web/Presenters/templates/Gifts/Pick.xml index c2240d2b..dad30839 100644 --- a/Web/Presenters/templates/Gifts/Pick.xml +++ b/Web/Presenters/templates/Gifts/Pick.xml @@ -14,8 +14,8 @@ {block content}
- {_gift} - + {_gift} + {if $gift->isFree()} {_free_gift} @@ -23,7 +23,7 @@ {tr('coins', $gift->getPrice())} {/if} - + {if $gift->getUsagesLeft($thisUser) !== INF} {tr("gifts_left", $gift->getUsagesLeft($thisUser))} @@ -31,7 +31,7 @@
- +
{include "../components/paginator.xml", conf => (object) [ "page" => $page, @@ -48,11 +48,11 @@ let el = $(this); if(el.hasClass("disabled")) return false; - + let link = "/gifts?act=confirm&user={$user->getId()}&pack={$cat->getId()}&elid="; let gift = el.data("gift"); - + window.location.assign(link + gift); }); -{/block} +{/block} \ No newline at end of file diff --git a/Web/Presenters/templates/Gifts/UserGifts.xml b/Web/Presenters/templates/Gifts/UserGifts.xml index e6672bf7..b84fdcbf 100644 --- a/Web/Presenters/templates/Gifts/UserGifts.xml +++ b/Web/Presenters/templates/Gifts/UserGifts.xml @@ -16,7 +16,7 @@ {/block} {block preview} - {_gift} + {_gift} {/block} {block name} @@ -40,4 +40,4 @@ -{/block} +{/block} \ No newline at end of file diff --git a/Web/Presenters/templates/Group/View.xml b/Web/Presenters/templates/Group/View.xml index 7d2066c2..91a96119 100644 --- a/Web/Presenters/templates/Group/View.xml +++ b/Web/Presenters/templates/Group/View.xml @@ -289,7 +289,7 @@ + style="max-width: 80px; max-height: 54pt;" loading=lazy />
{$album->getName()}
diff --git a/Web/Presenters/templates/Messenger/Index.xml b/Web/Presenters/templates/Messenger/Index.xml index ff7ccfd1..5c62bf9f 100644 --- a/Web/Presenters/templates/Messenger/Index.xml +++ b/Web/Presenters/templates/Messenger/Index.xml @@ -9,13 +9,13 @@ {_all_messages}
- +
- + {if sizeof($corresps) > 0}
{var $recipient = $coresp->getCorrespondents()[1]} {var $lastMsg = $coresp->getPreviewMessage()} - +
Фотография пользователя + alt="Фотография пользователя" loading=lazy />
{var $_author = $lastMsg->getSender()} - +
Фотография пользователя @@ -53,4 +53,4 @@
{_no_messages}
{/if} -{/block} +{/block} \ No newline at end of file diff --git a/Web/Presenters/templates/Photos/Album.xml b/Web/Presenters/templates/Photos/Album.xml index 0c919e90..e8157dd1 100644 --- a/Web/Presenters/templates/Photos/Album.xml +++ b/Web/Presenters/templates/Photos/Album.xml @@ -41,7 +41,7 @@ - {$photo->getDescription()} + {$photo->getDescription()}
{/foreach} @@ -50,4 +50,4 @@ {else} {include "../components/nothing.xml"} {/if} -{/block} +{/block} \ No newline at end of file diff --git a/Web/Presenters/templates/Photos/AlbumList.xml b/Web/Presenters/templates/Photos/AlbumList.xml index e59b6a58..ad025ae3 100644 --- a/Web/Presenters/templates/Photos/AlbumList.xml +++ b/Web/Presenters/templates/Photos/AlbumList.xml @@ -23,7 +23,7 @@ {else} {tr("albums", $count)} {/if} - +  |  {var $isClub = ($owner instanceof \openvk\Web\Models\Entities\Club)} @@ -34,7 +34,7 @@ {/block} {block actions} - + {/block} {* BEGIN ELEMENTS DESCRIPTION *} @@ -46,9 +46,9 @@ {block preview} {var $cover = $x->getCoverPhoto()} {var $preview = is_null($cover) ? "/assets/packages/static/openvk/img/camera_200.png" : $cover->getURLBySizeId("normal")} - + - {$x->getName()} + {$x->getName()} {/block} @@ -61,4 +61,4 @@ {$x->getPhotosCount()} {_photos}
{tr("updated_at", $x->getEditTime() ?? $x->getCreationTime())}
{_created} {$x->getCreationTime()}
-{/block} +{/block} \ No newline at end of file diff --git a/Web/Presenters/templates/Poll/Voters.xml b/Web/Presenters/templates/Poll/Voters.xml index 64384598..7f995c78 100644 --- a/Web/Presenters/templates/Poll/Voters.xml +++ b/Web/Presenters/templates/Poll/Voters.xml @@ -22,7 +22,7 @@ {/block} {block preview} - Фотография пользователя + Фотография пользователя {/block} {block name} @@ -37,4 +37,4 @@ {/block} {block actions} -{/block} +{/block} \ No newline at end of file diff --git a/Web/Presenters/templates/Search/Index.xml b/Web/Presenters/templates/Search/Index.xml index b17e125f..ac0a192b 100644 --- a/Web/Presenters/templates/Search/Index.xml +++ b/Web/Presenters/templates/Search/Index.xml @@ -23,7 +23,7 @@ {/block} {block preview} - {_photo} + {_photo} {/block} {block name} diff --git a/Web/Presenters/templates/User/Friends.xml b/Web/Presenters/templates/User/Friends.xml index ed140cf1..4d5033f0 100644 --- a/Web/Presenters/templates/User/Friends.xml +++ b/Web/Presenters/templates/User/Friends.xml @@ -97,7 +97,7 @@ {/block} {block preview} - Фотография пользователя + Фотография пользователя {/block} {block name} @@ -161,4 +161,4 @@ {/if} {/if} -{/block} +{/block} \ No newline at end of file diff --git a/Web/Presenters/templates/User/Groups.xml b/Web/Presenters/templates/User/Groups.xml index cc32b3d0..bca006e8 100644 --- a/Web/Presenters/templates/User/Groups.xml +++ b/Web/Presenters/templates/User/Groups.xml @@ -48,7 +48,7 @@ {/block} {block preview} - Фотография группы + Фотография группы {/block} {block name}{/block} @@ -128,4 +128,4 @@
{/if} -{/block} +{/block} \ No newline at end of file diff --git a/Web/Presenters/templates/User/View.xml b/Web/Presenters/templates/User/View.xml index 84e2eaad..8d0d36e3 100644 --- a/Web/Presenters/templates/User/View.xml +++ b/Web/Presenters/templates/User/View.xml @@ -304,7 +304,7 @@ + style="max-width: 80px; max-height: 54pt;" loading=lazy />
{$album->getName()}
@@ -656,7 +656,7 @@ {$hideInfo ? tr('gift') : ($giftDescriptor->caption ?? tr('gift'))} + title="{$hideInfo ? tr('gift') : ($giftDescriptor->caption ?? tr('gift'))}" loading=lazy />
diff --git a/Web/Presenters/templates/components/attachment.xml b/Web/Presenters/templates/components/attachment.xml index 5a656a74..f1bd0a88 100644 --- a/Web/Presenters/templates/components/attachment.xml +++ b/Web/Presenters/templates/components/attachment.xml @@ -2,7 +2,7 @@ {if !$attachment->isDeleted()} {var $link = "/photo" . ($attachment->isAnonymous() ? ("s/" . base_convert((string) $attachment->getId(), 10, 32)) : $attachment->getPrettyId())} - {$attachment->getDescription()} + {$attachment->getDescription()} {else} @@ -58,4 +58,4 @@ {_version_incompatibility} {/if} -{php $GLOBALS["_nesAttGloCou"] = NULL} +{php $GLOBALS["_nesAttGloCou"] = NULL} \ No newline at end of file diff --git a/Web/Presenters/templates/components/post/oldpost.xml b/Web/Presenters/templates/components/post/oldpost.xml index 95b6f8b3..c304657d 100644 --- a/Web/Presenters/templates/components/post/oldpost.xml +++ b/Web/Presenters/templates/components/post/oldpost.xml @@ -14,7 +14,7 @@ - + {_online} @@ -165,4 +165,4 @@ - + \ No newline at end of file