From 44c82060492efb7bf36c2d61541e70e9feded4ef Mon Sep 17 00:00:00 2001 From: raphael Date: Thu, 11 Feb 2021 14:33:44 +0100 Subject: [PATCH] fix compile error and webdav --- config.default.yml | 2 +- src/js/icons.js | 4 +++- src/js/main.js | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/config.default.yml b/config.default.yml index da713fe..481c005 100644 --- a/config.default.yml +++ b/config.default.yml @@ -4,7 +4,7 @@ backend: accessToken: "" # Enable the function to save to a webdav-server (check README for more info) -- boolean - enableWebdav: false + enableWebdav: true # Backend performance tweaks performance: diff --git a/src/js/icons.js b/src/js/icons.js index 6c39955..3b6e6fa 100644 --- a/src/js/icons.js +++ b/src/js/icons.js @@ -19,6 +19,7 @@ import { faLock, faLockOpen, faInfoCircle, + faGlobe, } from "@fortawesome/free-solid-svg-icons"; import { faSquare, @@ -52,7 +53,8 @@ library.add( faPlusSquare, faLock, faLockOpen, - faInfoCircle + faInfoCircle, + faGlobe ); dom.i2svg(); diff --git a/src/js/main.js b/src/js/main.js index 71720d9..51c918a 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -4,7 +4,7 @@ import whiteboard from "./whiteboard"; import keybinds from "./keybinds"; import Picker from "vanilla-picker"; import { dom } from "@fortawesome/fontawesome-svg-core"; -import pdfjsLib from "pdfjs-dist/webpack"; +import pdfjsLib from "pdfjs-dist"; import shortcutFunctions from "./shortcutFunctions"; import ReadOnlyService from "./services/ReadOnlyService"; import InfoService from "./services/InfoService"; @@ -815,7 +815,7 @@ function initWhiteboard() { var date = +new Date(); $.ajax({ type: "POST", - url: document.URL.substr(0, document.URL.lastIndexOf("/")) + "api/upload", + url: document.URL.substr(0, document.URL.lastIndexOf("/")) + "/api/upload", data: { imagedata: base64data, whiteboardId: whiteboardId, @@ -827,10 +827,11 @@ function initWhiteboard() { showBasicAlert("Whiteboard was saved to Webdav!", { headercolor: "#5c9e5c", }); - console.log("Image uploaded for webdav!"); + console.log("Image uploaded to webdav!"); callback(); }, error: function (err) { + console.error(err); if (err.status == 403) { showBasicAlert( "Could not connect to Webdav folder! Please check the credentials and paths and try again!"