add approval message
This commit is contained in:
@@ -525,7 +525,13 @@ window.cancelAnimFrame = (function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const syncRatingButtonUI = () => {
|
const syncRatingButtonUI = () => {
|
||||||
const activeRatings = getRatingsCookie();
|
let activeRatings = getRatingsCookie();
|
||||||
|
if (activeRatings.length === 0) {
|
||||||
|
if (window.activeMode === 0) activeRatings = ['sfw'];
|
||||||
|
else if (window.activeMode === 1) activeRatings = ['nsfw'];
|
||||||
|
else if (window.activeMode === 4) activeRatings = ['nsfl'];
|
||||||
|
else if (window.activeMode === 2) activeRatings = ['untagged'];
|
||||||
|
}
|
||||||
const selector = document.getElementById('rating-selector');
|
const selector = document.getElementById('rating-selector');
|
||||||
if (!selector) return;
|
if (!selector) return;
|
||||||
selector.querySelectorAll('.rating-toggle-btn').forEach(btn => {
|
selector.querySelectorAll('.rating-toggle-btn').forEach(btn => {
|
||||||
@@ -536,7 +542,7 @@ window.cancelAnimFrame = (function () {
|
|||||||
// ALL button: active when ratings cookie is empty/absent (server mode is the authority)
|
// ALL button: active when ratings cookie is empty/absent (server mode is the authority)
|
||||||
const allBtn = document.getElementById('rating-btn-all');
|
const allBtn = document.getElementById('rating-btn-all');
|
||||||
if (allBtn) {
|
if (allBtn) {
|
||||||
allBtn.classList.toggle('active', activeRatings.length === 0 && window.activeMode === 3);
|
allBtn.classList.toggle('active', (getRatingsCookie().length === 0 && window.activeMode === 3) || activeRatings.length === 0);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1972,6 +1972,9 @@ window.initUploadForm = (selector) => {
|
|||||||
|
|
||||||
if (isShitpost) {
|
if (isShitpost) {
|
||||||
// Flash message removed as requested
|
// Flash message removed as requested
|
||||||
|
if (lastData?.manual_approval && typeof window.showFlash === 'function') {
|
||||||
|
window.showFlash('Upload awaits approval, please be patient', 'info');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!dragModal && statusDiv) {
|
if (!dragModal && statusDiv) {
|
||||||
statusDiv.innerHTML = '✓ ' + (lastData?.msg || 'Upload successful');
|
statusDiv.innerHTML = '✓ ' + (lastData?.msg || 'Upload successful');
|
||||||
@@ -2125,11 +2128,18 @@ window.initUploadForm = (selector) => {
|
|||||||
form._f0ckUploader.reset();
|
form._f0ckUploader.reset();
|
||||||
if (isShitpost) {
|
if (isShitpost) {
|
||||||
// Flash message removed as requested
|
// Flash message removed as requested
|
||||||
|
if (lastData?.manual_approval && typeof window.showFlash === 'function') {
|
||||||
|
window.showFlash('Upload awaits approval, please be patient', 'info');
|
||||||
|
}
|
||||||
} else if (!dragModal && statusDiv) {
|
} else if (!dragModal && statusDiv) {
|
||||||
statusDiv.innerHTML = '✓ ' + (lastData?.msg || 'Upload successful');
|
statusDiv.innerHTML = '✓ ' + (lastData?.msg || 'Upload successful');
|
||||||
statusDiv.className = 'upload-status success';
|
statusDiv.className = 'upload-status success';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isShitpost && lastData?.manual_approval && typeof window.showFlash === 'function') {
|
||||||
|
window.showFlash('Upload awaits approval, please be patient', 'info');
|
||||||
|
}
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (typeof window.loadPageAjax === 'function') window.loadPageAjax('/');
|
if (typeof window.loadPageAjax === 'function') window.loadPageAjax('/');
|
||||||
else window.location.href = '/';
|
else window.location.href = '/';
|
||||||
|
|||||||
Reference in New Issue
Block a user