feat: add visible active room id and server labels to popup

This commit is contained in:
Timo
2026-04-22 11:14:36 +02:00
parent e410fc48c8
commit 80f3801b79
2 changed files with 15 additions and 0 deletions
+7
View File
@@ -39,6 +39,8 @@ const elements = {
retryBtn: document.getElementById('retryBtn'),
sectionJoin: document.getElementById('section-join'),
sectionActive: document.getElementById('section-active'),
activeRoomId: document.getElementById('activeRoomId'),
activeServer: document.getElementById('activeServer'),
playBtn: document.getElementById('playBtn'),
pauseBtn: document.getElementById('pauseBtn')
};
@@ -99,6 +101,11 @@ function updateUI(roomId, password, useCustomServer = false, serverUrl = '') {
const encodedUrl = encodeURIComponent(serverUrl || '');
const invite = `${OFFICIAL_LANDING_PAGE_URL}/join.html#join:${roomId}:${password}:${serverFlag}:${encodedUrl}`;
elements.inviteLink.value = invite;
if (elements.activeRoomId) elements.activeRoomId.textContent = roomId;
if (elements.activeServer) {
elements.activeServer.textContent = useCustomServer ? (serverUrl || 'Custom Server') : 'Official Server';
elements.activeServer.title = useCustomServer ? (serverUrl || '') : 'sync.shik3i.net';
}
}
}