disabling button

This commit is contained in:
sanjayk03-dev
2024-10-14 12:49:41 +05:30
parent 57c2159b20
commit 7c7faf3d92
3 changed files with 16 additions and 2 deletions

View File

@@ -241,6 +241,11 @@ module.exports = new Vue({
if(this.config.motors[2]['axis'] == 'Y') return false;
return true;
},
enable_rotary: function() {
if(this.config.motors[2]['axis'] == 'Y' || this.config.motors[2]['axis'] == 'A') return true;
return false;
}
},
ready: function() {

View File

@@ -92,7 +92,7 @@ html(lang="en")
.whitespace
div
button.rotary-button(:class="is_rotary_active && 'active'", @click="toggle_rotary")
button.rotary-button(:disabled="!enable_rotary", :class="is_rotary_active && 'active'", @click="toggle_rotary")
img(src="/images/rotary.svg", alt="rotary", style="width:90%;")
.video(title="Plug camera into USB.\n" +

View File

@@ -110,7 +110,16 @@ tt
&.active
border 1px solid #54ed54
fill #ccffcb !important
background #ccffcb
&:focus
outline none
box-shadow none
&.disabled
opacity 0.5
background #e0e0e0
cursor not-allowed
.video
position relative