Enter main app when modals have been closed
This commit is contained in:
parent
1bfde1fb14
commit
83aefe87c3
2 changed files with 20 additions and 14 deletions
|
|
@ -8,6 +8,7 @@
|
||||||
<calibrationModal
|
<calibrationModal
|
||||||
ref="calibrationModal"
|
ref="calibrationModal"
|
||||||
:available-plugins="plugins"
|
:available-plugins="plugins"
|
||||||
|
@onClose="enterApp()"
|
||||||
></calibrationModal>
|
></calibrationModal>
|
||||||
<!-- Vertical tab bar -->
|
<!-- Vertical tab bar -->
|
||||||
<div
|
<div
|
||||||
|
|
@ -226,17 +227,12 @@ export default {
|
||||||
return getters.ready;
|
return getters.ready;
|
||||||
},
|
},
|
||||||
ready => {
|
ready => {
|
||||||
// Update plugins
|
|
||||||
this.updatePlugins().then(() => {
|
|
||||||
// Start initialisation modals
|
|
||||||
this.startModals();
|
|
||||||
});
|
|
||||||
|
|
||||||
if (ready) {
|
if (ready) {
|
||||||
console.log("Left panel now ready");
|
// Update plugins
|
||||||
} else {
|
this.updatePlugins().then(() => {
|
||||||
console.log("Right panel now disabled");
|
// Start initialisation modals
|
||||||
this.currentTab = "connect";
|
this.startModals();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
@ -247,10 +243,6 @@ export default {
|
||||||
this.$root.$on("globalSwitchTab", tabID => {
|
this.$root.$on("globalSwitchTab", tabID => {
|
||||||
this.currentTab = tabID;
|
this.currentTab = tabID;
|
||||||
});
|
});
|
||||||
// A global signal listener to the first primary tab
|
|
||||||
this.$root.$on("globalSwitchTabPrimary", () => {
|
|
||||||
this.currentTab = "view";
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|
@ -281,6 +273,11 @@ export default {
|
||||||
},
|
},
|
||||||
startModals: function() {
|
startModals: function() {
|
||||||
this.$refs["calibrationModal"].show();
|
this.$refs["calibrationModal"].show();
|
||||||
|
},
|
||||||
|
enterApp: function() {
|
||||||
|
// Stuff to do once connected and all init modals are finished
|
||||||
|
console.log("Entering main application");
|
||||||
|
this.currentTab = "view";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -231,6 +231,10 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.$refs["calibrationModalEl"].addEventListener("hidden", this.onHide);
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
show: function() {
|
show: function() {
|
||||||
// Get current settings
|
// Get current settings
|
||||||
|
|
@ -258,6 +262,11 @@ export default {
|
||||||
this.ready = false;
|
this.ready = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onHide: function() {
|
||||||
|
console.log("UIKit modal hidden");
|
||||||
|
this.$emit("onClose");
|
||||||
|
},
|
||||||
|
|
||||||
getSettings: function() {
|
getSettings: function() {
|
||||||
return axios
|
return axios
|
||||||
.get(this.settingsUri)
|
.get(this.settingsUri)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue