diff --git a/src/components/dialogs/AddBatchToQueueDialog.vue b/src/components/dialogs/AddBatchToQueueDialog.vue
new file mode 100644
index 000000000..f98c958c9
--- /dev/null
+++ b/src/components/dialogs/AddBatchToQueueDialog.vue
@@ -0,0 +1,120 @@
+
+
+
+
+
+ {{ mdiCloseThick }}
+
+
+
+
+
+
+
+
+
+ {{ mdiChevronUp }}
+
+
+ {{ mdiChevronDown }}
+
+
+
+
+
+
+
+ {{ $t('Files.Cancel') }}
+
+ {{ $t('Files.AddToQueue') }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/panels/GcodefilesPanel.vue b/src/components/panels/GcodefilesPanel.vue
index 052a61bde..712ba6136 100644
--- a/src/components/panels/GcodefilesPanel.vue
+++ b/src/components/panels/GcodefilesPanel.vue
@@ -568,53 +568,10 @@
-
-
-
-
- {{ mdiCloseThick }}
-
-
-
-
-
-
-
-
- {{ mdiChevronUp }}
-
-
- {{ mdiChevronDown }}
-
-
-
-
-
-
-
- {{ $t('Files.Cancel') }}
- {{ $t('Files.AddToQueue') }}
-
-
-
+
@@ -628,8 +585,6 @@ import Panel from '@/components/ui/Panel.vue'
import SettingsRow from '@/components/settings/SettingsRow.vue'
import draggable from 'vuedraggable'
import {
- mdiChevronDown,
- mdiChevronUp,
mdiDragVertical,
mdiCheckboxBlankOutline,
mdiCheckboxMarked,
@@ -654,6 +609,7 @@ import {
mdiContentCopy,
} from '@mdi/js'
import StartPrintDialog from '@/components/dialogs/StartPrintDialog.vue'
+import AddBatchToQueueDialog from '@/components/dialogs/AddBatchToQueueDialog.vue'
import ControlMixin from '@/components/mixins/control'
import PathNavigation from '@/components/ui/PathNavigation.vue'
@@ -675,12 +631,6 @@ interface dialogPrintFile {
item: FileStateGcodefile
}
-interface dialogAddBatchToQueue {
- show: boolean
- count: number
- item: FileStateGcodefile
-}
-
interface dialogRenameObject {
show: boolean
newName: string
@@ -698,11 +648,9 @@ interface tableColumnSetting {
}
@Component({
- components: { StartPrintDialog, Panel, SettingsRow, PathNavigation, draggable },
+ components: { StartPrintDialog, AddBatchToQueueDialog, Panel, SettingsRow, PathNavigation, draggable },
})
export default class GcodefilesPanel extends Mixins(BaseMixin, ControlMixin) {
- mdiChevronDown = mdiChevronDown
- mdiChevronUp = mdiChevronUp
mdiContentCopy = mdiContentCopy
mdiFile = mdiFile
mdiFileDocumentMultipleOutline = mdiFileDocumentMultipleOutline
@@ -779,10 +727,9 @@ export default class GcodefilesPanel extends Mixins(BaseMixin, ControlMixin) {
item: { ...this.contextMenu.item },
}
- private dialogAddBatchToQueue: dialogAddBatchToQueue = {
- show: false,
- count: 1,
- item: { ...this.contextMenu.item },
+ dialogAddBatchToQueue: { isVisible: boolean; filename: string } = {
+ isVisible: false,
+ filename: '',
}
private dialogRenameFile: dialogRenameObject = {
@@ -1272,23 +1219,15 @@ export default class GcodefilesPanel extends Mixins(BaseMixin, ControlMixin) {
}
openAddBatchToQueueDialog(item: FileStateGcodefile) {
- this.dialogAddBatchToQueue.show = true
- this.dialogAddBatchToQueue.count = 1
- this.dialogAddBatchToQueue.item = item
- }
-
- async addBatchToQueueAction() {
- let filename = [this.currentPath, this.dialogAddBatchToQueue.item.filename].join('/')
+ let filename = [this.currentPath, item.filename].join('/')
if (filename.startsWith('/')) filename = filename.slice(1)
- const array: string[] = []
- for (let i = 0; i < this.dialogAddBatchToQueue.count; i++) {
- array.push(filename)
- }
-
- await this.$store.dispatch('server/jobQueue/addToQueue', array)
+ this.dialogAddBatchToQueue.isVisible = true
+ this.dialogAddBatchToQueue.filename = filename
+ }
- this.dialogAddBatchToQueue.show = false
+ closeAddBatchToQueueDialog() {
+ this.dialogAddBatchToQueue.isVisible = false
}
changeMetadataVisible(name: string, value: boolean) {
@@ -1549,15 +1488,6 @@ export default class GcodefilesPanel extends Mixins(BaseMixin, ControlMixin) {
}
-
-
diff --git a/src/components/panels/Status/Jobqueue.vue b/src/components/panels/Status/Jobqueue.vue
index 85ca50dd9..e9ee73c94 100644
--- a/src/components/panels/Status/Jobqueue.vue
+++ b/src/components/panels/Status/Jobqueue.vue
@@ -13,7 +13,9 @@
-
{{ $t('Panels.StatusPanel.EmptyJobqueue') }}
+
+
{{ $t('Panels.StatusPanel.EmptyJobqueue') }}
+
diff --git a/src/locales/en.json b/src/locales/en.json
index 504b53644..1006432eb 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -339,6 +339,7 @@
},
"History": {
"AddNote": "Add note",
+ "AddToQueueSuccessful": "File {filename} added to Queue.",
"AllJobs": "All",
"AvgPrinttime": "Print Time - Ø",
"Cancel": "Cancel",