wire up settings and theming

This commit is contained in:
Felix Roos 2023-12-25 20:52:00 +01:00
parent 7dac1e275d
commit e19f799046
5 changed files with 80 additions and 10 deletions

View file

@ -186,6 +186,10 @@ export class StrudelMirror {
this.root.style.backgroundColor = 'var(--background)';
cmEditor.style.backgroundColor = 'transparent';
}
const settings = codemirrorSettings.get();
this.setFontSize(settings.fontSize);
this.setFontFamily(settings.fontFamily);
// stop this repl when another repl is started
this.onStartRepl = (e) => {
if (e.detail !== this.id) {

View file

@ -62,10 +62,6 @@ export function repl({
};
setTime(() => scheduler.now()); // TODO: refactor?
const evaluate = async (code, autostart = true, shouldHush = true) => {
if (code === state.activeCode && state.started) {
logger('[eval] skip: not dirty')
return;
}
if (!code) {
throw new Error('no code to evaluate');
}