diff --git a/openflexure_microscope/api/static/src/components/appContent.vue b/openflexure_microscope/api/static/src/components/appContent.vue
index 51e3cd0f..c5e0919d 100644
--- a/openflexure_microscope/api/static/src/components/appContent.vue
+++ b/openflexure_microscope/api/static/src/components/appContent.vue
@@ -16,63 +16,27 @@
id="switcher-left"
class="uk-flex uk-flex-column uk-padding-remove uk-width-auto uk-height-1-1 uk-text-center"
>
-
- visibility
-
-
-
- photo_library
-
-
-
-
-
- gamepad
-
-
- camera_alt
-
-
-
-
-
+
+
+
- settings_overscan
+ {{ item.icon }}
+
+
+
-
- settings
-
-
-
- assignment_late
-
-
-
- info
-
+
+
+
+
+ {{ item.icon }}
+
+
+
+
@@ -127,66 +78,14 @@
class="uk-padding-remove uk-height-1-1 uk-width-expand"
>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
@@ -252,14 +162,69 @@ export default {
return {
plugins: [],
currentTab: "view",
- unwatchStoreFunction: null
+ unwatchStoreFunction: null,
+ topTabs: [
+ {
+ id: "view",
+ icon: "visibility",
+ component: viewContent
+ },
+ {
+ id: "gallery",
+ icon: "photo_library",
+ component: galleryContent,
+ divide: true // Add a divider after this tab icon
+ },
+ {
+ id: "navigate",
+ icon: "gamepad",
+ component: navigateContent
+ },
+ {
+ id: "capture",
+ icon: "camera_alt",
+ component: captureContent,
+ divide: true // Add a divider after this tab icon
+ }
+ ],
+ bottomTabs: [
+ {
+ id: "settings",
+ icon: "settings",
+ component: settingsContent,
+ class: "uk-margin-auto-top"
+ },
+ {
+ id: "logging",
+ icon: "assignment_late",
+ component: loggingContent
+ },
+ {
+ id: "about",
+ icon: "info",
+ component: aboutContent
+ }
+ ]
};
},
computed: {
+ enabledTopTabs: function() {
+ var enabledTabs = this.topTabs;
+ if (this.$store.state.globalSettings.IHIEnabled) {
+ enabledTabs.push({
+ id: "slidescan",
+ icon: "settings_overscan",
+ component: slideScanContent
+ });
+ }
+ return enabledTabs;
+ },
+
pluginsUri: function() {
return `${this.$store.getters.baseUri}/api/v2/extensions`;
},
+
pluginsGuiList: function() {
// List of plugin GUIs, obtained from this.plugins values
console.log("Recalculating plugins");
@@ -271,15 +236,21 @@ export default {
}
return pluginGuis;
},
+
tabOrder: function() {
- // TODO: There must be a better way to do this, somehow reading the order of the HTML elements?
- var ind = ["view", "gallery", "navigate", "capture", "settings"];
+ var ind = [];
+ for (const tab of this.enabledTopTabs) {
+ ind.push(tab.id);
+ }
for (const plugin of this.pluginsGuiList) {
ind.push(plugin.id);
}
- ind.push("about");
+ for (const tab of this.bottomTabs) {
+ ind.push(tab.id);
+ }
return ind;
},
+
currentTabIndex: function() {
return this.tabOrder.indexOf(this.currentTab);
}