finxing macros
This commit is contained in:
@@ -280,6 +280,10 @@ module.exports = {
|
|||||||
this.$dispatch("send", msg);
|
this.$dispatch("send", msg);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getMacros: function(){
|
||||||
|
return this.config.macros;
|
||||||
|
},
|
||||||
|
|
||||||
load: function () {
|
load: function () {
|
||||||
const file_time = this.state.selected_time;
|
const file_time = this.state.selected_time;
|
||||||
const file = this.state.selected;
|
const file = this.state.selected;
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ module.exports = {
|
|||||||
macrosList: function () {
|
macrosList: function () {
|
||||||
return this.config.macrosList.map(el => el.file_name);
|
return this.config.macrosList.map(el => el.file_name);
|
||||||
},
|
},
|
||||||
|
getMacros: function(){
|
||||||
|
return this.config.macros;
|
||||||
|
},
|
||||||
getMacrosColor: function () {
|
getMacrosColor: function () {
|
||||||
return this.config.macros[this.tab]["color"];
|
return this.config.macros[this.tab]["color"];
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ script#control-view-template(type="text/x-template")
|
|||||||
.bar(:style="'width:' + (progress || 0) * 100 + '%'")
|
.bar(:style="'width:' + (progress || 0) * 100 + '%'")
|
||||||
|
|
||||||
.macros-div(class="present")
|
.macros-div(class="present")
|
||||||
button.macros-button(title="Click to run Macros",v-for="(index,macros) in config.macros",
|
button.macros-button(title="Click to run Macros",v-for="(index,macros) in getMacros",
|
||||||
@click="runMacros(index)",:disabled="!is_ready",v-bind:style="{ backgroundColor: macros.color }") {{macros.name}}
|
@click="runMacros(index)",:disabled="!is_ready",v-bind:style="{ backgroundColor: macros.color }") {{macros.name}}
|
||||||
|
|
||||||
.tabs
|
.tabs
|
||||||
|
|||||||
@@ -36,11 +36,11 @@ script#macros-template(type="text/x-template")
|
|||||||
.fa.fa-plus
|
.fa.fa-plus
|
||||||
|
|
||||||
.tabs
|
.tabs
|
||||||
template(v-for="(index,macros) in config.macros",:key="index")
|
template(v-for="(index,macros) in getMacros",:key="index")
|
||||||
input(type="radio",:id="'tab'+index", name="tabs",@click="tab = index.toString()")
|
input(type="radio",:id="'tab'+index", name="tabs",@click="tab = index.toString()")
|
||||||
label(:for="'tab'+index",style="height:50px;width:100px") Macros {{index+1}}
|
label(:for="'tab'+index",style="height:50px;width:100px") Macros {{index+1}}
|
||||||
|
|
||||||
section.tab-content(v-for="(index,macros) in config.macros",:id="'content'+index" ,v-show="tab == index")
|
section.tab-content(v-for="(index,macros) in config.macros",:id="'content'+index")
|
||||||
.macros-form
|
.macros-form
|
||||||
p.title Name
|
p.title Name
|
||||||
.input-container
|
.input-container
|
||||||
|
|||||||
@@ -689,8 +689,9 @@ span.unit
|
|||||||
width 130px
|
width 130px
|
||||||
font-weight normal
|
font-weight normal
|
||||||
border-radius 5px
|
border-radius 5px
|
||||||
|
border 0
|
||||||
margin-left 1rem
|
margin-left 1rem
|
||||||
background-color #5a9ad7
|
background-color ##0078e7
|
||||||
color #fff
|
color #fff
|
||||||
display flex
|
display flex
|
||||||
align-items center
|
align-items center
|
||||||
|
|||||||
Reference in New Issue
Block a user