refactor(server): remove dependency on codemirror project

This commit is contained in:
Elian Doran
2025-05-12 18:15:19 +03:00
parent 36009307d1
commit ac49c0f59b
5 changed files with 10 additions and 24 deletions

View File

@@ -8,7 +8,6 @@ import type { Request } from "express";
import { changeLanguage, getLocales } from "../../services/i18n.js";
import { listSyntaxHighlightingThemes } from "../../services/code_block_theme.js";
import type { OptionNames } from "@triliumnext/commons";
import { ColorThemes } from "@triliumnext/codemirror";
// options allowed to be updated directly in the Options dialog
const ALLOWED_OPTIONS = new Set<OptionNames>([
@@ -195,13 +194,6 @@ function getSyntaxHighlightingThemes() {
return listSyntaxHighlightingThemes();
}
function getCodeNoteThemes() {
return ColorThemes.map((theme) => ({
val: `default:${theme.id}`,
title: theme.name
}));
}
function getSupportedLocales() {
return getLocales();
}
@@ -219,6 +211,5 @@ export default {
updateOptions,
getUserThemes,
getSyntaxHighlightingThemes,
getCodeNoteThemes,
getSupportedLocales
};