Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,5 @@ Editable settings:
`SETTING_ORDER` in `src/settingsView.ts`. The editable section is a pulled-out
view of the original full settings order, not an appended allowlist.
- `minDataPeers` is editable when the active Core reports it as writable.
- QDN relaying is unconditional whenever QDN is enabled in Qortium, so the
inherited `relayModeEnabled` switch is intentionally not editable.
3 changes: 3 additions & 0 deletions src/settingsEditor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
getTransportSelectionValue,
normalizeEditableSettingValue,
patchHasRestartRequiredSettings,
PHASE_1_EDITABLE_SETTING_KEYS,
parseGigabytesToBytes,
parseHoursToMilliseconds,
} from './settingsEditor';
Expand Down Expand Up @@ -130,6 +131,8 @@ describe('settings editor helpers', () => {
expect(canEditSetting('storagePolicy', metadata, true, true)).toBe(false);
expect(canEditSetting('qdnEnabled', metadata, true, false)).toBe(false);
expect(canEditSetting('apiLoggingEnabled', metadata, true, false)).toBe(false);
expect(canEditSetting('relayModeEnabled', metadata, true, false)).toBe(false);
expect(PHASE_1_EDITABLE_SETTING_KEYS).not.toContain('relayModeEnabled');
});

it('detects restart-required settings in a patch', () => {
Expand Down
2 changes: 0 additions & 2 deletions src/settingsEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export const PHASE_1_EDITABLE_SETTING_KEYS = [
'maxStorageCapacity',
'publicDataEnabled',
'privateDataEnabled',
'relayModeEnabled',
'qdnPushOnPublishEnabled',
'apiDocumentationEnabled',
'chatMessageRetentionPeriod',
Expand Down Expand Up @@ -90,7 +89,6 @@ const BOOLEAN_DEFAULTS: Record<BooleanEditableSettingKey, boolean> = {
publicDataEnabled: true,
qdnEnabled: true,
qdnPushOnPublishEnabled: true,
relayModeEnabled: true,
};

export function isPhase1EditableSetting(key: string): key is Phase1EditableSettingKey {
Expand Down
1 change: 0 additions & 1 deletion src/settingsView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ const SETTING_ORDER: Record<string, SettingOrder> = {
publicDataEnabled: { group: 2, priority: 20 },
privateDataEnabled: { group: 2, priority: 21 },
directDataRetrievalEnabled: { group: 2, priority: 30 },
relayModeEnabled: { group: 2, priority: 31 },
gatewayEnabled: { group: 2, priority: 40 },
gatewayLoopbackEnabled: { group: 2, priority: 41 },
gatewayLoggingEnabled: { group: 2, priority: 42 },
Expand Down