fix
This commit is contained in:
parent
93c40af76a
commit
964c6c60f3
11
app.js
11
app.js
@ -255,7 +255,7 @@ function addConnection(topicHex) {
|
||||
|
||||
if (window.activePeer === peer) {
|
||||
window.activePeer = null;
|
||||
connectionTitle.textContent = 'Disconnected';
|
||||
// connectionTitle.textContent = 'Disconnected';
|
||||
dashboard.classList.add('hidden');
|
||||
containerList.innerHTML = '';
|
||||
}
|
||||
@ -265,6 +265,15 @@ function addConnection(topicHex) {
|
||||
switchConnection(topicId);
|
||||
}
|
||||
});
|
||||
|
||||
// Automatically collapse the sidebar when a new connection is added
|
||||
const sidebar = document.getElementById('sidebar');
|
||||
const collapseSidebarBtn = document.getElementById('collapse-sidebar-btn');
|
||||
if (!sidebar.classList.contains('collapsed')) {
|
||||
sidebar.classList.add('collapsed');
|
||||
collapseSidebarBtn.innerHTML = '>';
|
||||
console.log('[DEBUG] Sidebar auto-collapsed after adding a new connection');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user