hotfix: bring back loading code + fill in default pattern later

This commit is contained in:
Felix Roos
2025-06-12 09:51:04 +02:00
parent ef3b9a68e3
commit 694a22af85
+5 -4
View File
@@ -59,7 +59,7 @@ async function getModule(name) {
return modules.find((m) => m.packageName === name);
}
const initialCode = `$: s("[bd <hh oh>]*2").bank("tr909").dec(.4)`;
const initialCode = `// LOADING`;
export function useReplContext() {
const { isSyncEnabled, audioEngineTarget } = useSettings();
@@ -135,9 +135,10 @@ export function useReplContext() {
code = latestCode;
msg = `Your last session has been loaded!`;
} else {
const { code: randomTune, name } = await getRandomTune();
code = randomTune;
msg = `A random code snippet named "${name}" has been loaded!`;
/* const { code: randomTune, name } = await getRandomTune();
code = randomTune; */
code = '$: s("[bd <hh oh>]*2").bank("tr909").dec(.4)';
msg = `Default code has been loaded`;
}
editor.setCode(code);
setDocumentTitle(code);