Fixed a focus problem. Added Hall to hall name so there is some context when the hall name appears.

This commit is contained in:
Storm Dragon
2026-05-22 14:46:02 -04:00
parent 2e28dff2d1
commit 08b484f106
3 changed files with 12 additions and 9 deletions
@@ -2,7 +2,7 @@
# shellcheck shell=bash disable=SC2034,SC2154 # shellcheck shell=bash disable=SC2034,SC2154
pkgname=skald-git pkgname=skald-git
pkgver=0.0.0.r1529.g486ce7f pkgver=0.0.0.r1530.g2e28dff
pkgrel=1 pkgrel=1
pkgdesc='Audio-only hall-based conferencing server' pkgdesc='Audio-only hall-based conferencing server'
arch=('x86_64' 'aarch64') arch=('x86_64' 'aarch64')
+1 -1
View File
@@ -31,7 +31,7 @@
<button class="collapse" aria-label="Toggle left panel" aria-expanded="true" aria-controls="left-sidebar" id="sidebarCollapse"> <button class="collapse" aria-label="Toggle left panel" aria-expanded="true" aria-controls="left-sidebar" id="sidebarCollapse">
<i class="fas fa-align-left" aria-hidden="true"></i> <i class="fas fa-align-left" aria-hidden="true"></i>
</button> </button>
<h1 id="title" class="header-title">Skald</h1> <h1 id="title" class="header-title" tabindex="-1">Skald</h1>
</div> </div>
<ul class="nav-menu"> <ul class="nav-menu">
+10 -7
View File
@@ -451,6 +451,8 @@ function setConnected(connected) {
setLeftPanelExpanded(true); setLeftPanelExpanded(true);
updateChatResizerValueFromLayout(); updateChatResizerValueFromLayout();
displayUsername(); displayUsername();
if(!alreadyConnected)
focusTitle();
window.onresize = function(e) { window.onresize = function(e) {
scheduleReconsiderDownRate(); scheduleReconsiderDownRate();
} }
@@ -2004,14 +2006,15 @@ function capitalise(s) {
* @param {string} title * @param {string} title
*/ */
function setTitle(title) { function setTitle(title) {
function set(title) { let displayTitle = title ? `Hall: ${title}` : 'Skald';
document.title = title; document.title = displayTitle;
document.getElementById('title').textContent = title; document.getElementById('title').textContent = displayTitle;
} }
function focusTitle() {
let title = document.getElementById('title');
if(title) if(title)
set(title); title.focus({preventScroll: true});
else
set('Skald');
} }
/** /**