feat: new UI and build process
Some checks are pending
Gitea djledda.de/arne-drums/pipeline/head Build started...

This commit is contained in:
Daniel Ledda
2021-08-29 16:21:26 +02:00
parent f2bcc81330
commit ec4587bed5
30 changed files with 769 additions and 12596 deletions

View File

@@ -1,5 +1,6 @@
import App from "./ui/App.svelte";
import Store from "./Store";
import "./main.css";
import BeatGroup from "./BeatGroup";
import RootView from "./ui/Root/RootView";
const defaultSettings = {
bars: 10,
@@ -9,30 +10,33 @@ const defaultSettings = {
},
};
const store = new Store({
beats: [
{
name: "LF",
...defaultSettings,
},
{
name: "LH",
...defaultSettings,
},
{
name: "RH",
...defaultSettings,
},
{
name: "RF",
...defaultSettings,
}
]
const mainBeatGroup = new BeatGroup();
mainBeatGroup.addBeat({
name: "LF"
});
mainBeatGroup.addBeat({
name: "LH"
});
mainBeatGroup.addBeat({
name: "RH"
});
mainBeatGroup.addBeat({
name: "RF"
});
const app = new App({
target: document.body,
props: {store},
});
const appNode = document.querySelector("#app");
export default app;
if (appNode) {
const appRoot = new RootView({
parent: appNode as HTMLDivElement,
title: "Drum Slayer",
mainBeatGroup: mainBeatGroup,
});
//@ts-ignore
window.appRoot = appRoot;
appRoot.render();
console.log("OK!");
} else {
console.error("FUCK!");
}