feat(preferences): add xpDisplayMini preference and update action
Add the xpDisplayMini checkbox to user display preferences, regenerate types, and accept it in updatePreferences. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
parent
a0c4eaabcf
commit
b581670e72
3 changed files with 39 additions and 30 deletions
|
|
@ -207,6 +207,7 @@ export async function updatePreferences(input: {
|
|||
leadOrActual: "lead" | "actual";
|
||||
discordEnabled: boolean;
|
||||
discordMutedTypes: string[];
|
||||
xpDisplayMini: boolean;
|
||||
}): Promise<ActionResult> {
|
||||
try {
|
||||
const { payload, user } = await authenticate();
|
||||
|
|
@ -229,6 +230,7 @@ export async function updatePreferences(input: {
|
|||
showCallsign: input.showCallsign,
|
||||
showVersionOverlay: input.showVersionOverlay,
|
||||
leadOrActual: input.leadOrActual,
|
||||
xpDisplayMini: input.xpDisplayMini,
|
||||
},
|
||||
discord: {
|
||||
enabled: input.discordEnabled,
|
||||
|
|
|
|||
|
|
@ -295,6 +295,12 @@ export const Users: CollectionConfig = {
|
|||
type: "checkbox",
|
||||
defaultValue: true,
|
||||
},
|
||||
{
|
||||
name: "xpDisplayMini",
|
||||
label: "Use mini mode for XP display",
|
||||
type: "checkbox",
|
||||
defaultValue: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1313,6 +1313,7 @@ export interface User {
|
|||
showCallsign?: boolean | null;
|
||||
leadOrActual?: ('lead' | 'actual') | null;
|
||||
showVersionOverlay?: boolean | null;
|
||||
xpDisplayMini?: boolean | null;
|
||||
};
|
||||
discord?: {
|
||||
enabled?: boolean | null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue