disable macros button

This commit is contained in:
sanjayk03-dev
2024-06-04 02:40:51 +05:30
parent 7304937f1c
commit e1ad67b25f
3 changed files with 7 additions and 4 deletions

View File

@@ -56,8 +56,11 @@ module.exports = {
initial_tab: function () {
return this.tab == 0;
},
downloadMacrosUrl() {
return '/api/macros/download/' + this.state.macros_list.map(item => item.file_name).join(',');
download_macros_url: function () {
return "/api/macros/download/" + this.state.macros_list.map(item => item.file_name).join(",");
},
can_download_macros: function () {
return this.state.macros_list.length;
},
},
methods: {

View File

@@ -73,7 +73,7 @@ script#macros-template(type="text/x-template")
.fa.fa-trash
|  Yes
a(download, title="Download Macros", :href="downloadMacrosUrl", style="text-decoration: none;")
a(download, title="Download Macros", :href="download_macros_url", style="text-decoration: none;", :disabled="!can_download_macros")
button.config-button.button-blue(style="width:160px;") Download Macros
.warning-box

View File

@@ -708,7 +708,7 @@ span.unit
.flex-row-container
display flex
flex-direction row
width 700px
width 710px
margin-bottom 1rem
.tabs