mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 13:26:01 +01:00
chore(nx): move all monorepo-style in subfolder for processing
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
const registeredClasses = new Set<string>();
|
||||
|
||||
function createClassForColor(color: string | null) {
|
||||
if (!color?.trim()) {
|
||||
return "";
|
||||
}
|
||||
|
||||
const normalizedColorName = color.replace(/[^a-z0-9]/gi, "");
|
||||
|
||||
if (!normalizedColorName.trim()) {
|
||||
return "";
|
||||
}
|
||||
|
||||
const className = `color-${normalizedColorName}`;
|
||||
|
||||
if (!registeredClasses.has(className)) {
|
||||
// make the active fancytree selector more specific than the normal color setting
|
||||
$("head").append(`<style>.${className}, span.fancytree-active.${className} { color: ${color} !important; }</style>`);
|
||||
|
||||
registeredClasses.add(className);
|
||||
}
|
||||
|
||||
return className;
|
||||
}
|
||||
|
||||
export default {
|
||||
createClassForColor
|
||||
};
|
||||
Reference in New Issue
Block a user