Merge branch 'master' into develop

This commit is contained in:
Barış Soner Uşaklı
2026-03-09 10:39:44 -04:00
2 changed files with 10 additions and 5 deletions

View File

@@ -386,7 +386,8 @@ define('forum/topic/postTools', [
return slug;
}
const post = button.parents('[data-pid]');
if (post.length && !post.hasClass('self-post')) {
const isSelfPost = post.hasClass('self-post');
if (post.length) {
slug = slugify(post.attr('data-username'), true);
if (!slug) {
if (post.attr('data-uid') !== '0') {
@@ -396,7 +397,7 @@ define('forum/topic/postTools', [
}
}
if (slug && slug !== '[[global:former-user]]' && slug !== '[[global:guest]]') {
slug = '@' + slug;
slug = isSelfPost ? slug : `@${slug}`;
}
}

View File

@@ -377,6 +377,10 @@ define('navigator', [
function toggleAnchor(text) {
anchorEl.innerText = text;
anchorEl.style.display = text ? 'inline' : 'none';
if (text) {
translator.translate(text).then(translated => anchorEl.innerText = translated);
}
anchorEl.setAttribute('aria-disabled', text ? 'false' : 'true');
if (text) {
anchorEl.removeAttribute('tabindex');
@@ -384,11 +388,11 @@ define('navigator', [
anchorEl.setAttribute('tabindex', -1);
}
}
const anchorHeight = anchorEl.getBoundingClientRect().height;
if (remaining > 0 && (trackHeight - thumbBottom) >= thumbHeight) {
const text = await translator.translate(`[[topic:navigator.unread, ${remaining}]]`);
if (remaining > 0 && (trackHeight - thumbBottom) >= Math.min(16, anchorHeight)) {
anchorEl.href = `${config.relative_path}/topic/${ajaxify.data.slug}/${Math.min(index + 1, ajaxify.data.postcount)}`;
toggleAnchor(text);
toggleAnchor(`[[topic:navigator.unread, ${remaining}]]`);
} else {
anchorEl.href = ajaxify.data.url;
toggleAnchor('');