mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 04:45:19 +00:00
enh: mermaid dark theme
This commit is contained in:
parent
1e8abea753
commit
d79d3f1352
1 changed files with 16 additions and 0 deletions
|
|
@ -241,6 +241,22 @@ __builtins__.input = input`);
|
|||
debounceTimeout = setTimeout(highlightCode, 10);
|
||||
}
|
||||
}
|
||||
|
||||
onMount(async () => {
|
||||
if (document.documentElement.classList.contains('dark')) {
|
||||
mermaid.initialize({
|
||||
startOnLoad: true,
|
||||
theme: 'dark',
|
||||
securityLevel: 'loose'
|
||||
});
|
||||
} else {
|
||||
mermaid.initialize({
|
||||
startOnLoad: true,
|
||||
theme: 'default',
|
||||
securityLevel: 'loose'
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="my-2" dir="ltr">
|
||||
|
|
|
|||
Loading…
Reference in a new issue