-
-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add interface settings and save gui.json on virtual_sdcard
- Loading branch information
Showing
19 changed files
with
448 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,8 @@ | ||
{ | ||
"socket": { | ||
"hostname": "kossel.local", | ||
"hostname": "voron250.local", | ||
"port": 8080, | ||
"reconnectInterval": 3000, | ||
"reconnectAttempts": 1000 | ||
}, | ||
"webcam": { | ||
"url": "http://192.168.0.210/webcam/?action=stream" | ||
}, | ||
"gui": { | ||
"dashboard": { | ||
"boolWebcam": true, | ||
"hiddenMacros": [ | ||
"M600", "FLASH_YES", "FLASH_NO", "TESTMOVE_A", "TESTMOVE_B", "TESTMOVE_X", "TESTMOVE_Y", "M141", "CANCEL", "M120", "M121", "CANCEL_PRINT", "PRINT_START", "PRINT_END", "RESTORE_LIGHT", "M355" | ||
] | ||
}, | ||
"gcodefiles": { | ||
"countPerPage": 15 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
|
||
<template> | ||
<v-card> | ||
<v-list-item> | ||
<v-list-item-avatar color="grey"><v-icon dark>mdi-view-dashboard</v-icon></v-list-item-avatar> | ||
<v-list-item-content> | ||
<v-list-item-title class="headline">Dashboard</v-list-item-title> | ||
</v-list-item-content> | ||
</v-list-item> | ||
<v-divider class="my-2"></v-divider> | ||
<v-card-text class="px-0 pb-0 pt-3 content"> | ||
<v-row> | ||
<v-col class="px-10 py-0"> | ||
<v-switch v-model="boolShowWebcamOnDashboard" label="Webcam"></v-switch> | ||
</v-col> | ||
</v-row> | ||
<v-row> | ||
<v-col class="px-10 py-0"> | ||
<v-switch v-model="boolShowTempchartOnDashboard" label="Tempchart"></v-switch> | ||
</v-col> | ||
</v-row> | ||
</v-card-text> | ||
</v-card> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
components: { | ||
}, | ||
data: function() { | ||
return { | ||
} | ||
}, | ||
computed: { | ||
boolShowWebcamOnDashboard: { | ||
get() { | ||
return this.$store.state.gui.dashboard.boolWebcam; | ||
}, | ||
set(status) { | ||
return this.$store.dispatch('setSettings', { gui: { dashboard: { boolWebcam: status } } }); | ||
} | ||
}, | ||
boolShowTempchartOnDashboard: { | ||
get() { | ||
return this.$store.state.gui.dashboard.boolTempchart; | ||
}, | ||
set(status) { | ||
return this.$store.dispatch('setSettings', { gui: { dashboard: { boolTempchart: status } } }); | ||
} | ||
}, | ||
}, | ||
methods: { | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
|
||
<template> | ||
<v-card> | ||
<v-list-item> | ||
<v-list-item-avatar color="grey"><v-icon dark>mdi-code-tags</v-icon></v-list-item-avatar> | ||
<v-list-item-content> | ||
<v-list-item-title class="headline">Macros</v-list-item-title> | ||
</v-list-item-content> | ||
</v-list-item> | ||
<v-divider class="my-2"></v-divider> | ||
<v-card-text class="px-0 pb-3 pt-3 content"> | ||
<div v-for="(macro, index) in getAllMacros" v-bind:key="index"> | ||
<v-row> | ||
<v-col class="px-10 py-0"> | ||
<settings-macro-switch :name="macro.name"></settings-macro-switch> | ||
</v-col> | ||
</v-row> | ||
</div> | ||
</v-card-text> | ||
</v-card> | ||
</template> | ||
|
||
<script> | ||
import { mapState, mapGetters } from 'vuex'; | ||
import SettingsMacroSwitch from "../../../inputs/SettingsMacroSwitch"; | ||
export default { | ||
components: { | ||
SettingsMacroSwitch | ||
}, | ||
data: function() { | ||
return { | ||
} | ||
}, | ||
computed: { | ||
...mapState({ | ||
hiddenMacros: state => state.gui.dashboard.hiddenMacros, | ||
}), | ||
...mapGetters([ | ||
'getAllMacros', | ||
]) | ||
}, | ||
methods: { | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<style> | ||
.webcamImage { | ||
width: 100%; | ||
} | ||
</style> | ||
|
||
<template> | ||
<v-card> | ||
<v-list-item> | ||
<v-list-item-avatar color="grey"><v-icon dark>mdi-webcam</v-icon></v-list-item-avatar> | ||
<v-list-item-content> | ||
<v-list-item-title class="headline">Webcam</v-list-item-title> | ||
</v-list-item-content> | ||
</v-list-item> | ||
<v-divider class="my-2"></v-divider> | ||
<v-card-text class="px-0 pb-0 pt-3 content"> | ||
<v-row> | ||
<v-col class="px-10 py-0"> | ||
<v-text-field | ||
v-model="webcamUrl" | ||
label="Webcam URL" | ||
></v-text-field> | ||
</v-col> | ||
</v-row> | ||
<v-row> | ||
<v-col class="px-10 py-0"> | ||
<v-switch v-model="boolNavi" label="Show in Navigation"></v-switch> | ||
</v-col> | ||
</v-row> | ||
</v-card-text> | ||
</v-card> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
components: { | ||
}, | ||
data: function() { | ||
return { | ||
} | ||
}, | ||
computed: { | ||
webcamUrl: { | ||
get() { | ||
return this.$store.state.webcam.url; | ||
}, | ||
set(newWebcamUrl) { | ||
return this.$store.dispatch('setSettings', { webcam: { url: newWebcamUrl } }); | ||
} | ||
}, | ||
boolNavi: { | ||
get() { | ||
return this.$store.state.gui.webcam.bool; | ||
}, | ||
set(bool) { | ||
return this.$store.dispatch('setSettings', { gui: { webcam: { bool: bool } } }); | ||
} | ||
}, | ||
}, | ||
methods: { | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Vue from 'vue' | ||
|
||
import WebcamPanel from './WebcamPanel.vue' | ||
import DashboardPanel from "./DashboardPanel"; | ||
import MacrosPanel from "./MacrosPanel"; | ||
|
||
Vue.component('settings-webcam-panel', WebcamPanel); | ||
Vue.component('settings-dashboard-panel', DashboardPanel); | ||
Vue.component('settings-macros-panel', MacrosPanel); | ||
|
||
export default { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<style> | ||
.settings_macro_switch .v-messages { | ||
display: none; | ||
} | ||
</style> | ||
|
||
<template> | ||
<v-switch v-model="value" :label="name.toUpperCase()" @change="setValue" class="settings_macro_switch mt-0"></v-switch> | ||
</template> | ||
|
||
|
||
<script> | ||
import { mapState } from 'vuex'; | ||
export default { | ||
data: function() { | ||
return { | ||
value: false | ||
} | ||
}, | ||
props: { | ||
name: String, | ||
}, | ||
computed: { | ||
...mapState({ | ||
hiddenMacros: state => state.gui.dashboard.hiddenMacros | ||
}), | ||
}, | ||
methods: { | ||
setValue() { | ||
if (this.value) { | ||
let index = this.hiddenMacros.indexOf(this.name); | ||
if (index > -1) this.hiddenMacros.splice(index, 1); | ||
} else this.hiddenMacros.push(this.name); | ||
} | ||
}, | ||
watch: { | ||
hiddenMacros: function() { | ||
this.value = !this.hiddenMacros.includes(this.name); | ||
} | ||
}, | ||
created() { | ||
this.value = !this.hiddenMacros.includes(this.name); | ||
} | ||
} | ||
</script> |
Oops, something went wrong.