Добавили счётчик подписчиков в каналах и подписки пользователя

This commit is contained in:
AidarKC
2026-08-26 11:11:46 +04:00
parent 3a5851939e
commit 01321f5200
28 changed files with 1966 additions and 44 deletions
+20
View File
@@ -51,6 +51,26 @@ export function makeShineChannelRoute({ ownerLogin = '', ownerBlockchainName = '
return `${SHINE_ROUTE_SEGMENT}/${encodeRoutePart(ownerBch)}/${encodeRoutePart(chName)}`;
}
export function makeShineChannelRootRoute({ ownerBlockchainName = '', channelRootBlockNumber = '', channelRootBlockHash = '' }) {
const ownerBch = String(ownerBlockchainName || '').trim();
const rootNo = String(channelRootBlockNumber || '').trim();
const rootHash = String(channelRootBlockHash || '').trim();
if (!ownerBch || !rootNo || !rootHash) return '';
return `channel/${encodeRoutePart(ownerBch)}/${encodeRoutePart(rootNo)}/${encodeRoutePart(rootHash)}`;
}
export function makeShineChannelAboutRoute({ ownerBlockchainName = '', channelRootBlockNumber = '', channelRootBlockHash = '' }) {
const base = makeShineChannelRootRoute({ ownerBlockchainName, channelRootBlockNumber, channelRootBlockHash });
return base ? `${base}/about` : '';
}
export function makeShineChannelShortRoute({ ownerBlockchainName = '', channelName = '' }) {
const ownerBch = String(ownerBlockchainName || '').trim();
const chName = String(channelName || '').trim();
if (!ownerBch || !chName) return '';
return `${encodeRoutePart(ownerBch)}/${encodeRoutePart(chName)}`;
}
export function makeShineMessageRoute({ ownerLogin = '', messageBlockchainName = '', messageBlockNumber = '' }) {
const msgBch = String(messageBlockchainName || '').trim();
const msgNo = String(messageBlockNumber || '').trim();