hgfd
This commit is contained in:
+10
-2
@@ -107,8 +107,16 @@
|
||||
if (canManage) {
|
||||
span.classList.add('can-cycle');
|
||||
}
|
||||
} else if (!window.f0ckSession?.is_anonymized && window.f0ckSession?.logged_in && !window.f0ckSession?.is_anon && (tag.display_name || tag.user)) {
|
||||
span.setAttribute("tooltip", tag.display_name || tag.user);
|
||||
} else {
|
||||
span.classList.add('tag-badge');
|
||||
span.setAttribute('data-tag-id', tag.id || '');
|
||||
span.setAttribute('data-tag', tag.tag);
|
||||
span.setAttribute('data-tag-normalized', tag.normalized);
|
||||
if (!window.f0ckSession?.is_anonymized && window.f0ckSession?.logged_in && !window.f0ckSession?.is_anon && (tag.display_name || tag.user)) {
|
||||
span.setAttribute("tooltip", tag.display_name || tag.user);
|
||||
}
|
||||
const isExcl = !!tag.is_excluded;
|
||||
if (isExcl) span.classList.add('tag-is-excluded');
|
||||
}
|
||||
|
||||
span.appendChild(contentEl);
|
||||
|
||||
+1177
-47
File diff suppressed because it is too large
Load Diff
+18
-12
@@ -1585,19 +1585,25 @@
|
||||
});
|
||||
};
|
||||
|
||||
setupAudioTuningSlider('onara_bg_opacity_slider', 'onara_bg_opacity_val', 'onaraBgOpacity', 0.70, v => Math.round(v * 100) + '%');
|
||||
setupAudioTuningSlider('onara_backdrop_blur_slider', 'onara_backdrop_blur_val', 'onaraBackdropBlur', 5, v => Math.round(v) + 'px');
|
||||
setupAudioTuningSlider('onara_grid_dim_slider', 'onara_grid_dim_val', 'onaraGridDim', 0.38, v => Math.round(v * 100) + '%');
|
||||
setupAudioTuningSlider('bg_canvas_opacity_slider', 'bg_canvas_opacity_val', 'bgCanvasOpacity', 1.00, v => Math.round(v * 100) + '%');
|
||||
setupAudioTuningSlider('bg_canvas_blur_slider', 'bg_canvas_blur_val', 'bgCanvasBlur', 30, v => Math.round(v) + 'px');
|
||||
setupAudioTuningSlider('bg_canvas_brightness_slider', 'bg_canvas_brightness_val', 'bgCanvasBrightness', 0.45, v => Number(v).toFixed(2) + 'x');
|
||||
setupAudioTuningSlider('bg_canvas_saturate_slider', 'bg_canvas_saturate_val', 'bgCanvasSaturate', 1.8, v => Number(v).toFixed(2) + 'x');
|
||||
setupAudioTuningSlider('bg_canvas_contrast_slider', 'bg_canvas_contrast_val', 'bgCanvasContrast', 1.1, v => Number(v).toFixed(2) + 'x');
|
||||
setupAudioTuningSlider('bg_canvas_zoom_slider', 'bg_canvas_zoom_val', 'bgCanvasZoom', 1.12, v => Number(v).toFixed(2) + 'x');
|
||||
|
||||
// Blur Engine slider — shows friendly label text instead of raw number
|
||||
const blurMethodNames = ['Canvas 2D', 'GPU CSS Filter', 'Hybrid'];
|
||||
setupAudioTuningSlider('bg_blur_method_slider', 'bg_blur_method_val', 'bgBlurMethod', 0, v => blurMethodNames[Math.round(v)] || String(Math.round(v)), v => Math.round(Number(v)));
|
||||
// Onara enable/disable toggle (localStorage only — no server round-trip needed)
|
||||
const onaraEnabledToggle = document.getElementById('onara_enabled_toggle');
|
||||
if (onaraEnabledToggle) {
|
||||
const LS_KEY = 'f0ck_onara_enabled';
|
||||
// Seed checkbox from localStorage; fall back to the server-set session value
|
||||
const stored = localStorage.getItem(LS_KEY);
|
||||
const sessionOnara = !!(window.f0ckSession?.onara);
|
||||
onaraEnabledToggle.checked = stored !== null ? stored === 'true' : sessionOnara;
|
||||
// Reflect current state into window.onara so isOnaraActive() sees it
|
||||
window.onara = onaraEnabledToggle.checked;
|
||||
|
||||
onaraEnabledToggle.addEventListener('change', () => {
|
||||
const enabled = onaraEnabledToggle.checked;
|
||||
localStorage.setItem(LS_KEY, String(enabled));
|
||||
window.onara = enabled;
|
||||
showStatus('Onara viewer ' + (enabled ? 'enabled' : 'disabled') + '.', 'success');
|
||||
});
|
||||
}
|
||||
|
||||
// Quote Emojis Toggle
|
||||
const quoteEmojisToggle = document.getElementById('quote_emojis_toggle');
|
||||
|
||||
@@ -198,7 +198,9 @@ window.escapeHtmlUpload = window.escapeHtmlUpload || ((unsafe) => {
|
||||
tag_id: item.rating_tag_id || item.tag_id || 0,
|
||||
is_oc: !!item.is_oc,
|
||||
slug: item.slug,
|
||||
visibility: item.visibility || 0
|
||||
visibility: item.visibility || 0,
|
||||
is_album: !!item.is_album,
|
||||
album_count: item.album_count || 0
|
||||
});
|
||||
}
|
||||
})
|
||||
@@ -3068,7 +3070,9 @@ window.initUploadForm = (selector) => {
|
||||
tag_id: res.tag_id ?? 0,
|
||||
is_oc: !!res.is_oc,
|
||||
slug: res.slug,
|
||||
visibility: res.visibility || 0
|
||||
visibility: res.visibility || 0,
|
||||
is_album: !!res.is_album,
|
||||
album_count: res.album_count || 0
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3320,7 +3324,9 @@ window.initUploadForm = (selector) => {
|
||||
tag_id: up.tag_id ?? 0,
|
||||
is_oc: !!up.is_oc,
|
||||
slug: up.slug,
|
||||
visibility: up.visibility || 0
|
||||
visibility: up.visibility || 0,
|
||||
is_album: !!up.is_album,
|
||||
album_count: up.album_count || 0
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
+20
-2
@@ -103,12 +103,30 @@
|
||||
if (canManage) {
|
||||
span.classList.add('can-cycle');
|
||||
}
|
||||
} else if (!window.f0ckSession?.is_anonymized && window.f0ckSession?.logged_in && !window.f0ckSession?.is_anon && (tag.display_name || tag.user)) {
|
||||
span.setAttribute('tooltip', tag.display_name || tag.user);
|
||||
} else {
|
||||
span.classList.add('tag-badge');
|
||||
span.setAttribute('data-tag-id', tag.id || '');
|
||||
span.setAttribute('data-tag', tag.tag);
|
||||
span.setAttribute('data-tag-normalized', tag.normalized);
|
||||
if (!window.f0ckSession?.is_anonymized && window.f0ckSession?.logged_in && !window.f0ckSession?.is_anon && (tag.display_name || tag.user)) {
|
||||
span.setAttribute('tooltip', tag.display_name || tag.user);
|
||||
}
|
||||
const isExcl = !!tag.is_excluded;
|
||||
if (isExcl) span.classList.add('tag-is-excluded');
|
||||
}
|
||||
|
||||
span.insertAdjacentElement("beforeend", contentEl);
|
||||
|
||||
if (!isRating && tag.can_exclude) {
|
||||
const excludeBtn = document.createElement('button');
|
||||
excludeBtn.type = 'button';
|
||||
excludeBtn.className = 'tag-exclude-btn';
|
||||
excludeBtn.setAttribute('title', tag.is_excluded ? 'Excluded (click to unexclude)' : 'Exclude tag');
|
||||
excludeBtn.setAttribute('aria-label', 'Exclude tag');
|
||||
excludeBtn.innerHTML = `<i class="fa-solid ${tag.is_excluded ? 'fa-circle-check' : 'fa-ban'}"></i>`;
|
||||
span.insertAdjacentElement('beforeend', excludeBtn);
|
||||
}
|
||||
|
||||
if (window.f0ckSession && (window.f0ckSession.is_admin || window.f0ckSession.is_moderator) && !isRating) {
|
||||
const space = document.createTextNode('\u00A0'); //
|
||||
span.appendChild(space);
|
||||
|
||||
Reference in New Issue
Block a user