fix(desktop): the Sync section reappears in its own tab
Renaming the label from "Sync (WebDAV)" to "Sync (WebDAV or Gitea)" hid the whole section from the Sync & Backup tab: applySettingsTab maps sections to tabs BY THEIR VISIBLE LABEL TEXT, so the miss fell through to 'general'. The section was not lost - it moved to the General tab, which is worse than missing, because it is nowhere you would look for it. The map is updated, and the coupling is now written down where the map lives: these keys are the displayed strings, word for word, and rewording one means touching both sides. Checked every key against the labels in index.html; the only sections without an entry are "Getting started" and "Startup & tray", which belong in General anyway. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -6732,13 +6732,20 @@ function closeSettings() {
|
|||||||
|
|
||||||
// Settings tabs — each section (.slideover-field, keyed by its label text)
|
// Settings tabs — each section (.slideover-field, keyed by its label text)
|
||||||
// belongs to one tab; the active tab shows its sections, hides the rest.
|
// belongs to one tab; the active tab shows its sections, hides the rest.
|
||||||
|
//
|
||||||
|
// LES CLES SONT LE TEXTE AFFICHE, mot pour mot. Renommer l'intitulé d'une
|
||||||
|
// section sans toucher cette table la fait retomber sur 'general' : elle
|
||||||
|
// n'est pas perdue, elle apparait sous le mauvais onglet - donc introuvable
|
||||||
|
// pour qui la cherche au bon endroit. C'est arrive en renommant « Sync
|
||||||
|
// (WebDAV) ». Toute retouche d'un de ces libellés se fait des deux cotes.
|
||||||
const SETTINGS_TAB_OF = {
|
const SETTINGS_TAB_OF = {
|
||||||
'Appearance': 'general',
|
'Appearance': 'general',
|
||||||
'Security': 'security', 'Clipboard privacy': 'security',
|
'Security': 'security', 'Clipboard privacy': 'security',
|
||||||
'Autofill': 'autofill',
|
'Autofill': 'autofill',
|
||||||
'Account': 'account',
|
'Account': 'account',
|
||||||
'PIN unlock': 'account', 'Quick unlock': 'account', 'Recovery key': 'account',
|
'PIN unlock': 'account', 'Quick unlock': 'account', 'Recovery key': 'account',
|
||||||
'Export': 'sync', 'Sync (WebDAV)': 'sync', 'Auto-backup': 'sync', 'Import': 'sync',
|
'Export': 'sync', 'Sync (WebDAV or Gitea)': 'sync',
|
||||||
|
'Auto-backup': 'sync', 'Import': 'sync',
|
||||||
};
|
};
|
||||||
let settingsActiveTab = 'general';
|
let settingsActiveTab = 'general';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user