SHA256
UI: уменьшение splash logo и правки diary preview
This commit is contained in:
@@ -33,6 +33,7 @@ import {
|
||||
makeShineMessageRoute,
|
||||
} from '../services/shine-routes.js';
|
||||
import { buildArweaveDataUrl } from '../services/arweave-file-service.js';
|
||||
import { parseDmTechBlocks } from '../services/dm-tech-blocks.js';
|
||||
|
||||
export const pageMeta = { id: 'channel-view', title: 'Канал' };
|
||||
const CHANNEL_TYPE_STORIES = 0;
|
||||
@@ -1712,7 +1713,8 @@ function renderPostCard(post, {
|
||||
const targetPreview = document.createElement('div');
|
||||
targetPreview.className = 'channel-message-target-preview';
|
||||
const targetType = getChannelMessageTypeMeta(post.targetMsgSubType)?.label || 'Материал';
|
||||
const targetText = String(post.targetText || '').trim();
|
||||
const targetParsed = parseDmTechBlocks(String(post.targetText || '').trim());
|
||||
const targetText = String(targetParsed.displayText || targetParsed.visibleText || '').trim();
|
||||
const targetAuthor = String(post.targetAuthorLogin || '').trim();
|
||||
targetPreview.innerHTML = `
|
||||
<strong>${escapeHtml(targetType)}</strong>
|
||||
|
||||
@@ -1022,10 +1022,13 @@ export function render({ navigate, route, chrome }) {
|
||||
const viewportHeight = Math.max(viewport?.height || 0, window.innerHeight || 0);
|
||||
const viewportShrunk = baseViewportHeight - viewportHeight > 120;
|
||||
const keyboardInset = viewportShrunk
|
||||
? Math.max(0, (window.innerHeight || 0) - viewportHeight - Number(viewport?.offsetTop || 0))
|
||||
? Math.max(0, baseViewportHeight - viewportHeight)
|
||||
: 0;
|
||||
setKeyboardInset(keyboardInset);
|
||||
setChatKeyboardOpen(inputFocused && viewportShrunk);
|
||||
if (viewportShrunk && window.scrollY !== 0) {
|
||||
window.scrollTo(0, 0);
|
||||
}
|
||||
if (inputFocused) {
|
||||
window.requestAnimationFrame(() => scrollToLatestMessage(log));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user