feat: Allow for adjustable alignment of main content on certain pages for content moderators (#7034)

* Add type safety and validation for moderation settings

* Add ability for moderators to adjust page layout for discover, project, moderation pages

Primarily for changes to have more tooling present without overlapping important info
This commit is contained in:
Blodhgarm
2026-08-07 16:45:37 +00:00
committed by GitHub
parent 6ed044a54b
commit a71a361e0f
7 changed files with 129 additions and 27 deletions
+20 -7
View File
@@ -1,8 +1,8 @@
import type { EnumSettingDefinition, ToggleSettingDefinition } from '../types/settings.ts'
import { setting } from '../types/settings.ts'
const settings = {
General: {
ChecklistPosition: {
ChecklistPosition: setting.asEnum({
type: 'enum',
id: 'checklist-position',
title: 'Checklist Position',
@@ -12,21 +12,34 @@ const settings = {
{ value: 'right', label: 'Right' },
],
default: 'right',
} as EnumSettingDefinition,
ProjectKeybinds: {
}),
ProjectKeybinds: setting.asToggle({
type: 'toggle',
id: 'project-keybinds',
title: 'Enable Project Keybinds',
description: 'Weather certain keybinds should work without the checklist visible.',
default: false,
} as ToggleSettingDefinition,
PrivateMessageHighlight: {
}),
PrivateMessageHighlight: setting.asToggle({
type: 'toggle',
id: 'private-message-highlight',
title: 'Highlight Private Messages',
description: 'Whether private messages should be highlighted in the chat.',
default: true,
} as ToggleSettingDefinition,
}),
AdjustPageAlignment: setting.asEnum({
type: 'enum',
id: 'adjust-page-alignment',
title: 'Adjust Page Alignment',
description:
'Whether the main page elements should be centered or offset opposite to the Checklist Position.',
entries: [
{ value: 'never', label: 'Never' },
{ value: 'checklist-present', label: 'Checklist Needed' },
{ value: 'always', label: 'Always' },
],
default: 'never',
}),
},
} as const