Files
webmail/lib/settings-tabs.ts
T
Linus Rath 62ab5cbb76 feat: add a Files on this computer settings page to the desktop app
The settings nav test drew every page but recovery; the new page waits for the desktop app's sync engine like recovery waits for its probe, so the test leaves it out too and a new test checks it shows while the engine runs.
2026-11-04 16:40:03 +01:00

36 lines
1.3 KiB
TypeScript

import type { SettingsSearchTab } from '@/lib/settings-search';
/**
* Every settings page id, in no particular order. A `/settings/<tab>` link
* that names none of these (and no plugin page) falls back to the stored tab.
*/
export const SETTINGS_TAB_IDS: readonly SettingsSearchTab[] = [
'account', 'general', 'notifications', 'appearance', 'accessibility',
'message_list', 'reading', 'composing', 'vacation', 'filters', 'organize',
'security', 'sharing', 'recovery', 'calendar', 'contacts', 'files',
'files_sync', 'addons', 'offline', 'privacy', 'backup', 'about',
];
// Map legacy tab IDs to current ones; runs once on read of localStorage and
// for every deep link, so old bookmarks, connector links and sidebar gears
// land on the page that now holds the setting. The pre-paint boot script
// uses it too, to pick the settings skeleton's active row.
export const LEGACY_TAB_MAP: Record<string, SettingsSearchTab> = {
email: 'reading',
advanced: 'backup',
layout: 'appearance',
themes: 'appearance',
content_senders: 'privacy',
identities: 'account',
language: 'general',
protocol_handlers: 'general',
templates: 'composing',
folders: 'organize',
keywords: 'organize',
downloads: 'reading',
sidebar_apps: 'addons',
plugins: 'addons',
about_data: 'backup',
debug: 'backup',
};