Compare commits
No commits in common. "7c99193e25571f2602c9f5a70444d62e6c537319" and "4489319d7055127c07cfc29d9ac32942b7d8fa02" have entirely different histories.
7c99193e25
...
4489319d70
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "twitch-vod-manager",
|
||||
"version": "4.6.77",
|
||||
"version": "4.6.76",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "twitch-vod-manager",
|
||||
"version": "4.6.77",
|
||||
"version": "4.6.76",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"axios": "^1.6.0",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "twitch-vod-manager",
|
||||
"version": "4.6.77",
|
||||
"version": "4.6.76",
|
||||
"description": "Twitch VOD Manager - Download Twitch VODs easily",
|
||||
"main": "dist/main.js",
|
||||
"author": "xRangerDE",
|
||||
|
||||
@ -194,14 +194,9 @@ function changeLanguage(lang: string): void {
|
||||
const activeTabId = document.querySelector('.tab-content.active')?.id || 'vodsTab';
|
||||
const activeTab = activeTabId.replace('Tab', '');
|
||||
if (activeTab === 'vods' && currentStreamer) {
|
||||
const setTitle = (window as unknown as { setPageTitle?: (text: string) => void }).setPageTitle;
|
||||
if (typeof setTitle === 'function') setTitle(currentStreamer);
|
||||
else byId('pageTitle').textContent = currentStreamer;
|
||||
byId('pageTitle').textContent = currentStreamer;
|
||||
} else {
|
||||
const setTitle = (window as unknown as { setPageTitle?: (text: string) => void }).setPageTitle;
|
||||
const text = (UI_TEXT.tabs as Record<string, string>)[activeTab] || UI_TEXT.appName;
|
||||
if (typeof setTitle === 'function') setTitle(text);
|
||||
else byId('pageTitle').textContent = text;
|
||||
byId('pageTitle').textContent = (UI_TEXT.tabs as Record<string, string>)[activeTab] || UI_TEXT.appName;
|
||||
}
|
||||
|
||||
void refreshRuntimeMetrics();
|
||||
|
||||
@ -751,9 +751,7 @@ async function selectStreamer(name: string, forceRefresh = false): Promise<void>
|
||||
const savedY = vodScrollPositions[name];
|
||||
pendingScrollRestore = (typeof savedY === 'number' && savedY > 0) ? { streamer: name, y: savedY } : null;
|
||||
renderStreamers();
|
||||
const setTitle = (window as unknown as { setPageTitle?: (text: string) => void }).setPageTitle;
|
||||
if (typeof setTitle === 'function') setTitle(name);
|
||||
else byId('pageTitle').textContent = name;
|
||||
byId('pageTitle').textContent = name;
|
||||
|
||||
// Kick off the profile header load in parallel with VOD fetching.
|
||||
// It's a separate request stream and not strictly needed for the VOD
|
||||
|
||||
@ -20,7 +20,6 @@ async function init(): Promise<void> {
|
||||
|
||||
byId('versionText').textContent = `v${version}`;
|
||||
byId('versionInfo').textContent = `Version: v${version}`;
|
||||
appVersion = version;
|
||||
document.title = `${UI_TEXT.appName} v${version}`;
|
||||
|
||||
byId<HTMLInputElement>('clientId').value = config.client_id ?? '';
|
||||
@ -637,24 +636,6 @@ async function updateStatsBar(): Promise<void> {
|
||||
|
||||
let toastHideTimer: number | null = null;
|
||||
let queueSyncTimer: number | null = null;
|
||||
let appVersion = '';
|
||||
|
||||
// Single source of truth for what the user is looking at — keeps the
|
||||
// visible H1, the document title (which drives the OS task bar / Alt+Tab
|
||||
// label), and the app version pill in sync. Previously document.title was
|
||||
// stamped once at boot, so the OS task bar always read "Twitch VOD
|
||||
// Manager v4.6.76" no matter what tab or streamer was active.
|
||||
(window as unknown as { setPageTitle: (text: string) => void }).setPageTitle = setPageTitle;
|
||||
|
||||
function setPageTitle(text: string): void {
|
||||
const titleEl = document.getElementById('pageTitle');
|
||||
if (titleEl) titleEl.textContent = text;
|
||||
const appName = UI_TEXT.appName;
|
||||
const versionSuffix = appVersion ? ` v${appVersion}` : '';
|
||||
document.title = text && text !== appName
|
||||
? `${text} - ${appName}${versionSuffix}`
|
||||
: `${appName}${versionSuffix}`;
|
||||
}
|
||||
let queueSyncInFlight = false;
|
||||
let lastQueueActivityAt = Date.now();
|
||||
|
||||
@ -869,10 +850,9 @@ function showTab(tab: string): void {
|
||||
|
||||
// Only show the streamer name on the VODs tab — otherwise the title would
|
||||
// mismatch the tab content (e.g. "streamer X" while on Settings)
|
||||
const pageTitleText = (tab === 'vods' && currentStreamer)
|
||||
byId('pageTitle').textContent = (tab === 'vods' && currentStreamer)
|
||||
? currentStreamer
|
||||
: (titles[tab] || UI_TEXT.appName);
|
||||
setPageTitle(pageTitleText);
|
||||
|
||||
persistActiveTab(tab);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user