-
+
@@ -23,24 +23,27 @@
import ZOffsetPanel from "../components/panels/ZOffsetPanel";
export default {
- components: {ZOffsetPanel},
+ components: { ZOffsetPanel },
data: () => ({
configExists: false
}),
computed: {
...mapState({
+ socket_connected: state => state.socket.isConnected,
+ klippy_connected: state => state.server.klippy_connected,
+ klippy_state: state => state.server.klippy_state,
+
showDashboardConsole: state => state.gui.dashboard.boolConsole,
- klippy_state: state => state.printer.webhooks.state,
- config: state => state.printer.configfile.config
+ config: state => state.printer.configfile.config,
}),
- ...mapGetters([
- 'showDashboardWebcam',
- 'powerDevicesCount',
- 'existPrinterConfig'
- ])
+ ...mapGetters({
+ showDashboardWebcam: 'showDashboardWebcam',
+ powerDevicesCount: 'server/powerDevices/count',
+ existPrinterConfig: 'existPrinterConfig'
+ })
},
created() {
- //this.is_ready = (this.klippy_state === "ready") ? true : false;
+
},
watch: {
config: {
diff --git a/src/pages/Files.vue b/src/pages/Files.vue
index 9c6c3931..f32bf011 100644
--- a/src/pages/Files.vue
+++ b/src/pages/Files.vue
@@ -127,7 +127,7 @@
@dragover="dragOverFilelist($event, item)" @dragleave="dragLeaveFilelist" @drop.prevent.stop="dragDropFilelist($event, item)"
:data-name="item.filename"
>
- |
+ |
mdi-folder
mdi-file
@@ -172,9 +172,10 @@
Start Job
Do you want to start {{ dialogPrintFile.item.filename }}?
@@ -203,7 +204,7 @@
Rename File
-
+
@@ -300,7 +301,7 @@
},
computed: {
...mapState({
- filetree: state => state.filetree,
+ filetree: state => state.files.filetree,
countPerPage: state => state.gui.gcodefiles.countPerPage,
hostname: state => state.socket.hostname,
port: state => state.socket.port,
@@ -344,18 +345,21 @@
let filename = file.name.replace(" ", "_");
formData.append('file', file, (this.currentPath+"/"+filename).substring(7));
- this.$store.commit('setLoading', { name: 'loadingGcodeUpload' });
+ // TODO loading upload
+ //this.$store.commit('setLoading', { name: 'loadingGcodeUpload' });
return axios.post('//' + this.hostname + ':' + this.port + '/server/files/upload',
formData, {
headers: { 'Content-Type': 'multipart/form-data' }
}
).then((result) => {
- this.$store.commit('removeLoading', { name: 'loadingGcodeUpload' });
+ // TODO loading upload
+ //this.$store.commit('removeLoading', { name: 'loadingGcodeUpload' });
toast.success("Upload of "+result.data.result+" successful!");
})
.catch(() => {
- this.$store.commit('removeLoading', { name: 'loadingGcodeUpload' });
+ // TODO loading upload
+ //this.$store.commit('removeLoading', { name: 'loadingGcodeUpload' });
toast.error("Cannot upload the file!");
});
},
@@ -363,8 +367,9 @@
this.$refs.fileUpload.click();
},
refreshFileList: function() {
- this.$store.commit('setLoading', { name: 'loadingGcodeRefresh' });
- this.$socket.sendObj('server.files.get_directory', { path: this.currentPath }, 'getDirectory');
+ // TODO loading button
+ //this.$store.commit('setLoading', { name: 'loadingGcodeRefresh' });
+ this.$socket.sendObj('server.files.get_directory', { path: this.currentPath }, 'files/getDirectory');
},
formatDate(date) {
let tmp2 = new Date(date);
@@ -435,7 +440,7 @@
this.$socket.sendObj('server.files.move', {
source: this.currentPath+"/"+this.dialogRenameFile.item.filename,
dest: this.currentPath+"/"+this.dialogRenameFile.newName
- }, 'getPostFileMove');
+ }, 'files/getMove');
},
renameDirectory(item) {
this.dialogRenameDirectory.item = item;
@@ -447,7 +452,7 @@
this.$socket.sendObj('server.files.move', {
source: this.currentPath+"/"+this.dialogRenameDirectory.item.filename,
dest: this.currentPath+"/"+this.dialogRenameDirectory.newName
- }, 'getPostFileMove');
+ }, 'files/getFileMove');
},
removeFile() {
let filename = (this.currentPath+"/"+this.contextMenu.item.filename);
@@ -466,11 +471,11 @@
createDirectoryAction: function() {
if (this.dialogCreateDirectory.name.length && this.dialogCreateDirectory.name.indexOf(" ") === -1) {
this.dialogCreateDirectory.show = false;
- this.$socket.sendObj('server.files.post_directory', { path: this.currentPath+"/"+this.dialogCreateDirectory.name }, 'getPostDirectory');
+ this.$socket.sendObj('server.files.post_directory', { path: this.currentPath+"/"+this.dialogCreateDirectory.name }, 'files/getCreateDir');
}
},
deleteDirectoryAction: function() {
- this.$socket.sendObj('server.files.delete_directory', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'getDeleteDirectory');
+ this.$socket.sendObj('server.files.delete_directory', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'files/getDeleteDir');
},
clickRow: function(item) {
if (!item.isDirectory) {
@@ -485,7 +490,7 @@
this.currentPath = this.currentPath.substr(0, this.currentPath.lastIndexOf("/"));
},
loadPath: function() {
- this.$socket.sendObj('server.files.get_directory', { path: this.currentPath }, 'getDirectory');
+ this.$socket.sendObj('server.files.get_directory', { path: this.currentPath }, 'files/getDirectory');
let dirArray = this.currentPath.split("/");
this.files = findDirectory(this.filetree, dirArray);
if (!this.showHiddenFiles) {
@@ -611,7 +616,7 @@
for (let i = data.pageStart; i < data.pageStop; i++) {
if (items[i] && !items[i].isDirectory && !items[i].metadataPulled) {
let filename = (this.currentPath+"/"+items[i].filename).substring(7);
- this.$socket.sendObj("server.files.metadata", { filename: filename }, "getMetadata");
+ this.$socket.sendObj("server.files.metadata", { filename: filename }, "files/getMetadata");
}
}
diff --git a/src/pages/settings/interface.vue b/src/pages/settings/interface.vue
index da73c6f9..3b091e46 100644
--- a/src/pages/settings/interface.vue
+++ b/src/pages/settings/interface.vue
@@ -12,11 +12,6 @@
-
-
- mdi-check
-
-
|