SHA256
Доработать UI звонков и нижний тулбар
This commit is contained in:
@@ -1147,11 +1147,12 @@ function renderListContent({ screen, container, listState, navigate, refreshFeed
|
||||
container.append(list);
|
||||
}
|
||||
|
||||
function updateBottomCta({ button, listState, navigate, isTabEmpty = false }) {
|
||||
const baseClass = `primary-btn channels-bottom-action${isTabEmpty ? ' is-empty-lift' : ''}`;
|
||||
button.textContent = 'Поиск каналов';
|
||||
button.className = baseClass;
|
||||
button.onclick = () => openChannelFinderModal({ navigate });
|
||||
function updateBottomCta({ button }) {
|
||||
if (!button) return;
|
||||
button.hidden = true;
|
||||
button.textContent = '';
|
||||
button.className = 'channels-bottom-action';
|
||||
button.onclick = null;
|
||||
}
|
||||
|
||||
async function loadFeedAndRender({ screen, listState, contentEl, navigate }) {
|
||||
@@ -1306,12 +1307,7 @@ export function render({ navigate, route }) {
|
||||
createInMyBtn.style.display = '';
|
||||
if (topTitle.parentElement !== topBarLeft) topBarLeft.append(topTitle);
|
||||
|
||||
updateBottomCta({
|
||||
button: bottomCta,
|
||||
listState,
|
||||
navigate,
|
||||
isTabEmpty,
|
||||
});
|
||||
updateBottomCta({ button: bottomCta });
|
||||
};
|
||||
|
||||
screen.append(topBarEl, contentEl, bottomCta);
|
||||
@@ -1320,12 +1316,7 @@ export function render({ navigate, route }) {
|
||||
showToast(createSuccessFlash);
|
||||
}
|
||||
|
||||
updateBottomCta({
|
||||
button: bottomCta,
|
||||
listState,
|
||||
navigate,
|
||||
isTabEmpty: true,
|
||||
});
|
||||
updateBottomCta({ button: bottomCta });
|
||||
|
||||
// Применяем корректное состояние хедера сразу на первом рендере,
|
||||
// чтобы не показывать лишние кнопки до первой перерисовки.
|
||||
|
||||
Reference in New Issue
Block a user