Merge branch 'improved-settings-layout' into 'master'

Improved settings layout

See merge request openflexure/openflexure-microscope-jsclient!48
This commit is contained in:
Joel Collins 2020-04-23 16:58:20 +00:00
commit d940722851
8 changed files with 187 additions and 62 deletions

41
package-lock.json generated
View file

@ -8876,8 +8876,7 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
@ -8898,14 +8897,12 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
@ -8920,20 +8917,17 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@ -9050,8 +9044,7 @@
"inherits": { "inherits": {
"version": "2.0.4", "version": "2.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
@ -9063,7 +9056,6 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
@ -9078,7 +9070,6 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
@ -9086,14 +9077,12 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.9.0", "version": "2.9.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
@ -9112,7 +9101,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
@ -9202,8 +9190,7 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
@ -9215,7 +9202,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
@ -9301,8 +9287,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
@ -9338,7 +9323,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
@ -9358,7 +9342,6 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
@ -9402,14 +9385,12 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.1.1", "version": "3.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
} }
} }
}, },

View file

@ -365,6 +365,11 @@ html {
padding: 0; padding: 0;
} }
.section-content {
padding: 0;
height: 100%;
}
// Style tour // Style tour
.v-tour__target--highlighted { .v-tour__target--highlighted {
box-shadow: 0px 40px 200px 30px rgba(0, 0, 0, 0.5), box-shadow: 0px 40px 200px 30px rgba(0, 0, 0, 0.5),

View file

@ -113,7 +113,7 @@
:require-connection="false" :require-connection="false"
:current-tab="currentTab" :current-tab="currentTab"
> >
<settingsContent /> <settingsContent class="section-content" />
</tabContent> </tabContent>
<tabContent <tabContent

View file

@ -4,7 +4,7 @@
:hidden="currentTab != tabID" :hidden="currentTab != tabID"
class="uk-width-expand uk-height-1-1" class="uk-width-expand uk-height-1-1"
> >
<div class="section-content"><slot></slot></div> <slot></slot>
</div> </div>
</template> </template>
@ -37,9 +37,4 @@ export default {
line-height: 20px; line-height: 20px;
cursor: default; cursor: default;
} }
.section-content {
padding: 0;
height: 100%;
}
</style> </style>

View file

@ -7,7 +7,7 @@
@click="setThisTab" @click="setThisTab"
> >
<slot></slot> <slot></slot>
<div class="tabtitle"> <div v-if="showTitle" class="tabtitle">
{{ computedTitle }} {{ computedTitle }}
</div> </div>
</a> </a>
@ -27,6 +27,16 @@ export default {
required: false, required: false,
default: undefined default: undefined
}, },
showTitle: {
type: Boolean,
required: false,
default: true
},
showTooltip: {
type: Boolean,
required: false,
default: true
},
currentTab: { currentTab: {
type: String, type: String,
required: true required: true
@ -52,7 +62,11 @@ export default {
}, },
tooltipOptions: function() { tooltipOptions: function() {
return `pos: right; title: ${this.computedTitle}; delay: 500`; if (this.showTooltip) {
return `pos: right; title: ${this.computedTitle}; delay: 500`;
} else {
return false;
}
}, },
classObject: function() { classObject: function() {

View file

@ -1,9 +1,6 @@
<template> <template>
<!-- Grid managing tab content --> <!-- Grid managing tab content -->
<div uk-grid class="uk-height-1-1 uk-margin-remove uk-padding-remove"> <div uk-grid class="uk-height-1-1 uk-margin-remove uk-padding-remove">
<div class="control-component">
<paneStatus />
</div>
<div class="view-component uk-width-expand uk-padding-small"> <div class="view-component uk-width-expand uk-padding-small">
<settingsDisplay /> <settingsDisplay />
</div> </div>
@ -11,14 +8,12 @@
</template> </template>
<script> <script>
import paneStatus from "../controlComponents/paneStatus";
import settingsDisplay from "../viewComponents/settingsDisplay.vue"; import settingsDisplay from "../viewComponents/settingsDisplay.vue";
export default { export default {
name: "NavigateContent", name: "NavigateContent",
components: { components: {
paneStatus,
settingsDisplay settingsDisplay
} }
}; };

View file

@ -79,10 +79,10 @@
<script> <script>
import axios from "axios"; import axios from "axios";
import progressBar from "../genericComponents/progressBar"; import progressBar from "../../genericComponents/progressBar";
export default { export default {
name: "PaneStatus", name: "StatusPane",
components: { components: {
progressBar progressBar

View file

@ -1,53 +1,178 @@
<template> <template>
<div id="settingsDisplay" class="uk-padding uk-height-1-1"> <!-- Grid managing tab content -->
<div class="uk-height-1-1 uk-child-width-expand@m" uk-grid> <div uk-grid class="uk-height-1-1 uk-margin-remove uk-padding-remove">
<div class="uk-padding-remove"> <div class="settings-nav">
<ul class="uk-nav uk-nav-default">
<li class="uk-nav-header">Application settings</li>
<li>
<tabIcon
id="settings-status-icon"
tab-i-d="status"
:show-title="false"
:show-tooltip="false"
:require-connection="false"
:current-tab="currentTab"
@set-tab="setTab"
>
Status
</tabIcon>
</li>
<li>
<tabIcon
id="settings-display-icon"
tab-i-d="display"
:show-title="false"
:show-tooltip="false"
:require-connection="false"
:current-tab="currentTab"
@set-tab="setTab"
>
Display
</tabIcon>
</li>
<li class="uk-nav-header">Microscope settings</li>
<li>
<tabIcon
id="settings-camera-icon"
tab-i-d="camera"
:show-title="false"
:show-tooltip="false"
:require-connection="true"
:current-tab="currentTab"
@set-tab="setTab"
>
Camera
</tabIcon>
</li>
<li>
<tabIcon
id="settings-mapping-icon"
tab-i-d="mapping"
:show-title="false"
:show-tooltip="false"
:require-connection="true"
:current-tab="currentTab"
@set-tab="setTab"
>
Camera/stage mapping
</tabIcon>
</li>
<li>
<tabIcon
id="settings-microscope-icon"
tab-i-d="microscope"
:show-title="false"
:show-tooltip="false"
:require-connection="true"
:current-tab="currentTab"
@set-tab="setTab"
>
General
</tabIcon>
</li>
</ul>
</div>
<div class="view-component uk-width-expand uk-padding-small">
<tabContent
tab-i-d="status"
:require-connection="false"
:current-tab="currentTab"
>
<div class="settings-pane uk-padding-small"> <div class="settings-pane uk-padding-small">
<h3>System settings</h3> <h3>Status</h3>
<statusPane />
</div>
</tabContent>
<tabContent
tab-i-d="display"
:require-connection="false"
:current-tab="currentTab"
>
<div class="settings-pane uk-padding-small">
<h3>Display settings</h3>
<appSettings /> <appSettings />
<hr /> <hr />
<streamSettings /> <streamSettings />
</div> </div>
</div> </tabContent>
<div class="uk-padding-remove">
<div v-if="$store.getters.ready" class="settings-pane uk-padding-small"> <tabContent
tab-i-d="camera"
:require-connection="true"
:current-tab="currentTab"
>
<div class="settings-pane uk-padding-small">
<h3>Camera settings</h3> <h3>Camera settings</h3>
<cameraSettings /> <cameraSettings />
</div> </div>
</div> </tabContent>
<div class="uk-padding-remove">
<div v-if="$store.getters.ready" class="settings-pane uk-padding-small"> <tabContent
tab-i-d="mapping"
:require-connection="true"
:current-tab="currentTab"
>
<div class="settings-pane uk-padding-small">
<h3>Camera/stage mapping settings</h3> <h3>Camera/stage mapping settings</h3>
<cameraStageMappingSettings /> <cameraStageMappingSettings />
</div> </div>
</div> </tabContent>
<div class="uk-padding-remove">
<div v-if="$store.getters.ready" class="settings-pane uk-padding-small"> <tabContent
tab-i-d="microscope"
:require-connection="true"
:current-tab="currentTab"
>
<div class="settings-pane uk-padding-small">
<h3>Microscope settings</h3> <h3>Microscope settings</h3>
<microscopeSettings /> <microscopeSettings />
</div> </div>
</div> </tabContent>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import statusPane from "./settingsComponents/statusPane.vue";
import streamSettings from "./settingsComponents/streamSettings.vue"; import streamSettings from "./settingsComponents/streamSettings.vue";
import microscopeSettings from "./settingsComponents/microscopeSettings.vue"; import microscopeSettings from "./settingsComponents/microscopeSettings.vue";
import cameraSettings from "./settingsComponents/cameraSettings.vue"; import cameraSettings from "./settingsComponents/cameraSettings.vue";
import appSettings from "./settingsComponents/appSettings.vue"; import appSettings from "./settingsComponents/appSettings.vue";
import cameraStageMappingSettings from "./settingsComponents/cameraStageMappingSettings.vue"; import cameraStageMappingSettings from "./settingsComponents/cameraStageMappingSettings.vue";
// Import generic components
import tabIcon from "../genericComponents/tabIcon";
import tabContent from "../genericComponents/tabContent";
// Export main app // Export main app
export default { export default {
name: "SettingsDisplay", name: "SettingsDisplay",
components: { components: {
statusPane,
streamSettings, streamSettings,
cameraSettings, cameraSettings,
microscopeSettings, microscopeSettings,
cameraStageMappingSettings, cameraStageMappingSettings,
appSettings appSettings,
tabIcon,
tabContent
},
data: function() {
return {
selected: "status",
currentTab: "status"
};
},
methods: {
setTab: function(event, tab) {
if (!(this.currentTab == tab)) {
this.currentTab = tab;
}
}
} }
}; };
</script> </script>
@ -57,6 +182,16 @@ export default {
border-width: 0 1px 0 0; border-width: 0 1px 0 0;
border-style: solid; border-style: solid;
border-color: rgba(180, 180, 180, 0.25); border-color: rgba(180, 180, 180, 0.25);
min-height: 100%; }
.settings-nav {
overflow-y: auto;
overflow-x: hidden;
width: 250px;
padding: 10px;
background-color: rgba(180, 180, 180, 0.03);
border-width: 0 1px 0 0;
border-style: solid;
border-color: rgba(180, 180, 180, 0.25);
} }
</style> </style>