Merge pull request #839 from daslyfe/file_import

Sound Import from local file system
This commit is contained in:
Felix Roos 2023-12-12 19:08:31 +01:00 committed by GitHub
commit daf9187572
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 201 additions and 2 deletions

View file

@ -33,6 +33,7 @@ import { code2hash, hash2code } from './helpers.mjs';
import { isTauri } from '../tauri.mjs';
import { useWidgets } from '@strudel.cycles/react/src/hooks/useWidgets.mjs';
import { writeText } from '@tauri-apps/api/clipboard';
import { registerSamplesFromDB, userSamplesDBConfig } from './idbutils.mjs';
const { latestCode } = settingsMap.get();
@ -194,6 +195,8 @@ export function Repl({ embedded = false }) {
setCode(randomTune);
msg = `A random code snippet named "${name}" has been loaded!`;
}
//registers samples that have been saved to the index DB
registerSamplesFromDB(userSamplesDBConfig);
logger(`Welcome to Strudel! ${msg} Press play or hit ctrl+enter to run it!`, 'highlight');
setPending(false);
});