UI Redesign (#22)

* Rework UI into a new, responsive layout

* Send two streams (only one is currently downscaled)
This commit is contained in:
Declan Freeman-Gleason
2020-07-13 19:34:31 -07:00
committed by GitHub
parent aed92e7132
commit 8b46ad1cab
29 changed files with 945 additions and 559 deletions

View File

@@ -3,7 +3,6 @@
id="CameraStream"
:style="styleObject"
:src="address"
crossorigin="Anonymous"
alt=""
@click="e => $emit('click', e)"
>
@@ -13,19 +12,27 @@
export default {
name: "CvImage",
// eslint-disable-next-line vue/require-prop-types
props: ['address', 'scale'],
props: ['address', 'scale', 'maxHeight', 'maxHeightMd', 'maxHeightXl'],
data: () => {
return {}
},
computed: {
styleObject: {
get() {
return {
width: `${this.scale}%`,
height: `${this.scale}%`,
display: 'block',
margin: 'auto'
let ret = {
"object-fit": "contain",
"max-height": this.maxHeight,
width: `${this.scale}%`,
height: `${this.scale}%`,
};
if (this.$vuetify.breakpoint.xl) {
ret["max-height"] = this.maxHeightXl;
} else if (this.$vuetify.breakpoint.mdAndUp) {
ret["max-height"] = this.maxHeightMd;
}
return ret;
}
}

View File

@@ -4,10 +4,10 @@
dense
align="center"
>
<v-col :cols="3">
<span>{{ name }}</span>
<v-col cols="4">
<span class="ml-2">{{ name }}</span>
</v-col>
<v-col :cols="9">
<v-col cols="8">
<v-text-field
v-model="localValue"
dark

View File

@@ -1,6 +1,9 @@
<template>
<div>
<v-row dense align="center">
<v-row
dense
align="center"
>
<v-col :cols="2">
<span>{{ name }}</span>
</v-col>

View File

@@ -4,18 +4,18 @@
dense
align="center"
>
<v-col :cols="3">
<v-col :cols="12 - (selectCols || 9)">
<span>{{ name }}</span>
</v-col>
<v-col :cols="9">
<v-col :cols="selectCols || 9">
<v-select
v-model="localValue"
:items="indexList"
item-text="name"
item-value="index"
dark
color="#fcf6de"
item-color="blue"
color="accent"
item-color="secondary"
:disabled="disabled"
@change="$emit('rollback', localValue)"
/>
@@ -28,7 +28,7 @@
export default {
name: 'Select',
// eslint-disable-next-line vue/require-prop-types
props: ['list', 'name', 'value', 'disabled'],
props: ['list', 'name', 'value', 'disabled', 'selectCols'],
data() {
return {}
},

View File

@@ -1,10 +1,13 @@
<template>
<div>
<v-row dense align="center">
<v-col :cols="2">
<v-row
dense
align="center"
>
<v-col :cols="12 - (sliderCols || 8)">
<span>{{ name }}</span>
</v-col>
<v-col :cols="10">
<v-col :cols="sliderCols || 8">
<v-slider
:value="localValue"
dark
@@ -12,7 +15,8 @@
:max="max"
:min="min"
hide-details
color="#ffd843"
color="accent"
:disabled="disabled"
:step="step"
@start="isClicked = true"
@end="isClicked = false"
@@ -25,6 +29,7 @@
dark
:max="max"
:min="min"
:disabled="disabled"
:value="localValue"
class="mt-0 pt-0"
hide-details
@@ -47,7 +52,7 @@
export default {
name: "Slider",
// eslint-disable-next-line vue/require-prop-types
props: ["min", "max", "name", "value", "step"],
props: ["min", "max", "name", "value", "step", "sliderCols", "disabled"],
data() {
return {
isFocused: false,
@@ -63,7 +68,7 @@ export default {
set(value) {
this.$emit("input", value);
}
}
},
},
methods: {
handleChange(val) {