refactor edit and edges

This commit is contained in:
2024-03-25 21:26:21 +02:00
parent e74e1e7956
commit 02224eb580
83 changed files with 3569 additions and 818 deletions
+2 -20
View File
@@ -1,7 +1,5 @@
<script>
export let schema;
export let isCreateMode;
export let active = "";
let tabs = schema.groups?.map((group) => {
@@ -11,28 +9,12 @@
label: "Main",
name: "",
};
let graphTab = {
label: "Graph",
name: "_graph",
};
if (isCreateMode) {
tabs = [mainTab, ...tabs];
} else {
tabs = [mainTab, ...tabs, graphTab];
}
function showGraph(e) {
e.preventDefault();
active = "_graph";
}
tabs = [mainTab, ...tabs];
function changeTab(e, tabName) {
e.preventDefault();
if (tabName == "_graph") {
showGraph(e);
} else {
active = tabName;
}
active = tabName;
}
</script>