From ae60f8c84235fd14dcccc11c4ad3a031d996d686 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 31 Oct 2024 20:54:33 +0200 Subject: [PATCH] client: Group color themes by dark/light --- .../options/appearance/code_block.js | 14 +++--- src/services/code_block_theme.ts | 45 +++++++++++++++---- 2 files changed, 45 insertions(+), 14 deletions(-) diff --git a/src/public/app/widgets/type_widgets/options/appearance/code_block.js b/src/public/app/widgets/type_widgets/options/appearance/code_block.js index 021e4619d..b816ef0b2 100644 --- a/src/public/app/widgets/type_widgets/options/appearance/code_block.js +++ b/src/public/app/widgets/type_widgets/options/appearance/code_block.js @@ -84,13 +84,17 @@ export default class CodeBlockOptions extends OptionsWidget { } async optionsLoaded(options) { - const themes = await server.get("options/codeblock-themes"); + const themeGroups = await server.get("options/codeblock-themes"); this.$themeSelect.empty(); - for (const theme of themes) { - this.$themeSelect.append($("").attr("label", key); + for (const theme of themes) { + $group.append($("