redesign bots and app to highlight legacy approaches

This commit is contained in:
kulikov0 committed 2026-05-10 16:28:34 +02:00
1 parent 6adeb9ced3
commit 91920118ff
5 files changed
+43 -26

No files matched your search

+6 -6
View File
@@ -26,16 +26,16 @@ export function createMainKeyboard() {
one_time: false,
buttons: [
[
{ action: { type: 'text', label: '📞 VK DC', payload: JSON.stringify({ cmd: BotCommand.VK, mode: 'dc' }) } },
{ action: { type: 'text', label: '📹 VK Video', payload: JSON.stringify({ cmd: BotCommand.VK, mode: 'video' }) } },
{ action: { type: 'text', label: '👻 VK Headless', payload: JSON.stringify({ cmd: BotCommand.VK, mode: 'headless' }) } },
{ action: { type: 'text', label: '🟦 VK', payload: JSON.stringify({ cmd: BotCommand.VK, mode: 'headless' }) } },
{ action: { type: 'text', label: 'DC (legacy)', payload: JSON.stringify({ cmd: BotCommand.VK, mode: 'dc' }) } },
{ action: { type: 'text', label: 'Video (legacy)', payload: JSON.stringify({ cmd: BotCommand.VK, mode: 'video' }) } },
],
[
{ action: { type: 'text', label: '📹 TM Video', payload: JSON.stringify({ cmd: BotCommand.TM, mode: 'video' }) } },
{ action: { type: 'text', label: '👻 TM Headless', payload: JSON.stringify({ cmd: BotCommand.TM, mode: 'headless' }) } },
{ action: { type: 'text', label: '🟥 Telemost', payload: JSON.stringify({ cmd: BotCommand.TM, mode: 'headless' }) } },
{ action: { type: 'text', label: 'Video (legacy)', payload: JSON.stringify({ cmd: BotCommand.TM, mode: 'video' }) } },
],
[
{ action: { type: 'text', label: '👻 WB Headless', payload: JSON.stringify({ cmd: BotCommand.WB, mode: 'headless' }) } },
{ action: { type: 'text', label: '🟪 WBStream', payload: JSON.stringify({ cmd: BotCommand.WB, mode: 'headless' }) } },
],
[
{ action: { type: 'text', label: '📋 Active Tabs', payload: JSON.stringify({ cmd: BotCommand.List }) } },
+3 -3
View File
@@ -52,9 +52,9 @@ export function renderContent(tm: RendererTabManager): void {
} else if (activeTab.headless) {
toolbar.style.display = 'none';
headlessInfo.style.display = 'block';
let title = 'Headless VK';
if (activeTab.platform === Platform.Telemost) title = 'Headless Telemost';
else if (activeTab.platform === Platform.WBStream) title = 'Headless WB Stream';
let title = 'VK';
if (activeTab.platform === Platform.Telemost) title = 'Telemost';
else if (activeTab.platform === Platform.WBStream) title = 'WBStream';
document.getElementById('headlessTitle')!.textContent = title;
document.getElementById('headlessStatus')!.textContent = activeTab.headlessStatus || 'Starting...';
const callInfo = activeTab.callInfo;
+13 -8
View File
@@ -43,15 +43,15 @@ export class RendererTabManager {
switch (platform) {
case Platform.Telemost:
tab.mode = TunnelMode.HeadlessTelemost;
tab.name = 'Headless TM';
if (!tab.isBot) tab.name = 'Telemost';
break;
case Platform.WBStream:
tab.mode = TunnelMode.HeadlessWBStream;
tab.name = 'Headless WB';
if (!tab.isBot) tab.name = 'WBStream';
break;
default:
tab.mode = TunnelMode.HeadlessVK;
tab.name = 'Headless VK';
if (!tab.isBot) tab.name = 'VK';
}
tab.headless = true;
tab.platform = platform;
@@ -66,9 +66,14 @@ export class RendererTabManager {
createBotTab(data: BotTabData): void {
if (!this.tabs[data.tabId]) {
const isHeadless = data.mode === TunnelMode.HeadlessVK || data.mode === TunnelMode.HeadlessTelemost;
const platformLabel = data.platform === Platform.Telemost ? 'TM' : 'VK';
const botName = isHeadless ? `Bot-Headless-${platformLabel}` : `Bot-${data.platform === Platform.Telemost ? 'Telemost' : 'VK'}`;
const isHeadless =
data.mode === TunnelMode.HeadlessVK ||
data.mode === TunnelMode.HeadlessTelemost ||
data.mode === TunnelMode.HeadlessWBStream;
let platformName = 'VK';
if (data.platform === Platform.Telemost) platformName = 'Telemost';
else if (data.platform === Platform.WBStream) platformName = 'WBStream';
const botName = isHeadless ? `Bot-${platformName}` : `Bot-${platformName} (legacy)`;
this.tabs[data.tabId] = {
wv: null,
url: '',
@@ -120,8 +125,8 @@ export class RendererTabManager {
getTabLabel(tab: RendererTab): string {
if (tab.name) return tab.name;
if (tab.url) {
if (tab.url.includes('vk.com')) return 'VK';
if (tab.url.includes('telemost')) return 'Telemost';
if (tab.url.includes('vk.com')) return 'VK (legacy)';
if (tab.url.includes('telemost')) return 'Telemost (legacy)';
}
return 'New';
}