Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rename download zip name #1252

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/panels/GcodefilesPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ export default class GcodefilesPanel extends Mixins(BaseMixin, ControlMixin) {

this.$socket.emit(
'server.files.zip',
{ items, dest: `gcodes/collection-${timestamp}.zip` },
{ items, dest: `config/gcodes-${timestamp}.zip` },
{ action: 'files/downloadZip', loading: 'gcodeDownloadZip' }
)

Expand Down
9 changes: 8 additions & 1 deletion src/components/panels/Machine/ConfigFilesPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,14 @@ export default class ConfigFilesPanel extends Mixins(BaseMixin) {
}

await addElementToItems(this.absolutePath, this.selectedFiles)
this.$socket.emit('server.files.zip', { items }, { action: 'files/downloadZip', loading: 'configDownloadZip' })
const date = new Date()
const timestamp = `${date.getFullYear()}${date.getMonth()}${date.getDay()}-${date.getHours()}${date.getMinutes()}${date.getSeconds()}`

this.$socket.emit(
'server.files.zip',
{ items, dest: `config/${this.root}-${timestamp}.zip` },
{ action: 'files/downloadZip', loading: 'configDownloadZip' }
)

this.selectedFiles = []
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/Timelapse/TimelapseFilesPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ export default class TimelapseFilesPanel extends Mixins(BaseMixin) {

this.$socket.emit(
'server.files.zip',
{ items, dest: `timelapse/collection-${timestamp}.zip` },
{ items, dest: `timelapse/timelapse-${timestamp}.zip` },
{ action: 'files/downloadZip', loading: 'timelapseDownloadZip' }
)

Expand Down