fix: pass correct editor to pre-submit check
Some checks failed
continuous-integration/drone Build is passing
continuous-integration/drone/push Build is failing

This commit is contained in:
Hamcha 2024-03-30 18:43:38 +01:00
parent 6e24ffb499
commit 6a77270e5b
2 changed files with 9 additions and 3 deletions

View file

@ -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<EditorTab>("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);
}

View file

@ -35,7 +35,7 @@
/* Enforce check pre-submit */
const form = document.getElementById("editor-form");
add_check(form, editor);
add_check(form, editor.editor);
</script>
{% endblock %}