diff --git a/static/scripts/components/editor/script.ts b/static/scripts/components/editor/script.ts index 169a93f..70c6842 100644 --- a/static/scripts/components/editor/script.ts +++ b/static/scripts/components/editor/script.ts @@ -53,7 +53,6 @@ class EditorTab extends HTMLElement { } customElements.define("file-editor-tab", EditorTab); - class Editor extends HTMLElement { private editor: AceAjax.Editor; private tabEl: HTMLDivElement; @@ -129,6 +128,14 @@ class Editor extends HTMLElement { }); } + removeFile(name: string) { + //TODO + } + + renameFile(name: string, newName: string) { + + } + setCurrent(name: string) { this.editor.setSession(this.sessions[name]); this.tabEl.querySelectorAll("file-editor-tab").forEach(el => { @@ -154,7 +161,6 @@ class Editor extends HTMLElement { return tab; } - #createNewTab() { this.addFile(`untitled${Object.keys(this.sessions).filter(s => s.startsWith("untitled")).length + 1}`, "", false); } diff --git a/templates/stack/new-form.html b/templates/stack/new-form.html index fb58376..ac94d72 100644 --- a/templates/stack/new-form.html +++ b/templates/stack/new-form.html @@ -35,7 +35,7 @@ /* Enforce check pre-submit */ const form = document.getElementById("editor-form"); - add_check(form, editor); + add_check(form, editor.editor); {% endblock %} \ No newline at end of file