feat: get web working properly

This commit is contained in:
Jonathan Kelley committed 2022-11-30 17:21:10 -05:00
1 parent 3c19def550
commit 18d6b1ad6f
26 files changed
+674 -1422

No files matched your search

+10 -3
View File
@@ -265,7 +265,14 @@ export class Interpreter {
SaveTemplate(name, m) {
this.templates[name] = this.stack.splice(this.stack.length - m);
}
CreateStaticText(text) {
this.CreateTextNode(text);
}
CreateTextPlaceholder() {
this.CreateRawText("placeholder");
}
handleEdit(edit) {
console.log(edit);
switch (edit.type) {
case "AppendChildren":
this.AppendChildren(edit.m);
@@ -283,13 +290,13 @@ export class Interpreter {
this.CreatePlaceholder(edit.id);
break;
case "CreateStaticText":
this.CreateTextNode(edit.value);
this.CreateStaticText(edit.value)
break;
case "CreateStaticPlaceholder":
this.CreateStaticPlaceholder();
break;
case "CreateTextPlaceholder":
this.CreateRawText("placeholder");
this.CreateTextPlaceholder();
break;
case "CreateStaticText":
this.CreateRawText(edit.value);
@@ -301,7 +308,7 @@ export class Interpreter {
this.HydrateText(edit.path, edit.value, edit.id);
break;
case "LoadTemplate":
this.LoadTemplate(edit.name, edit.index);
this.LoadTemplate(edit.name, edit.index, edit.id);
break;
case "SaveTemplate":
this.SaveTemplate(edit.name, edit.m);