优化用户名显示方式

This commit is contained in:
CN-JS-HuiBai
2026-04-04 13:38:26 +08:00
parent 624a327246
commit b8bd8a8d76
2 changed files with 3 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ document.addEventListener('DOMContentLoaded', () => {
const transcodeBtn = document.getElementById('transcode-btn');
const stopTranscodeBtn = document.getElementById('stop-transcode-btn');
const themeSelector = document.getElementById('theme-selector');
const currentUsername = document.getElementById('current-username');
const videoListHeader = document.getElementById('video-list-header');
const logoutBtn = document.getElementById('logout-btn');
const topBannerTitle = document.getElementById('top-banner-title');
const playBtn = document.getElementById('play-btn');
@@ -587,7 +587,7 @@ document.addEventListener('DOMContentLoaded', () => {
localStorage.setItem('sessionId', sessionId);
if (username) {
localStorage.setItem('username', username);
if (currentUsername) currentUsername.textContent = username;
if (videoListHeader) videoListHeader.textContent = `${username} Available Videos`;
}
};