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 () { initial_tab: function () {
return this.tab == 0; return this.tab == 0;
}, },
downloadMacrosUrl() { download_macros_url: function () {
return '/api/macros/download/' + this.state.macros_list.map(item => item.file_name).join(','); 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: { methods: {

View File

@@ -73,7 +73,7 @@ script#macros-template(type="text/x-template")
.fa.fa-trash .fa.fa-trash
|  Yes |  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 button.config-button.button-blue(style="width:160px;") Download Macros
.warning-box .warning-box

View File

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