disabled button on running
This commit is contained in:
@@ -11,6 +11,7 @@ module.exports = {
|
||||
return {
|
||||
tab: "1",
|
||||
confirmReset: false,
|
||||
confirmSave: false,
|
||||
};
|
||||
},
|
||||
components: {
|
||||
@@ -73,6 +74,8 @@ module.exports = {
|
||||
var macrosName = document.getElementById(`macros-name-${id}`).value;
|
||||
var macrosColor = document.getElementById(`macros-color-${id}`).value;
|
||||
|
||||
console.log(this.tab);
|
||||
|
||||
this.config.macros[id].name = macrosName;
|
||||
this.config.macros[id].color = macrosColor;
|
||||
this.config.macros[id].gcode_file_name = this.state.selected;
|
||||
|
||||
@@ -209,21 +209,21 @@ script#control-view-template(type="text/x-template")
|
||||
|
||||
.macros-div(class="present")
|
||||
button.macros-buttons(title="Click to run Macros 1", @click="runMacros(0)",
|
||||
:disabled="!true",v-bind:style="{ backgroundColor: config.macros[0].color }") {{config.macros[0].name}}
|
||||
:disabled="!is_ready",v-bind:style="{ backgroundColor: config.macros[0].color }") {{config.macros[0].name}}
|
||||
button.macros-buttons(title="Click to run Macros 2", @click="runMacros(1)",
|
||||
:disabled="!true",v-bind:style="{ backgroundColor: config.macros[1].color }") {{config.macros[1].name}}
|
||||
:disabled="!is_ready",v-bind:style="{ backgroundColor: config.macros[1].color }") {{config.macros[1].name}}
|
||||
button.macros-buttons(title="Click to run Macros 3", @click="runMacros(2)",
|
||||
:disabled="!true",v-bind:style="{ backgroundColor: config.macros[2].color }") {{config.macros[2].name}}
|
||||
:disabled="!is_ready",v-bind:style="{ backgroundColor: config.macros[2].color }") {{config.macros[2].name}}
|
||||
button.macros-buttons(title="Click to run Macros 4", @click="runMacros(3)",
|
||||
:disabled="!true",v-bind:style="{ backgroundColor: config.macros[3].color }") {{config.macros[3].name}}
|
||||
:disabled="!is_ready",v-bind:style="{ backgroundColor: config.macros[3].color }") {{config.macros[3].name}}
|
||||
button.macros-buttons(title="Click to run Macros 5", @click="runMacros(4)",
|
||||
:disabled="!true",v-bind:style="{ backgroundColor: config.macros[4].color }") {{config.macros[4].name}}
|
||||
:disabled="!is_ready",v-bind:style="{ backgroundColor: config.macros[4].color }") {{config.macros[4].name}}
|
||||
button.macros-buttons(title="Click to run Macros 6", @click="runMacros(5)",
|
||||
:disabled="!true",v-bind:style="{ backgroundColor: config.macros[5].color }") {{config.macros[5].name}}
|
||||
:disabled="!is_ready",v-bind:style="{ backgroundColor: config.macros[5].color }") {{config.macros[5].name}}
|
||||
button.macros-buttons(title="Click to run Macros 7", @click="runMacros(6)",
|
||||
:disabled="!true",v-bind:style="{ backgroundColor: config.macros[6].color }") {{config.macros[6].name}}
|
||||
:disabled="!is_ready",v-bind:style="{ backgroundColor: config.macros[6].color }") {{config.macros[6].name}}
|
||||
button.macros-buttons(title="Click to run Macros 8", @click="runMacros(7)",
|
||||
:disabled="!true",v-bind:style="{ backgroundColor: config.macros[7].color }") {{config.macros[7].name}}
|
||||
:disabled="!is_ready",v-bind:style="{ backgroundColor: config.macros[7].color }") {{config.macros[7].name}}
|
||||
|
||||
|
||||
.tabs
|
||||
|
||||
@@ -9,6 +9,17 @@ script#macros-template(type="text/x-template")
|
||||
button.pure-button(@click="confirmReset=false") Cancel
|
||||
button.pure-button.pure-button-primary(@click="resetConfig")
|
||||
| Reset
|
||||
|
||||
message(:show.sync="confirmSave")
|
||||
h3(slot="header") Confirm Save?
|
||||
div(slot="body")
|
||||
p Are you sure you want to save the current settings?
|
||||
|
||||
div(slot="footer")
|
||||
button.pure-button(@click="confirmSave=false") Cancel
|
||||
button.pure-button.pure-button-primary(@click="resetConfig")
|
||||
| Confirm
|
||||
|
||||
h1 Macros Configuration
|
||||
button.pure-button(title="Reset Macros", @click="confirmReset=true",
|
||||
style="height:50px;width:170px;font-weight:normal;color:#fff;background-color:#5a9ad7;display:flex;align-items:center;justify-content:space-around") Reset Macros
|
||||
|
||||
@@ -43,7 +43,7 @@ class Config(object):
|
||||
self.values = {}
|
||||
|
||||
try:
|
||||
self.version = "1.4.0 Alpha 1"
|
||||
self.version = "1.4.0"
|
||||
|
||||
# Load config template
|
||||
with open(get_resource('http/config-template.json'), 'r',
|
||||
|
||||
@@ -648,8 +648,9 @@ span.unit
|
||||
display flex
|
||||
flex-direction row
|
||||
|
||||
.tabs
|
||||
margin-top 5px
|
||||
.tabs
|
||||
margin-top 5px
|
||||
width 105%
|
||||
|
||||
.submit-macros
|
||||
height 50px
|
||||
|
||||
Reference in New Issue
Block a user