ffff
This commit is contained in:
@@ -8351,7 +8351,7 @@ input#s_avatar {
|
|||||||
|
|
||||||
.nav-user-menu a {
|
.nav-user-menu a {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 10px 15px;
|
padding: 10px 10px;
|
||||||
color: var(--white);
|
color: var(--white);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
transition: background 0.2s;
|
transition: background 0.2s;
|
||||||
@@ -8722,6 +8722,8 @@ video.autoplay-gif {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
border-bottom: 1px solid var(--nav-link-hover-bg);
|
border-bottom: 1px solid var(--nav-link-hover-bg);
|
||||||
|
border-left: 1px solid var(--nav-border-color);
|
||||||
|
border-right: 1px solid var(--nav-border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Markdown Styles */
|
/* Markdown Styles */
|
||||||
|
|||||||
@@ -120,6 +120,8 @@ class CommentSystem {
|
|||||||
if (!document.body.classList.contains('layout-legacy') && !document.body.classList.contains('legacy-view')) return;
|
if (!document.body.classList.contains('layout-legacy') && !document.body.classList.contains('legacy-view')) return;
|
||||||
|
|
||||||
const updateBtn = () => {
|
const updateBtn = () => {
|
||||||
|
if (!this.initialLoadDone) return;
|
||||||
|
|
||||||
const btn = document.querySelector('.scroll-to-bottom');
|
const btn = document.querySelector('.scroll-to-bottom');
|
||||||
if (!btn) return;
|
if (!btn) return;
|
||||||
|
|
||||||
@@ -128,7 +130,9 @@ class CommentSystem {
|
|||||||
|
|
||||||
const rect = container.getBoundingClientRect();
|
const rect = container.getBoundingClientRect();
|
||||||
// Detect if we are at the bottom of the comments section
|
// Detect if we are at the bottom of the comments section
|
||||||
const isAtBottom = rect.bottom < window.innerHeight + 100;
|
// We also require window.scrollY > 50 to prevent flickering to 'scroll to top'
|
||||||
|
// when the page first loads and images haven't fully pushed the container down yet.
|
||||||
|
const isAtBottom = (rect.bottom < window.innerHeight + 100) && (window.scrollY > 50);
|
||||||
|
|
||||||
if (isAtBottom) {
|
if (isAtBottom) {
|
||||||
btn.classList.add('is-at-bottom');
|
btn.classList.add('is-at-bottom');
|
||||||
@@ -673,6 +677,7 @@ class CommentSystem {
|
|||||||
this.render(comments, this.user, initialIsSubscribed);
|
this.render(comments, this.user, initialIsSubscribed);
|
||||||
this.initialLoadDone = true;
|
this.initialLoadDone = true;
|
||||||
this.restoreState(state);
|
this.restoreState(state);
|
||||||
|
if (this.scrollHandler) this.scrollHandler();
|
||||||
this._loadDanmaku(comments);
|
this._loadDanmaku(comments);
|
||||||
|
|
||||||
if (scrollToId) {
|
if (scrollToId) {
|
||||||
@@ -743,6 +748,7 @@ class CommentSystem {
|
|||||||
this.reconcile(data.comments, data.user_id, data.is_subscribed);
|
this.reconcile(data.comments, data.user_id, data.is_subscribed);
|
||||||
this.initialLoadDone = true;
|
this.initialLoadDone = true;
|
||||||
this.restoreState(state);
|
this.restoreState(state);
|
||||||
|
if (this.scrollHandler) this.scrollHandler();
|
||||||
|
|
||||||
if (scrollToId) {
|
if (scrollToId) {
|
||||||
this.preservingScroll = false;
|
this.preservingScroll = false;
|
||||||
@@ -772,6 +778,7 @@ class CommentSystem {
|
|||||||
this.render(data.comments, data.user_id, data.is_subscribed);
|
this.render(data.comments, data.user_id, data.is_subscribed);
|
||||||
this.initialLoadDone = true;
|
this.initialLoadDone = true;
|
||||||
this.restoreState(state);
|
this.restoreState(state);
|
||||||
|
if (this.scrollHandler) this.scrollHandler();
|
||||||
this._loadDanmaku(data.comments);
|
this._loadDanmaku(data.comments);
|
||||||
|
|
||||||
if (scrollToId) {
|
if (scrollToId) {
|
||||||
|
|||||||
@@ -1358,11 +1358,11 @@ process.on('uncaughtException', err => {
|
|||||||
globals.lang = perRequestLang;
|
globals.lang = perRequestLang;
|
||||||
|
|
||||||
// Resolve per-request infobox preference
|
// Resolve per-request infobox preference
|
||||||
// Guests always get false — the alternative infobox is a logged-in user preference only
|
// Guests check the new config flag, whereas users use their session pref or default to the user flag
|
||||||
const useAltInfobox = (req && req.session && typeof req.session.use_alternative_infobox === 'boolean')
|
const useAltInfobox = (req && req.session && typeof req.session.use_alternative_infobox === 'boolean')
|
||||||
? req.session.use_alternative_infobox
|
? req.session.use_alternative_infobox
|
||||||
: (req && !req.session
|
: (req && !req.session
|
||||||
? false
|
? (cfg.websrv.guest_alternative_infobox === true)
|
||||||
: (data && typeof data.user_alternative_infobox === 'boolean'
|
: (data && typeof data.user_alternative_infobox === 'boolean'
|
||||||
? data.user_alternative_infobox
|
? data.user_alternative_infobox
|
||||||
: (cfg.websrv.user_alternative_infobox !== false)));
|
: (cfg.websrv.user_alternative_infobox !== false)));
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
@if(session)
|
@if(session)
|
||||||
@include(snippets/metadata-modal)
|
@include(snippets/metadata-modal)
|
||||||
@endif
|
@endif
|
||||||
@if((!private_society || session) && enable_sidebar)
|
@if(!private_society && enable_sidebar || session && enable_sidebar)
|
||||||
<div class="global-sidebar-right">
|
<div class="global-sidebar-right">
|
||||||
<div class="sidebar-activity">
|
<div class="sidebar-activity">
|
||||||
<div id="sidebar-activity-container" class="sidebar-comments-list">
|
<div id="sidebar-activity-container" class="sidebar-comments-list">
|
||||||
|
|||||||
Reference in New Issue
Block a user