aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2025-06-12 11:51:01 +0000
committerMario <mario@mariovavti.com>2025-06-12 11:51:01 +0000
commit66512f4e51f689eafbc632ef9a32e80fd26c9ef8 (patch)
tree0cbfb6481f6f465e5a6ef41b6a507dc0a3d4b643 /view
parent71a06af8a927e4fd63993e146555e2dc217c80fd (diff)
downloadvolse-hubzilla-66512f4e51f689eafbc632ef9a32e80fd26c9ef8.tar.gz
volse-hubzilla-66512f4e51f689eafbc632ef9a32e80fd26c9ef8.tar.bz2
volse-hubzilla-66512f4e51f689eafbc632ef9a32e80fd26c9ef8.zip
blog mode fixes
Diffstat (limited to 'view')
-rw-r--r--view/js/main.js11
-rw-r--r--view/tpl/conv_item.tpl6
2 files changed, 13 insertions, 4 deletions
diff --git a/view/js/main.js b/view/js/main.js
index a80efd33b..ff8e61ec8 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -102,6 +102,15 @@ $(document).ready(function() {
const isCommentBtn = target.classList.contains('wall-item-comment');
if (isCommentBtn) {
+ if (id === parentId) {
+ // Handle blog mode
+ target.classList.add('disabled');
+ document.getElementById(`load-more-progress-wrapper-${id}`).classList.remove('d-none');
+ document.getElementById(`load-more-${id}`).classList.remove('d-none')
+ request(id, mid, 'load', parentId, uuid, isUserClick);
+ return;
+ }
+
// Get relevant DOM elements
const threadWrapper = document.getElementById(`thread-wrapper-${id}`);
const parentWrapper = document.getElementById(`thread-wrapper-${parentId}`);
@@ -124,7 +133,7 @@ $(document).ready(function() {
parentSubThreadWrapper.querySelectorAll('.thread-wrapper.item-highlight').forEach(el => el.classList.remove('item-highlight'));
if (isUserClick && parentIndentedThreads.length === 0 && !subThreadWrapper.children.length) {
- // Handle first-time expansion and highlighting
+ // Handle first-time expansion and highlighting but not for toplevels (blog mode)
threadWrapper.classList.add('item-highlight');
} else {
// Handle indentation and zooming
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index c04e3860b..112e2705b 100644
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -222,11 +222,11 @@
</div>
</div>
{{if $item.thread_level == 1}}
- {{if $item.toplevel && $item.load_more && $item.threaded && !$item.blog_mode}}
- <div id="load-more-progress-wrapper-{{$item.id}}" class="progress " role="progressbar" aria-valuenow="{{$item.comments_total_percent}}" aria-valuemin="0" aria-valuemax="100" style="height: 1px">
+ {{if $item.toplevel && $item.load_more && $item.threaded}}
+ <div id="load-more-progress-wrapper-{{$item.id}}" class="progress{{if $item.blog_mode}} d-none{{/if}}" role="progressbar" aria-valuenow="{{$item.comments_total_percent}}" aria-valuemin="0" aria-valuemax="100" style="height: 1px">
<div id="load-more-progress-{{$item.id}}" class="progress-bar bg-info" style="width: {{$item.comments_total_percent}}%; margin-left: auto; margin-right: auto;" data-comments-total="{{$item.comments_total}}"></div>
</div>
- <div id="load-more-{{$item.id}}" class="text-center text-secondary cursor-pointer" title="{{$item.load_more_title}}" onclick="request(0, '{{$item.rawmid}}', 'load', {{$item.parent}}, ''); return false;">
+ <div id="load-more-{{$item.id}}" class="text-center text-secondary cursor-pointer{{if $item.blog_mode}} d-none{{/if}}" title="{{$item.load_more_title}}" onclick="request(0, '{{$item.rawmid}}', 'load', {{$item.parent}}, ''); return false;">
<span id="load-more-dots-{{$item.id}}" class=""><span class="dot-1">-</span> <span class="dot-2">-</span> <span class="dot-3">-</span></span>
</div>
{{/if}}