+
{if !$dat || $dat->getWallOwner()->isHideFromGlobalFeedEnabled()}
{_closed_group_post}.
{else}
@@ -222,31 +234,47 @@
{elseif $section === 'videos'}
-
+
{include "../components/video.xml", video => $dat}
{elseif $section === 'audios'}
-
+
{include "../Audio/player.xml", audio => $dat}
{elseif $section === 'audios_playlists'}
-
+
{include "../Audio/playlistListView.xml", playlist => $dat}
{/if}
{else}
diff --git a/Web/Presenters/templates/User/Groups.xml b/Web/Presenters/templates/User/Groups.xml
index bca006e8..d3528268 100644
--- a/Web/Presenters/templates/User/Groups.xml
+++ b/Web/Presenters/templates/User/Groups.xml
@@ -2,6 +2,7 @@
{var $iterator = $user->getClubs($page, $admin)}
{var $count = $user->getClubCount($admin)}
+{block noscroll}{/block}
{block title}
{_groups}
{/block}
@@ -121,8 +122,8 @@
{_search_group}
{_search_group_desc}
diff --git a/Web/Presenters/templates/Wall/Feed.xml b/Web/Presenters/templates/Wall/Feed.xml
index e609419c..94658a81 100644
--- a/Web/Presenters/templates/Wall/Feed.xml
+++ b/Web/Presenters/templates/Wall/Feed.xml
@@ -23,10 +23,12 @@
{include "../components/textArea.xml", route => "/wall" . $thisUser->getId() . "/makePost", graffiti => true, polls => true, notes => true, hasSource => true}
- {foreach $posts as $post}
-
- {include "../components/post.xml", post => $post, onWallOf => true, commentSection => true}
- {/foreach}
+
@@ -55,8 +57,4 @@
window.location.assign(url.replace("__padding", e.target.value));
});
-
- {if isset($thisUser) && $thisUser->hasMicroblogEnabled()}
- {script "js/al_comments.js"}
- {/if}
{/block}
diff --git a/Web/Presenters/templates/Wall/Wall.xml b/Web/Presenters/templates/Wall/Wall.xml
index 80452295..4d3d1cee 100644
--- a/Web/Presenters/templates/Wall/Wall.xml
+++ b/Web/Presenters/templates/Wall/Wall.xml
@@ -31,13 +31,13 @@
{include "../components/textArea.xml", route => "/wall$owner/makePost", hasSource => true}
-
+
{if sizeof($posts) > 0}
- {foreach $posts as $post}
+
{include "../components/paginator.xml", conf => $paginatorConf}
{else}
{_no_posts_abstract}
@@ -45,8 +45,4 @@
-
- {if isset($thisUser) && $thisUser->hasMicroblogEnabled()}
- {script "js/al_comments.js"}
- {/if}
{/block}
diff --git a/Web/Presenters/templates/components/comments.xml b/Web/Presenters/templates/components/comments.xml
index 0df0c91f..53253b5f 100644
--- a/Web/Presenters/templates/components/comments.xml
+++ b/Web/Presenters/templates/components/comments.xml
@@ -9,14 +9,14 @@
{if sizeof($comments) > 0}
- {foreach $comments as $comment}
- {include "comment.xml", comment => $comment}
- {/foreach}
+
{include "paginator.xml", conf => (object) ["page" => $page, "count" => $count, "amount" => sizeof($comments), "perPage" => 10]}
{else}
{_comments_tip}
{/if}
-
-{script "js/al_comments.js"}
diff --git a/Web/Presenters/templates/components/paginator.xml b/Web/Presenters/templates/components/paginator.xml
index 0dffd004..3db45de9 100644
--- a/Web/Presenters/templates/components/paginator.xml
+++ b/Web/Presenters/templates/components/paginator.xml
@@ -2,7 +2,7 @@
{var $pageCount = ceil($conf->count / $conf->perPage)}
-
+
«
{for $j = $conf->page - ($space-1); $j <= $conf->page + ($space-1); $j++}
{$j}
diff --git a/Web/Presenters/templates/components/wall.xml b/Web/Presenters/templates/components/wall.xml
index 91e08fbc..b00681a1 100644
--- a/Web/Presenters/templates/components/wall.xml
+++ b/Web/Presenters/templates/components/wall.xml
@@ -13,13 +13,13 @@
{include "../components/textArea.xml", route => "/wall$owner/makePost", graffiti => true, polls => true, notes => true, hasSource => true}
-
+
{if sizeof($posts) > 0}
- {foreach $posts as $post}
+
{include "../components/paginator.xml", conf => $paginatorConf}
{else}
{_no_posts_abstract}
@@ -28,7 +28,3 @@
-
-{if isset($thisUser) && $thisUser->hasMicroblogEnabled()}
- {script "js/al_comments.js"}
-{/if}
diff --git a/Web/static/css/main.css b/Web/static/css/main.css
index e5591d13..18455cba 100644
--- a/Web/static/css/main.css
+++ b/Web/static/css/main.css
@@ -1435,7 +1435,7 @@ textarea {
.toTop {
position: fixed;
- padding: 20px;
+ padding: 12px;
width: 100px;
height: 100%;
background-color: #f3f3f3;
@@ -1445,9 +1445,34 @@ textarea {
opacity: 0;
transition: .1s all;
z-index: 129;
+ user-select: none;
}
-body.scrolled .toTop:hover {
+.toTop > div svg {
+ display: inline-block;
+ margin-right: 2px;
+ width: 8px;
+ height: 7px;
+ fill: #3f3f3f;
+}
+
+.toTop > div span {
+ font-weight: bold;
+}
+
+.toTop.has_down #to_up, .toTop #to_back {
+ display: none;
+}
+
+.toTop.has_down #to_back {
+ display: block;
+}
+
+.toTop.has_down {
+ opacity: .3;
+}
+
+body.scrolled .toTop:hover, .toTop.has_down:hover {
opacity: .5;
cursor: pointer;
}
diff --git a/Web/static/js/al_comments.js b/Web/static/js/al_comments.js
index f4172428..ad398637 100644
--- a/Web/static/js/al_comments.js
+++ b/Web/static/js/al_comments.js
@@ -1,4 +1,4 @@
-u(".comment-reply").on("click", function(e) {
+u(document).on("click", ".comment-reply", function(e) {
let comment = u(e.target).closest(".post");
let authorId = comment.data("owner-id");
let authorNm = u(".post-author > a > b", comment.first()).text().trim();
@@ -8,6 +8,8 @@ u(".comment-reply").on("click", function(e) {
let mention = ("[" + (fromGroup ? "club" : "id") + authorId + "|" + authorNm + "], ");
// Substitute pervious mention if present, prepend otherwise
- inputbox.nodes[0].value = inputbox.nodes[0].value.replace(/(^\[([A-Za-z0-9]+)\|([\p{L} 0-9@]+)\], |^)/u, mention);
+ inputbox.nodes.forEach(node => {
+ node.value = node.value.replace(/(^\[([A-Za-z0-9]+)\|([\p{L} 0-9@]+)\], |^)/u, mention);
+ })
inputbox.trigger("focusin");
});
diff --git a/Web/static/js/al_feed.js b/Web/static/js/al_feed.js
index 2831d6f1..7ca8a798 100644
--- a/Web/static/js/al_feed.js
+++ b/Web/static/js/al_feed.js
@@ -84,6 +84,7 @@ u(document).on('click', '#__feed_settings_link', (e) => {
const CURRENT_PERPAGE = Number(__temp_url.searchParams.get('posts') ?? 10)
const CURRENT_PAGE = Number(__temp_url.searchParams.get('p') ?? 1)
const CURRENT_RETURN_BANNED = Number(__temp_url.searchParams.get('return_banned') ?? 0)
+ const CURRENT_AUTO_SCROLL = Number(localStorage.getItem('ux.auto_scroll') ?? 1)
const COUNT = [1, 5, 10, 20, 30, 40, 50]
u('#_feed_settings_container #__content').html(`
@@ -107,11 +108,21 @@ u(document).on('click', '#__feed_settings_link', (e) => {
-
+
|
- ${tr('show_ignored_sources')}
+
+ |
+
+
+
+
+
+
+ |
+
+
|
@@ -268,3 +279,7 @@ u(document).on('click', '#__feed_settings_link', (e) => {
__switchTab('main')
})
+
+u(document).on('change', `input[data-act='localstorage_item']`, (e) => {
+ localStorage.setItem(e.target.name, Number(e.target.checked))
+})
diff --git a/Web/static/js/al_mentions.js b/Web/static/js/al_mentions.js
index 1be77563..d324cca6 100644
--- a/Web/static/js/al_mentions.js
+++ b/Web/static/js/al_mentions.js
@@ -19,7 +19,8 @@ var tooltipTemplate = Handlebars.compile(`
`);
-tippy(".mention", {
+tippy.delegate("body", {
+ target: '.mention',
theme: "light vk",
content: "⌛",
allowHTML: true,
diff --git a/Web/static/js/al_music.js b/Web/static/js/al_music.js
index ac609358..2c8e11db 100644
--- a/Web/static/js/al_music.js
+++ b/Web/static/js/al_music.js
@@ -631,6 +631,35 @@ class bigPlayer {
duration: this.tracks["currentTrack"].length
})
}
+
+ loadContextPage(page, lesser = false) {
+ const formdata = new FormData()
+ formdata.append("context", this.context["context_type"])
+ formdata.append("context_entity", this.context["context_id"])
+ formdata.append("hash", u("meta[name=csrf]").attr("value"))
+ formdata.append("page", page)
+
+ ky.post("/audios/context", {
+ hooks: {
+ afterResponse: [
+ async (_request, _options, response) => {
+ const newArr = await response.json()
+
+ if(lesser)
+ this.tracks["tracks"] = newArr["items"].concat(this.tracks["tracks"])
+ else
+ this.tracks["tracks"] = this.tracks["tracks"].concat(newArr["items"])
+
+ this.context["playedPages"].push(String(newArr["page"]))
+
+ this.updateButtons()
+ console.info("Loaded context for page " + page)
+ }
+ ]
+ },
+ body: formdata
+ })
+ }
}
document.addEventListener("DOMContentLoaded", function() {
diff --git a/Web/static/js/al_suggestions.js b/Web/static/js/al_suggestions.js
index 1c3da3e8..befe78b7 100644
--- a/Web/static/js/al_suggestions.js
+++ b/Web/static/js/al_suggestions.js
@@ -201,7 +201,7 @@ $(document).on("click", ".sugglist a", (e) => {
})
// нажатие на пагинатор у постов предложки
-$(document).on("click", "#postz .paginator a", (e) => {
+/*$(document).on("click", "#postz .paginator a", (e) => {
e.preventDefault()
ky(e.currentTarget.href, {
@@ -228,4 +228,4 @@ $(document).on("click", "#postz .paginator a", (e) => {
]
}
})
-})
+})*/
diff --git a/Web/static/js/al_wall.js b/Web/static/js/al_wall.js
index 29722564..6430e47c 100644
--- a/Web/static/js/al_wall.js
+++ b/Web/static/js/al_wall.js
@@ -399,6 +399,7 @@ async function OpenVideo(video_arr = [], init_player = true)
details.find('.media-page-wrapper-description b').remove()
u('#ovk-player-info').html(details.html())
+ bsdnHydrate()
}
})
@@ -542,7 +543,8 @@ var tooltipClientNoInfoTemplate = Handlebars.compile(`