SHA256
Полностью поддерживает английский язык
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { t } from '../i18n/index.js';
|
||||
import { renderUserAvatar } from '../components/avatar-image.js';
|
||||
// Minimal public preview sidebar, shown only to visitors without a session.
|
||||
export function mountPublicChannelSidebar(screen, { owner = '', channel = '', subscribers = null, avatar = null, navigate }) {
|
||||
@@ -11,17 +12,17 @@ export function mountPublicChannelSidebar(screen, { owner = '', channel = '', su
|
||||
face.replaceChildren(renderUserAvatar({ login: owner || 'unknown', size: 'sm' }));
|
||||
const details = document.createElement('div');
|
||||
const author = document.createElement('strong');
|
||||
author.textContent = owner || 'Автор';
|
||||
author.textContent = owner || t('remaining.public_channel.author');
|
||||
details.append(author);
|
||||
identity.append(face, details);
|
||||
const name = document.createElement('h2');
|
||||
name.textContent = channel || 'Канал';
|
||||
name.textContent = channel || t('remaining.public_channel.channel');
|
||||
const count = document.createElement('p');
|
||||
count.textContent = subscribers == null ? '' : `${Math.max(0, Number(subscribers) || 0)} подписчиков`;
|
||||
count.textContent = subscribers == null ? '' : t('remaining.public_channel.subscribers', { count: Math.max(0, Number(subscribers) || 0) });
|
||||
const button = document.createElement('button');
|
||||
button.type = 'button';
|
||||
button.className = 'primary-btn';
|
||||
button.textContent = 'Открыть в SHiNE';
|
||||
button.textContent = t('remaining.public_channel.open_in_shine');
|
||||
button.addEventListener('click', () => {
|
||||
window.sessionStorage.setItem('shine-public-return-path', window.location.pathname);
|
||||
navigate('login-view');
|
||||
|
||||
Reference in New Issue
Block a user