From 15b9000ee1e30765fc5b2dbf829f2a41ac1afefe Mon Sep 17 00:00:00 2001 From: mrilyew <99399973+mrilyew@users.noreply.github.com> Date: Fri, 23 May 2025 21:28:01 +0300 Subject: [PATCH 01/60] fix(video api): fix items bug --- VKAPI/Handlers/Video.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/VKAPI/Handlers/Video.php b/VKAPI/Handlers/Video.php index f8cecf05..43d7a468 100755 --- a/VKAPI/Handlers/Video.php +++ b/VKAPI/Handlers/Video.php @@ -20,12 +20,18 @@ final class Video extends VKAPIRequestHandler $this->requireUser(); if (!empty($videos)) { - $vids = explode(',', $videos); + $vids = array_unique(explode(',', $videos)); + + if (sizeof($vids) > 100) { + $this->fail(15, "Too many ids given"); + } + $profiles = []; $groups = []; + $items = []; + foreach ($vids as $vid) { $id = explode("_", $vid); - $items = []; $video = (new VideosRepo())->getByOwnerAndVID(intval($id[0]), intval($id[1])); if ($video && !$video->isDeleted()) { From 7c4743633ee49edf28e378c7061d7ab7f19a3d0c Mon Sep 17 00:00:00 2001 From: mrilyew <99399973+mrilyew@users.noreply.github.com> Date: Fri, 23 May 2025 21:31:42 +0300 Subject: [PATCH 02/60] feat(wall): remove hidePanel() --- Web/Presenters/templates/components/wall.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Web/Presenters/templates/components/wall.xml b/Web/Presenters/templates/components/wall.xml index d6b68b53..080996bd 100644 --- a/Web/Presenters/templates/components/wall.xml +++ b/Web/Presenters/templates/components/wall.xml @@ -1,5 +1,5 @@
-
+
{_wall} {tr("wall", $count)} From da86a91b760bda74530e6f6fe3f61541c8176d40 Mon Sep 17 00:00:00 2001 From: mrilyew <99399973+mrilyew@users.noreply.github.com> Date: Fri, 23 May 2025 21:36:51 +0300 Subject: [PATCH 03/60] feat(ajax): show loading cursor --- Web/static/css/main.css | 4 ++++ Web/static/js/router.js | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Web/static/css/main.css b/Web/static/css/main.css index 0332d278..cc63a36f 100644 --- a/Web/static/css/main.css +++ b/Web/static/css/main.css @@ -14,6 +14,10 @@ body { line-height: 1.19; } +body.ajax_request_made { + cursor: progress; +} + body, .ovk-fullscreen-dimmer, .ovk-photo-view-dimmer { scrollbar-gutter: stable both-edges; } diff --git a/Web/static/js/router.js b/Web/static/js/router.js index 2a3a6c6a..4882926a 100644 --- a/Web/static/js/router.js +++ b/Web/static/js/router.js @@ -202,7 +202,7 @@ window.router = new class { if(this.prev_page_html && this.prev_page_html.pathname != location.pathname) { this.prev_page_html = null } - + const push_url = params.push_state ?? true const next_page_url = new URL(url) if(push_url) { @@ -210,6 +210,8 @@ window.router = new class { } else { history.replaceState({'from_router': 1}, '', url) } + + u('body').addClass('ajax_request_made') const parser = new DOMParser const next_page_request = await fetch(next_page_url, { @@ -227,6 +229,8 @@ window.router = new class { this.__closeMsgs() this.__unlinkObservers() + + u('body').removeClass('ajax_request_made') try { this.__appendPage(parsed_content) From c07ebc2f4d197145d7ba047f6193e11e4b9acfd9 Mon Sep 17 00:00:00 2001 From: mrilyew <99399973+mrilyew@users.noreply.github.com> Date: Fri, 23 May 2025 21:43:10 +0300 Subject: [PATCH 04/60] feat(tips): add delay --- Web/static/js/al_mentions.js | 1 + Web/static/js/al_wall.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Web/static/js/al_mentions.js b/Web/static/js/al_mentions.js index d324cca6..595b04b9 100644 --- a/Web/static/js/al_mentions.js +++ b/Web/static/js/al_mentions.js @@ -23,6 +23,7 @@ tippy.delegate("body", { target: '.mention', theme: "light vk", content: "⌛", + delay: 300, allowHTML: true, interactive: true, interactiveDebounce: 500, diff --git a/Web/static/js/al_wall.js b/Web/static/js/al_wall.js index 6568ba51..1f6c0902 100644 --- a/Web/static/js/al_wall.js +++ b/Web/static/js/al_wall.js @@ -825,6 +825,7 @@ tippy.delegate("body", { target: '.client_app', theme: "light vk", content: "⌛", + delay: 400, allowHTML: true, interactive: true, interactiveDebounce: 500, @@ -864,6 +865,7 @@ tippy.delegate('body', { target: `.post-like-button[data-type]:not([data-likes="0"])`, theme: "special vk", content: "⌛", + delay: 400, allowHTML: true, interactive: true, interactiveDebounce: 500, From 039988c7fc40fa64ab3ea314621b4cece0917fa3 Mon Sep 17 00:00:00 2001 From: mrilyew <99399973+mrilyew@users.noreply.github.com> Date: Fri, 23 May 2025 21:46:12 +0300 Subject: [PATCH 05/60] fix(docs): set correct margins --- Web/static/css/main.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Web/static/css/main.css b/Web/static/css/main.css index cc63a36f..730df906 100644 --- a/Web/static/css/main.css +++ b/Web/static/css/main.css @@ -4174,11 +4174,12 @@ hr { justify-content: center; border-radius: 2px; height: 17px; - padding: 2px 0px; + padding: 3px 0px; } .docListViewItem .doc_icon.no_image span { color: #6b6b6b; + font-weight: bold; } .doc_icon.no_image span::before { From 9c01cd00fc9919b9635c6c8ff5704ceb4a239f10 Mon Sep 17 00:00:00 2001 From: mrilyew <99399973+mrilyew@users.noreply.github.com> Date: Fri, 23 May 2025 22:42:55 +0300 Subject: [PATCH 06/60] feat(docs): ux changes --- Web/Presenters/DocumentsPresenter.php | 6 ++-- Web/Presenters/templates/Documents/List.xml | 33 ++++++++++----------- Web/static/css/main.css | 2 +- 3 files changed, 19 insertions(+), 22 deletions(-) diff --git a/Web/Presenters/DocumentsPresenter.php b/Web/Presenters/DocumentsPresenter.php index b003b932..78f17bfc 100644 --- a/Web/Presenters/DocumentsPresenter.php +++ b/Web/Presenters/DocumentsPresenter.php @@ -73,10 +73,10 @@ final class DocumentsPresenter extends OpenVKPresenter $this->template->count = $docs->size(); $this->template->docs = iterator_to_array($docs->page($page, OPENVK_DEFAULT_PER_PAGE)); $this->template->locale_string = "you_have_x_documents"; - if ($owner_id < 0) { - $this->template->locale_string = "group_has_x_documents"; - } elseif ($current_tab != 0) { + if ($current_tab != 0) { $this->template->locale_string = "x_documents_in_tab"; + } else if ($owner_id < 0) { + $this->template->locale_string = "group_has_x_documents"; } $this->template->canUpload = $owner_id == $this->user->id || $this->template->group->canBeModifiedBy($this->user->identity); diff --git a/Web/Presenters/templates/Documents/List.xml b/Web/Presenters/templates/Documents/List.xml index ad9a9948..5007de25 100644 --- a/Web/Presenters/templates/Documents/List.xml +++ b/Web/Presenters/templates/Documents/List.xml @@ -20,28 +20,25 @@ {block content} {var $is_gallery = $current_tab == 3 || $current_tab == 4}
- -
-
- -
- - {$tab["name"]} - {$tab["count"]} - +
-
+
{tr($locale_string, $count)}.
{_post_as_group} + {_post_as_group} -