aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-30 22:53:00 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-30 22:53:00 +0200
commitcebe64d6c14256a31247987bcafbce1a2bf2d8ba (patch)
tree5edef11a705493fd94042f4758c05746eea86f0a /packages/meshbay-hub
parent2d6c276734fd19f80edf84cdb95f91a929df6365 (diff)
downloadmeshbay-cebe64d6c14256a31247987bcafbce1a2bf2d8ba.tar.gz
fix(ui): use toggle switches in Settings page, trim verbose hints
Replace checkboxes with the existing toggle-switch component for notifications, keep-screen-on, and allow-public-groups. Remove the "Notifications" label from per-group lines, and shorten the music-keep-screen-on and hub-URL hints. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/app.js13
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/de.js4
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/en.js4
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/es.js4
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js4
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/it.js4
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js4
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js4
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js4
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js4
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js4
11 files changed, 28 insertions, 25 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/app.js b/packages/meshbay-hub/src/meshbay_hub/static/app.js
index 268ec3f..611cb27 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/app.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/app.js
@@ -1733,9 +1733,10 @@ function SettingsPage({ user, theme, onThemeChange, groups, onPrefsChange }) {
<h3 class="settings-heading">${t('settings.groups')}</h3>
<div class="settings-row">
<span class="settings-label">${t('settings.notif_global_disable')}</span>
- <label class="settings-value" style="cursor:pointer">
+ <label class="toggle-switch">
<input type="checkbox" checked=${globalMute}
onChange=${toggleGlobalMute} />
+ <span class="toggle-switch-track"><span class="toggle-switch-thumb"></span></span>
</label>
</div>
${!globalMute && html`
@@ -1743,10 +1744,10 @@ function SettingsPage({ user, theme, onThemeChange, groups, onPrefsChange }) {
${groups.map(g => html`
<div class="settings-row" key=${g.id}>
<span class="settings-label">${g.name}</span>
- <label class="settings-value" style="cursor:pointer">
+ <label class="toggle-switch">
<input type="checkbox" checked=${!muted[g.id]}
onChange=${() => toggleMute(g.id)} />
- ${' '}${t('settings.notifications')}
+ <span class="toggle-switch-track"><span class="toggle-switch-thumb"></span></span>
</label>
</div>
`)}
@@ -1766,9 +1767,10 @@ function SettingsPage({ user, theme, onThemeChange, groups, onPrefsChange }) {
<p class="settings-hint">${t('settings.default_tab_hint')}</p>
<div class="settings-row">
<span class="settings-label">${t('settings.music_keep_screen_on')}</span>
- <label class="settings-value" style="cursor:pointer">
+ <label class="toggle-switch">
<input type="checkbox" checked=${keepScreenOnAudio}
onChange=${toggleKeepScreenOnAudio} />
+ <span class="toggle-switch-track"><span class="toggle-switch-thumb"></span></span>
</label>
</div>
<p class="settings-hint">${t('settings.music_keep_screen_on_hint')}</p>
@@ -2005,10 +2007,11 @@ function AdminPage({ token, role }) {
<h3 class="settings-heading">${t('admin.general_groups_heading')}</h3>
<div class="settings-row">
<span class="settings-label">${t('admin.allow_public_groups_label')}</span>
- <label class="settings-value" style="cursor:pointer">
+ <label class="toggle-switch ${!canEditSettings || settingsSaving ? 'toggle-switch-disabled' : ''}">
<input type="checkbox" checked=${settings.allow_public_groups}
disabled=${!canEditSettings || settingsSaving}
onChange=${e => saveSettings({ allow_public_groups: e.target.checked })} />
+ <span class="toggle-switch-track"><span class="toggle-switch-thumb"></span></span>
</label>
</div>
<p class="settings-hint">${t('admin.allow_public_groups_hint')}</p>
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js
index b61d93c..8284527 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js
@@ -269,7 +269,7 @@ export default {
'settings.default_tab': 'Default tab',
'settings.default_tab_hint': 'Which tab opens first when you enter a group.',
'settings.music_keep_screen_on': 'Keep screen on during music playback',
- 'settings.music_keep_screen_on_hint': 'Prevents the phone from locking on its own while a track is playing. Off by default — most people want their phone to lock normally while listening, like Spotify or Deezer.',
+ 'settings.music_keep_screen_on_hint': 'Prevents the phone from locking on its own while a track is playing.',
'settings.node_pins': 'Node-Identitäten',
'settings.node_pins_hint': 'Der Identitätsschlüssel jedes Nodes wird bei der ersten '
+ 'Verbindung gemerkt. Ändert er sich, wird die Verbindung abgelehnt — das ist nur '
@@ -308,7 +308,7 @@ export default {
'settings.keys_heading': 'Keys on this device',
'settings.hub_heading': 'Hub',
'settings.hub_current': 'Currently',
- 'settings.hub_hint': 'Changing this signs you out and restarts the window. A hub on your own machine is usually http, not https.',
+ 'settings.hub_hint': 'Changing this signs you out and restarts the window.',
'settings.hub_change': 'Change',
'settings.keys_where': 'Protected by',
'settings.keys_unprotected': 'No system keyring is running, so your keys are encrypted with a key that is not a secret. Anyone who can read this machine’s files can read them. Start a keyring, or treat this device as untrusted.',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js
index 851911c..b98e032 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js
@@ -266,7 +266,7 @@ export default {
'settings.default_tab': 'Default tab',
'settings.default_tab_hint': 'Which tab opens first when you enter a group.',
'settings.music_keep_screen_on': 'Keep screen on during music playback',
- 'settings.music_keep_screen_on_hint': 'Prevents the phone from locking on its own while a track is playing. Off by default — most people want their phone to lock normally while listening, like Spotify or Deezer.',
+ 'settings.music_keep_screen_on_hint': 'Prevents the phone from locking on its own while a track is playing.',
'settings.node_pins': 'Node identities',
'settings.node_pins_hint': "Each node's identity key is remembered the first time you connect. If it changes, the connection is refused — that is expected only when an operator reinstalls a node. Verify with them before clearing.",
'settings.node_pins_count': {
@@ -300,7 +300,7 @@ export default {
'settings.keys_heading': 'Keys on this device',
'settings.hub_heading': 'Hub',
'settings.hub_current': 'Currently',
- 'settings.hub_hint': 'Changing this signs you out and restarts the window. A hub on your own machine is usually http, not https.',
+ 'settings.hub_hint': 'Changing this signs you out and restarts the window.',
'settings.hub_change': 'Change',
'settings.keys_where': 'Protected by',
'settings.keys_unprotected': 'No system keyring is running, so your keys are encrypted with a key that is not a secret. Anyone who can read this machine’s files can read them. Start a keyring, or treat this device as untrusted.',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js
index 84af4cd..d0a7004 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js
@@ -267,7 +267,7 @@ export default {
'settings.default_tab': 'Default tab',
'settings.default_tab_hint': 'Which tab opens first when you enter a group.',
'settings.music_keep_screen_on': 'Keep screen on during music playback',
- 'settings.music_keep_screen_on_hint': 'Prevents the phone from locking on its own while a track is playing. Off by default — most people want their phone to lock normally while listening, like Spotify or Deezer.',
+ 'settings.music_keep_screen_on_hint': 'Prevents the phone from locking on its own while a track is playing.',
'settings.node_pins': 'Identidades de los nodes',
'settings.node_pins_hint': 'La clave de identidad de cada node se memoriza la '
+ 'primera vez que se conecta. Si cambia, la conexión se rechaza — algo esperable '
@@ -304,7 +304,7 @@ export default {
'settings.keys_heading': 'Keys on this device',
'settings.hub_heading': 'Hub',
'settings.hub_current': 'Currently',
- 'settings.hub_hint': 'Changing this signs you out and restarts the window. A hub on your own machine is usually http, not https.',
+ 'settings.hub_hint': 'Changing this signs you out and restarts the window.',
'settings.hub_change': 'Change',
'settings.keys_where': 'Protected by',
'settings.keys_unprotected': 'No system keyring is running, so your keys are encrypted with a key that is not a secret. Anyone who can read this machine’s files can read them. Start a keyring, or treat this device as untrusted.',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js
index e540b4b..1e7bb79 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js
@@ -268,7 +268,7 @@ export default {
'settings.default_tab': 'Onglet par défaut',
'settings.default_tab_hint': 'L\'onglet qui s\'ouvre en premier quand vous entrez dans un groupe.',
'settings.music_keep_screen_on': 'Garder l\'écran allumé pendant l\'écoute',
- 'settings.music_keep_screen_on_hint': 'Empêche le téléphone de se verrouiller automatiquement pendant qu\'un morceau joue. Désactivé par défaut — la plupart des gens préfèrent que leur téléphone se verrouille normalement pendant l\'écoute, comme sur Spotify ou Deezer.',
+ 'settings.music_keep_screen_on_hint': 'Empêche le téléphone de se verrouiller automatiquement pendant qu\'un morceau joue.',
'settings.node_pins': 'Identités des nodes',
'settings.node_pins_hint': "La clé d'identité de chaque node est mémorisée lors de "
+ 'la première connexion. Si elle change, la connexion est refusée — ce qui n’est '
@@ -307,7 +307,7 @@ export default {
'settings.keys_heading': 'Clés sur cet appareil',
'settings.hub_heading': 'Hub',
'settings.hub_current': 'Actuellement',
- 'settings.hub_hint': 'Changer cette adresse vous déconnecte et redémarre la fenêtre. Un hub sur votre propre machine est généralement en http, pas en https.',
+ 'settings.hub_hint': 'Changer cette adresse vous déconnecte et redémarre la fenêtre.',
'settings.hub_change': 'Changer',
'settings.keys_where': 'Protégées par',
'settings.keys_unprotected': 'Aucun trousseau système ne fonctionne : vos clés sont chiffrées avec une clé qui n’est pas secrète. Quiconque peut lire les fichiers de cette machine peut les lire. Démarrez un trousseau, ou considérez cet appareil comme non fiable.',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js
index b009460..eec9b65 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js
@@ -268,7 +268,7 @@ export default {
'settings.default_tab': 'Default tab',
'settings.default_tab_hint': 'Which tab opens first when you enter a group.',
'settings.music_keep_screen_on': 'Keep screen on during music playback',
- 'settings.music_keep_screen_on_hint': 'Prevents the phone from locking on its own while a track is playing. Off by default — most people want their phone to lock normally while listening, like Spotify or Deezer.',
+ 'settings.music_keep_screen_on_hint': 'Prevents the phone from locking on its own while a track is playing.',
'settings.node_pins': 'Identità dei node',
'settings.node_pins_hint': "La chiave d'identità di ogni node viene memorizzata alla "
+ 'prima connessione. Se cambia, la connessione viene rifiutata — cosa che ci si '
@@ -307,7 +307,7 @@ export default {
'settings.keys_heading': 'Keys on this device',
'settings.hub_heading': 'Hub',
'settings.hub_current': 'Currently',
- 'settings.hub_hint': 'Changing this signs you out and restarts the window. A hub on your own machine is usually http, not https.',
+ 'settings.hub_hint': 'Changing this signs you out and restarts the window.',
'settings.hub_change': 'Change',
'settings.keys_where': 'Protected by',
'settings.keys_unprotected': 'No system keyring is running, so your keys are encrypted with a key that is not a secret. Anyone who can read this machine’s files can read them. Start a keyring, or treat this device as untrusted.',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js
index 9b317a1..023ca33 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js
@@ -265,7 +265,7 @@ export default {
'settings.default_tab': 'Default tab',
'settings.default_tab_hint': 'Which tab opens first when you enter a group.',
'settings.music_keep_screen_on': 'Keep screen on during music playback',
- 'settings.music_keep_screen_on_hint': 'Prevents the phone from locking on its own while a track is playing. Off by default — most people want their phone to lock normally while listening, like Spotify or Deezer.',
+ 'settings.music_keep_screen_on_hint': 'Prevents the phone from locking on its own while a track is playing.',
'settings.node_pins': 'node の識別情報',
'settings.node_pins_hint': '各 node の識別鍵は、最初に接続したときに記憶されます。'
+ 'それが変わった場合、接続は拒否されます。これが起こるのは、運営者が node を'
@@ -301,7 +301,7 @@ export default {
'settings.keys_heading': 'Keys on this device',
'settings.hub_heading': 'Hub',
'settings.hub_current': 'Currently',
- 'settings.hub_hint': 'Changing this signs you out and restarts the window. A hub on your own machine is usually http, not https.',
+ 'settings.hub_hint': 'Changing this signs you out and restarts the window.',
'settings.hub_change': 'Change',
'settings.keys_where': 'Protected by',
'settings.keys_unprotected': 'No system keyring is running, so your keys are encrypted with a key that is not a secret. Anyone who can read this machine’s files can read them. Start a keyring, or treat this device as untrusted.',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js
index 0436a31..7ee35ab 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js
@@ -269,7 +269,7 @@ export default {
'settings.default_tab': 'Default tab',
'settings.default_tab_hint': 'Which tab opens first when you enter a group.',
'settings.music_keep_screen_on': 'Keep screen on during music playback',
- 'settings.music_keep_screen_on_hint': 'Prevents the phone from locking on its own while a track is playing. Off by default — most people want their phone to lock normally while listening, like Spotify or Deezer.',
+ 'settings.music_keep_screen_on_hint': 'Prevents the phone from locking on its own while a track is playing.',
'settings.node_pins': 'Node-identiteiten',
'settings.node_pins_hint': 'De identiteitssleutel van elke node wordt bij de eerste '
+ 'verbinding onthouden. Verandert die, dan wordt de verbinding geweigerd — wat '
@@ -308,7 +308,7 @@ export default {
'settings.keys_heading': 'Keys on this device',
'settings.hub_heading': 'Hub',
'settings.hub_current': 'Currently',
- 'settings.hub_hint': 'Changing this signs you out and restarts the window. A hub on your own machine is usually http, not https.',
+ 'settings.hub_hint': 'Changing this signs you out and restarts the window.',
'settings.hub_change': 'Change',
'settings.keys_where': 'Protected by',
'settings.keys_unprotected': 'No system keyring is running, so your keys are encrypted with a key that is not a secret. Anyone who can read this machine’s files can read them. Start a keyring, or treat this device as untrusted.',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js
index 391b8cd..c221cea 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js
@@ -280,7 +280,7 @@ export default {
'settings.default_tab': 'Default tab',
'settings.default_tab_hint': 'Which tab opens first when you enter a group.',
'settings.music_keep_screen_on': 'Keep screen on during music playback',
- 'settings.music_keep_screen_on_hint': 'Prevents the phone from locking on its own while a track is playing. Off by default — most people want their phone to lock normally while listening, like Spotify or Deezer.',
+ 'settings.music_keep_screen_on_hint': 'Prevents the phone from locking on its own while a track is playing.',
'settings.node_pins': 'Tożsamości nodes',
'settings.node_pins_hint': 'Klucz tożsamości każdego node jest zapamiętywany przy '
+ 'pierwszym połączeniu. Jeśli się zmieni, połączenie zostanie odrzucone — czego '
@@ -320,7 +320,7 @@ export default {
'settings.keys_heading': 'Keys on this device',
'settings.hub_heading': 'Hub',
'settings.hub_current': 'Currently',
- 'settings.hub_hint': 'Changing this signs you out and restarts the window. A hub on your own machine is usually http, not https.',
+ 'settings.hub_hint': 'Changing this signs you out and restarts the window.',
'settings.hub_change': 'Change',
'settings.keys_where': 'Protected by',
'settings.keys_unprotected': 'No system keyring is running, so your keys are encrypted with a key that is not a secret. Anyone who can read this machine’s files can read them. Start a keyring, or treat this device as untrusted.',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js
index 16e0559..89c76c2 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js
@@ -269,7 +269,7 @@ export default {
'settings.default_tab': 'Default tab',
'settings.default_tab_hint': 'Which tab opens first when you enter a group.',
'settings.music_keep_screen_on': 'Keep screen on during music playback',
- 'settings.music_keep_screen_on_hint': 'Prevents the phone from locking on its own while a track is playing. Off by default — most people want their phone to lock normally while listening, like Spotify or Deezer.',
+ 'settings.music_keep_screen_on_hint': 'Prevents the phone from locking on its own while a track is playing.',
'settings.node_pins': 'Identidades dos nodes',
'settings.node_pins_hint': 'A chave de identidade de cada node é memorizada na '
+ 'primeira conexão. Se ela mudar, a conexão é recusada — o que só é esperado '
@@ -306,7 +306,7 @@ export default {
'settings.keys_heading': 'Keys on this device',
'settings.hub_heading': 'Hub',
'settings.hub_current': 'Currently',
- 'settings.hub_hint': 'Changing this signs you out and restarts the window. A hub on your own machine is usually http, not https.',
+ 'settings.hub_hint': 'Changing this signs you out and restarts the window.',
'settings.hub_change': 'Change',
'settings.keys_where': 'Protected by',
'settings.keys_unprotected': 'No system keyring is running, so your keys are encrypted with a key that is not a secret. Anyone who can read this machine’s files can read them. Start a keyring, or treat this device as untrusted.',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js
index edd9edc..105ad43 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js
@@ -261,7 +261,7 @@ export default {
'settings.default_tab': 'Default tab',
'settings.default_tab_hint': 'Which tab opens first when you enter a group.',
'settings.music_keep_screen_on': 'Keep screen on during music playback',
- 'settings.music_keep_screen_on_hint': 'Prevents the phone from locking on its own while a track is playing. Off by default — most people want their phone to lock normally while listening, like Spotify or Deezer.',
+ 'settings.music_keep_screen_on_hint': 'Prevents the phone from locking on its own while a track is playing.',
'settings.node_pins': 'node 身份',
'settings.node_pins_hint': '每个 node 的身份密钥都会在您首次连接时被记住。'
+ '如果它发生变化,连接会被拒绝——只有当运营者重装 node 时才应如此。'
@@ -295,7 +295,7 @@ export default {
'settings.keys_heading': 'Keys on this device',
'settings.hub_heading': 'Hub',
'settings.hub_current': 'Currently',
- 'settings.hub_hint': 'Changing this signs you out and restarts the window. A hub on your own machine is usually http, not https.',
+ 'settings.hub_hint': 'Changing this signs you out and restarts the window.',
'settings.hub_change': 'Change',
'settings.keys_where': 'Protected by',
'settings.keys_unprotected': 'No system keyring is running, so your keys are encrypted with a key that is not a secret. Anyone who can read this machine’s files can read them. Start a keyring, or treat this device as untrusted.',