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";
|
leadOrActual: "lead" | "actual";
|
||||||
discordEnabled: boolean;
|
discordEnabled: boolean;
|
||||||
discordMutedTypes: string[];
|
discordMutedTypes: string[];
|
||||||
|
xpDisplayMini: boolean;
|
||||||
}): Promise<ActionResult> {
|
}): Promise<ActionResult> {
|
||||||
try {
|
try {
|
||||||
const { payload, user } = await authenticate();
|
const { payload, user } = await authenticate();
|
||||||
|
|
@ -229,6 +230,7 @@ export async function updatePreferences(input: {
|
||||||
showCallsign: input.showCallsign,
|
showCallsign: input.showCallsign,
|
||||||
showVersionOverlay: input.showVersionOverlay,
|
showVersionOverlay: input.showVersionOverlay,
|
||||||
leadOrActual: input.leadOrActual,
|
leadOrActual: input.leadOrActual,
|
||||||
|
xpDisplayMini: input.xpDisplayMini,
|
||||||
},
|
},
|
||||||
discord: {
|
discord: {
|
||||||
enabled: input.discordEnabled,
|
enabled: input.discordEnabled,
|
||||||
|
|
|
||||||
|
|
@ -295,6 +295,12 @@ export const Users: CollectionConfig = {
|
||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
defaultValue: true,
|
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;
|
showCallsign?: boolean | null;
|
||||||
leadOrActual?: ('lead' | 'actual') | null;
|
leadOrActual?: ('lead' | 'actual') | null;
|
||||||
showVersionOverlay?: boolean | null;
|
showVersionOverlay?: boolean | null;
|
||||||
|
xpDisplayMini?: boolean | null;
|
||||||
};
|
};
|
||||||
discord?: {
|
discord?: {
|
||||||
enabled?: boolean | null;
|
enabled?: boolean | null;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue