From beba547031897d37b5d51945f7524b6ca8f98742 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Tue, 14 Apr 2020 00:43:32 +0200 Subject: [PATCH] clean settings and last API corrections --- README.md | 9 ++++----- src/main.js | 6 +++--- src/pages/Files.vue | 10 +++++----- src/store/actions.js | 3 +-- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index bb8beff71..afcddd468 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Download and install KWC: ```bash mkdir -p ~/kwc cd ~/kwc -wget -q -O kwc.zip https://github.com/meteyou/kwc/releases/download/v0.0.6/kwc-alpha-0.0.6.zip && unzip kwc.zip && rm kwc.zip +wget -q -O kwc.zip https://github.com/meteyou/kwc/releases/download/v0.0.7/kwc-alpha-0.0.7.zip && unzip kwc.zip && rm kwc.zip ``` Configure web_server in printer.cfg: @@ -19,7 +19,7 @@ enable_cors: true trusted_clients: 192.168.1.0/24 127.0.0.1 -web_path: ~/kwc +allow_file_ops_when_printing: true ``` Example Klipper macros: @@ -77,7 +77,6 @@ server.document-root = "/home/pi/kwc" server.port = 81 ``` - `server.port` to port `81` ```bash sudo usermod -a -G www-data pi ``` @@ -123,10 +122,10 @@ backend websocket all comments are for webcam support. You can install MJPEG-Streamer with this [tutorial](https://github.com/cncjs/cncjs/wiki/Setup-Guide:-Raspberry-Pi-%7C-MJPEG-Streamer-Install-&-Setup-&-FFMpeg-Recording). -## Update KWC to V0.0.5 +## Update KWC to V0.0.7 ``` rm -R ~/kwc/* cd ~/kwc -wget -q -O kwc.zip https://github.com/meteyou/kwc/releases/download/v0.0.6/kwc-alpha-0.0.6.zip && unzip kwc.zip && rm kwc.zip +wget -q -O kwc.zip https://github.com/meteyou/kwc/releases/download/v0.0.7/kwc-alpha-0.0.7.zip && unzip kwc.zip && rm kwc.zip ``` and update your macros \ No newline at end of file diff --git a/src/main.js b/src/main.js index c13aa8c0c..ed8efe24a 100644 --- a/src/main.js +++ b/src/main.js @@ -23,11 +23,11 @@ Vue.component('vue-headful', vueHeadful); fetch('/config.json').then(res => res.json()).then(file => { store.commit('setSettings', file); - Vue.use(JRPCWS, 'ws://' + file.socket.hostname + ':' + file.socket.port + '/websocket', { + Vue.use(JRPCWS, 'ws://' + store.state.socket.hostname + ':' + store.state.socket.port + '/websocket', { store: store, reconnectEnabled: true, - reconnectInterval: file.socket.reconnectInterval, - reconnectAttempts: file.socket.reconnectAttempts, + reconnectInterval: store.state.socket.reconnectInterval, + reconnectAttempts: store.state.socket.reconnectAttempts, }); new Vue({ diff --git a/src/pages/Files.vue b/src/pages/Files.vue index 87e38570e..3e3bfcef8 100644 --- a/src/pages/Files.vue +++ b/src/pages/Files.vue @@ -127,7 +127,6 @@