Beginning work on sample import
This commit is contained in:
14
index.html
14
index.html
@ -377,6 +377,20 @@
|
||||
</svg>
|
||||
<span class="text-selection_foreground">Destroy universes</span>
|
||||
</button>
|
||||
<!-- Upload audio samples -->
|
||||
<p class="font-bold lg:text-xl text-sm ml-4 pb-2 pt-2 underline underline-offset-4 text-selection_background">Audio samples</p>
|
||||
|
||||
<label class="bg-brightwhite font-bold lg:py-4 lg:px-2 px-1 py-2 rounded-lg inline-flex items-center mx-4 text-selection_background">
|
||||
<svg class="rotate-180 fill-current w-4 h-6 mr-2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M13 8V2H7v6H2l8 8 8-8h-5zM0 18h20v2H0v-2z"/></svg>
|
||||
<input id="upload-samples" type="file" class="hidden" multiple>
|
||||
<span class="text-selection_foreground">Import samples</span>
|
||||
</label>
|
||||
<!--
|
||||
<input id="upload-samples" class="bg-brightwhite font-bold lg:py-4 lg:px-2 px-1 py-2 rounded-lg inline-flex items-center mx-4 text-selection_background">
|
||||
<svg class="rotate-180 fill-current w-4 h-6 mr-2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M13 8V2H7v6H2l8 8 8-8h-5zM0 18h20v2H0v-2z"/></svg>
|
||||
<span class="text-selection_foreground">Upload audio samples</span>
|
||||
</input>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -18,6 +18,7 @@ export const singleElements = {
|
||||
load_universe_button: "load-universe-button",
|
||||
download_universe_button: "download-universes",
|
||||
upload_universe_button: "upload-universes",
|
||||
upload_samples_button: "upload-samples",
|
||||
destroy_universes_button: "destroy-universes",
|
||||
documentation_button: "doc-button-1",
|
||||
eval_button: "eval-button-1",
|
||||
|
||||
0
src/IO/SampleLoading.ts
Normal file
0
src/IO/SampleLoading.ts
Normal file
@ -159,6 +159,10 @@ export const installInterfaceLogic = (app: Editor) => {
|
||||
);
|
||||
});
|
||||
|
||||
app.interface.upload_samples_button.addEventListener("click", () => {
|
||||
console.log("Uploading audio samples!")
|
||||
});
|
||||
|
||||
app.interface.upload_universe_button.addEventListener("click", () => {
|
||||
const fileInput = document.createElement("input");
|
||||
fileInput.type = "file";
|
||||
|
||||
Reference in New Issue
Block a user