Split up setting to be a bit neater

This commit is contained in:
Jack Kingsman
2026-04-27 13:14:43 -07:00
parent 7f1bb92e92
commit 84aa352be3
12 changed files with 657 additions and 563 deletions
+3 -2
View File
@@ -149,11 +149,12 @@ vi.mock('../components/SettingsModal', () => ({
SettingsModal: ({ desktopSection }: { desktopSection?: string }) => (
<div data-testid="settings-modal-section">{desktopSection ?? 'none'}</div>
),
SETTINGS_SECTION_ORDER: ['radio', 'local', 'database', 'bot'],
SETTINGS_SECTION_ORDER: ['radio', 'local', 'radio-app', 'database', 'bot'],
SETTINGS_SECTION_LABELS: {
radio: '📻 Radio',
local: '🖥️ Local Configuration',
database: '🗄️ Database & Messaging',
'radio-app': '🗄️ Radio-App Management',
database: '🗄️ Database',
bot: '🤖 Bot',
},
}));
+3 -2
View File
@@ -92,11 +92,12 @@ vi.mock('../components/SettingsModal', () => ({
SettingsModal: ({ desktopSection }: { desktopSection?: string }) => (
<div data-testid="settings-modal-section">{desktopSection ?? 'none'}</div>
),
SETTINGS_SECTION_ORDER: ['radio', 'local', 'database', 'bot'],
SETTINGS_SECTION_ORDER: ['radio', 'local', 'radio-app', 'database', 'bot'],
SETTINGS_SECTION_LABELS: {
radio: 'Radio',
local: 'Local Configuration',
database: 'Database & Messaging',
'radio-app': 'Radio-App Management',
database: 'Database',
bot: 'Bot',
},
}));
+5 -5
View File
@@ -178,7 +178,7 @@ function setMatchMedia(matches: boolean) {
}
function openRadioSection() {
const radioToggle = screen.getByRole('button', { name: /Radio/i });
const radioToggle = screen.getByRole('button', { name: /^Radio$/i });
fireEvent.click(radioToggle);
}
@@ -251,7 +251,7 @@ describe('SettingsModal', () => {
it('shows radio-unavailable message when config is null', () => {
renderModal({ config: null });
const radioToggle = screen.getByRole('button', { name: /Radio/i });
const radioToggle = screen.getByRole('button', { name: /^Radio$/i });
expect(radioToggle).not.toBeDisabled();
fireEvent.click(radioToggle);
@@ -500,7 +500,7 @@ describe('SettingsModal', () => {
renderModal({
externalSidebarNav: true,
desktopSection: 'database',
desktopSection: 'radio-app',
onSaveAppSettings,
});
@@ -807,7 +807,7 @@ describe('SettingsModal', () => {
renderModal({
externalSidebarNav: true,
desktopSection: 'database',
desktopSection: 'radio-app',
onSaveAppSettings,
});
@@ -832,7 +832,7 @@ describe('SettingsModal', () => {
renderModal({
externalSidebarNav: true,
desktopSection: 'database',
desktopSection: 'radio-app',
appSettings: {
...baseSettings,
tracked_telemetry_repeaters: [directKey],