moved icon to macros page.

This commit is contained in:
sanjayk03-dev
2024-06-03 19:00:49 +05:30
parent cffc910791
commit b426c0ba9e
4 changed files with 7 additions and 5 deletions

View File

@@ -56,6 +56,9 @@ module.exports = {
initial_tab: function () {
return this.tab == 0;
},
downloadMacrosUrl() {
return '/api/macros/download/' + this.state.macros_list.map(item => item.file_name).join(',');
},
},
methods: {
open: function () {

View File

@@ -319,10 +319,6 @@ script#control-view-template(type="text/x-template")
@click="deleteGCode = true",
:disabled="!state.selected || !is_ready",style="height:100px;width:100px;font-weight:normal")
img(src="images/delete_gcode.png" style="height: 30px;")
a(download, title="Download Macros",
:href="'/api/macros/download/' + state.macros_list.map(item => item.file_name).join(',')")
button.pure-button(style="height:100px;width:100px") Download Macros
message.error-message(:show.sync="deleteGCode")
h3(slot="header") Select files to delete:

View File

@@ -72,6 +72,9 @@ script#macros-template(type="text/x-template")
button.pure-button.button-error(@click="delete_selected_macro")
.fa.fa-trash
|  Yes
a(download, title="Download Macros", :href="downloadMacrosUrl")
button.config-button.button-blue(style="margin-left:5px;width:55%") Download Macros
.warning-box
p

View File

@@ -670,7 +670,7 @@ class Web(tornado.web.Application):
(r'/api/firmware/update', FirmwareUpdateHandler),
(r'/api/upgrade', UpgradeHandler),
(r'/api/file(/[^/]+)?', bbctrl.FileHandler),
(r'/api/macros/download',MacrosDownloadHandler),
(r'/api/macros/download(/[^/]+)?',MacrosDownloadHandler),
(r'/api/path/([^/]+)((/positions)|(/speeds))?', PathHandler),
(r'/api/home(/[xyzabcXYZABC]((/set)|(/clear))?)?', HomeHandler),
(r'/api/start', StartHandler),