first draft dashboard, implement console, upload gcode files

This commit is contained in:
Stefan Dej
2020-03-04 00:33:18 +01:00
parent 6beea6f546
commit c4736a4975
16 changed files with 855 additions and 227 deletions

View File

@@ -4,7 +4,7 @@
<v-list-item-avatar color="grey"><v-icon dark>fa-thermometer-three-quarters</v-icon></v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="headline">Heaters</v-list-item-title>
<v-list-item-subtitle>all heaters</v-list-item-subtitle>
<v-list-item-subtitle>{{ heatersCount }} heaters</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
<v-divider class="my-2"></v-divider>
@@ -15,29 +15,6 @@
<v-flex tag="strong" class="equal-width">Target</v-flex>
</v-layout>
<div v-for="(heater, index) in heaters" v-bind:key="index" >
<div v-if="data[heater]">
<v-divider class="my-2"></v-divider>
<v-layout wrap class=" text-center">
<v-flex col tag="strong" class="category-header">
<a>{{ heater }}</a>
</v-flex>
<v-flex col class="equal-width text-center">
<v-layout column>
<v-flex tag="strong">{{ data[heater].temperature.toFixed(2) }}°C</v-flex>
</v-layout>
</v-flex>
<v-flex grow class="equal-width pr-2">
<v-text-field
label=""
v-model="data[heater].target"
class=""
@input="setTemp(data[heater].target)"
></v-text-field>
</v-flex>
</v-layout>
</div>
</div>
<!--<div v-for="(heater, index) in getAllHeaters" v-bind:key="index" >
<v-divider class="my-2"></v-divider>
<v-layout wrap class=" text-center">
<v-flex col tag="strong" class="category-header">
@@ -45,42 +22,40 @@
</v-flex>
<v-flex col class="equal-width text-center">
<v-layout column>
<v-flex tag="strong">{{ heater.data !== undefined ? heater.data.temperature.toFixed(1) : '&#45;&#45;' }}°C</v-flex>
<v-flex tag="strong">{{ heater.temperature.toFixed(1) }}°C</v-flex>
</v-layout>
</v-flex>
<v-flex grow class="equal-width pr-2">
<v-text-field
label=""
v-model="heater.data.target"
class=""
@input="setTemp(heater.data.target)">
></v-text-field>
<toolInput :name="heater.name" ></toolInput>
</v-flex>
</v-layout>
</div>-->
</div>
</v-card-text>
</v-card>
</template>
<script>
import { mapState } from 'vuex'
import { mapGetters } from 'vuex'
import toolInput from '../../inputs/ToolInput'
export default {
components: {
toolInput
},
data: function() {
return {
extruderTemps: [250,215,195,0]
}
},
computed: {
...mapState({
data: state => state.printer,
heaters: state => state.object.heater.available_heaters
})
...mapGetters([
'heaters',
'heatersCount'
])
},
methods: {
setTemp(value) {
window.console.log(value);
}
}
}
</script>
@@ -103,21 +78,4 @@
padding-right: 8px;
white-space: pre-wrap;
}
.probe-span {
border-radius: 5px;
}
.probe-span:not(:last-child) {
margin-right: 8px;
}
.column-target-temp {
}
.v-input-target-temp {
margin: 0;
padding: 0;
width: 100px;
display: inline-block;
}
</style>