hgdf
This commit is contained in:
@@ -3131,7 +3131,7 @@ body.layout-legacy .scroll-to-bottom svg {
|
|||||||
background-position: var(--author-banner-position, center top);
|
background-position: var(--author-banner-position, center top);
|
||||||
background-size: var(--author-banner-size, 100% auto);
|
background-size: var(--author-banner-size, 100% auto);
|
||||||
background-repeat: var(--author-banner-repeat, no-repeat);
|
background-repeat: var(--author-banner-repeat, no-repeat);
|
||||||
opacity: var(--author-banner-opacity, 0.25);
|
opacity: var(--author-banner-opacity, 0.08);
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
border-radius: inherit;
|
border-radius: inherit;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|||||||
@@ -550,8 +550,16 @@
|
|||||||
|
|
||||||
|
|
||||||
const bannerEnabled = window.f0ckCommentBannerEnabled !== false && window.f0ckSession?.comment_banner_enabled !== false;
|
const bannerEnabled = window.f0ckCommentBannerEnabled !== false && window.f0ckSession?.comment_banner_enabled !== false;
|
||||||
const bannerStyle = (bannerEnabled && c.banner_file && c.banner_file !== 'null')
|
let bannerFile = c.banner_file;
|
||||||
? `style="--author-banner: url('/a/${c.banner_file}'); --author-banner-position: ${c.banner_position === 'center' ? 'center top' : (c.banner_position || 'center top')}; --author-banner-size: ${(c.banner_size && c.banner_size !== 'cover') ? c.banner_size : '100% auto'}; --author-banner-repeat: no-repeat;"`
|
let bannerPos = c.banner_position;
|
||||||
|
let bannerSz = c.banner_size;
|
||||||
|
if (!bannerFile && window.f0ckSession && window.f0ckSession.id && (c.user_id === window.f0ckSession.id || c.username === window.f0ckSession.user)) {
|
||||||
|
bannerFile = window.f0ckSession.banner_file;
|
||||||
|
bannerPos = window.f0ckSession.banner_position;
|
||||||
|
bannerSz = window.f0ckSession.banner_size;
|
||||||
|
}
|
||||||
|
const bannerStyle = (bannerEnabled && bannerFile && bannerFile !== 'null')
|
||||||
|
? `style="--author-banner: url('/a/${bannerFile}'); --author-banner-position: ${bannerPos === 'center' ? 'center top' : (bannerPos || 'center top')}; --author-banner-size: ${(bannerSz && bannerSz !== 'cover') ? bannerSz : '100% auto'}; --author-banner-repeat: no-repeat;"`
|
||||||
: '';
|
: '';
|
||||||
|
|
||||||
return `
|
return `
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ db.listen('activity', async (payload) => {
|
|||||||
// We need the username, avatar, and item mime for the preview
|
// We need the username, avatar, and item mime for the preview
|
||||||
// trigger only gave us user_id and item_id
|
// trigger only gave us user_id and item_id
|
||||||
const [details] = await db`
|
const [details] = await db`
|
||||||
SELECT u.id as user_id, u.user as username, uo.avatar, uo.avatar_file, uo.username_color, uo.display_name, i.mime, i.slug as item_slug, COALESCE(i.visibility, 0) as visibility, LOWER(i.username) as item_username,
|
SELECT u.id as user_id, u.user as username, uo.avatar, uo.avatar_file, uo.username_color, uo.display_name, uo.banner_file, uo.banner_position, uo.banner_size, uo.banner_repeat, i.mime, i.slug as item_slug, COALESCE(i.visibility, 0) as visibility, LOWER(i.username) as item_username,
|
||||||
(SELECT tag_id FROM tags_assign WHERE item_id = i.id AND tag_id IN (1, 2) LIMIT 1) as tag_id
|
(SELECT tag_id FROM tags_assign WHERE item_id = i.id AND tag_id IN (1, 2) LIMIT 1) as tag_id
|
||||||
FROM "user" u
|
FROM "user" u
|
||||||
LEFT JOIN user_options uo ON u.id = uo.user_id
|
LEFT JOIN user_options uo ON u.id = uo.user_id
|
||||||
@@ -135,6 +135,10 @@ db.listen('activity', async (payload) => {
|
|||||||
data.username = details.username;
|
data.username = details.username;
|
||||||
data.avatar = details.avatar;
|
data.avatar = details.avatar;
|
||||||
data.avatar_file = details.avatar_file;
|
data.avatar_file = details.avatar_file;
|
||||||
|
data.banner_file = data.banner_file || details.banner_file || null;
|
||||||
|
data.banner_position = data.banner_position || details.banner_position || null;
|
||||||
|
data.banner_size = data.banner_size || details.banner_size || null;
|
||||||
|
data.banner_repeat = data.banner_repeat || details.banner_repeat || null;
|
||||||
data.mime = details.mime;
|
data.mime = details.mime;
|
||||||
data.username_color = details.username_color;
|
data.username_color = details.username_color;
|
||||||
data.display_name = details.display_name || null;
|
data.display_name = details.display_name || null;
|
||||||
|
|||||||
Reference in New Issue
Block a user