Make frontend request tab list on initialization

This commit is contained in:
Keavon Chambers
2021-07-15 00:07:21 -07:00
parent 2e579a3ac6
commit 0b44a17a5d
3 changed files with 16 additions and 1 deletions

View File

@@ -51,6 +51,8 @@ import LayoutRow from "../layout/LayoutRow.vue";
import LayoutCol from "../layout/LayoutCol.vue";
import Panel from "./Panel.vue";
const wasm = import("@/../wasm/pkg");
export default defineComponent({
components: {
LayoutRow,
@@ -69,12 +71,14 @@ export default defineComponent({
const documentData = responseData as SetActiveDocument;
if (documentData) this.activeDocument = documentData.document_index;
});
(async () => (await wasm).get_open_documents_list())();
},
data() {
return {
activeDocument: 0,
documents: ["Untitled Document"], // TODO: start as an empty list
documents: [] as Array<string>,
};
},
});