From ba69b6029ca0e3f145bdfaf33071525f77d38873 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 24 Apr 2020 19:21:19 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 11 +-- ayanova/src/api/gzutil.js | 7 +- ayanova/src/components/wiki-control.vue | 103 ++++++++++++++++-------- ayanova/src/views/widget.vue | 2 + 4 files changed, 78 insertions(+), 45 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 64a85f5c..a5b0d9c6 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -66,13 +66,14 @@ CURRENT TODOs @@@@@@@@@@@ ROADMAP STAGE 2: -todo: add to attachment object at server if it's an image or not so that can handle without downloading to see (or is it in the content type already?) + +todo: Image toolbar component handle attachments (this is a requirement because on a phone or other browsers you might not be able to drag and drop) +todo: wiki emit input on change: currently it's manual but it should just either WATCH for changes or the replace text method should do the triggering since it's called for all ops + todo: drag and drop files on to attachments and have them stored and added automatically todo: drag and drop image file on to wiki and have it added as attachment then linked automatically -todo: drag and drop image file from attachments and have it added to wiki automatically. -todo: Image toolbar component handle attachments (this is a requirement because on a phone or other browsers you might not be able to drag and drop) -todo: handle dropped attachment that isn't an image with an alternate link style -todo: wiki emit input on change: currently it's manual but it should just either WATCH for changes or the replace text method should do the triggering since it's called for all ops + + todo: AFTER ATTACHMENTS WIKI IMAGES - Go back and finish off wiki image attachment UI and code diff --git a/ayanova/src/api/gzutil.js b/ayanova/src/api/gzutil.js index c52c0337..8972ac3d 100644 --- a/ayanova/src/api/gzutil.js +++ b/ayanova/src/api/gzutil.js @@ -366,11 +366,8 @@ export default { /////////////////////////////////////////////// // attempt to detect image extension name // - isImageURI: function(uri) { - if (!uri) { - return false; - } - return this.iconForFile(uri, "") == "fa-file-image"; + isImageAttachment: function(fileName, mimeType) { + return this.iconForFile(fileName, mimeType) == "fa-file-image"; } /** diff --git a/ayanova/src/components/wiki-control.vue b/ayanova/src/components/wiki-control.vue index b8f069b5..a0a4a529 100644 --- a/ayanova/src/components/wiki-control.vue +++ b/ayanova/src/components/wiki-control.vue @@ -245,17 +245,14 @@
-