1.0.33
This commit is contained in:
85 files changed
+10118
-1046
No files matched your search
@@ -45,7 +45,7 @@ export const PUT: RequestHandler = async ({ request, cookies }) => {
|
||||
const validTerminalFontIds = monospaceFonts.map(f => f.id);
|
||||
const validFontSizes = ['xsmall', 'small', 'normal', 'medium', 'large', 'xlarge'];
|
||||
|
||||
const updates: { lightTheme?: string; darkTheme?: string; font?: string; fontSize?: string; gridFontSize?: string; terminalFont?: string; editorFont?: string } = {};
|
||||
const updates: { lightTheme?: string; darkTheme?: string; font?: string; fontSize?: string; gridFontSize?: string; terminalFont?: string; editorFont?: string; animateIcons?: boolean } = {};
|
||||
|
||||
if (data.lightTheme !== undefined) {
|
||||
if (!validLightThemeIds.includes(data.lightTheme)) {
|
||||
@@ -96,6 +96,13 @@ export const PUT: RequestHandler = async ({ request, cookies }) => {
|
||||
updates.editorFont = data.editorFont;
|
||||
}
|
||||
|
||||
if (data.animateIcons !== undefined) {
|
||||
if (typeof data.animateIcons !== 'boolean') {
|
||||
return json({ error: 'Invalid animateIcons' }, { status: 400 });
|
||||
}
|
||||
updates.animateIcons = data.animateIcons;
|
||||
}
|
||||
|
||||
await setUserThemePreferences(currentUser.id, updates);
|
||||
|
||||
// Return updated preferences
|
||||
|
||||
Reference in new issue
Block a user