diff --git a/lib/Controller/LocalController.php b/lib/Controller/LocalController.php index 20c64b79..12098d37 100644 --- a/lib/Controller/LocalController.php +++ b/lib/Controller/LocalController.php @@ -106,6 +106,15 @@ class LocalController extends Controller { $this->miscService = $miscService; } + /** + * Upload file + * + * @NoAdminRequired + */ + public function uploadAttachement(): DataResponse { + + } + /** * Create a new post. diff --git a/lib/Controller/MediaApiController.php b/lib/Controller/MediaApiController.php new file mode 100644 index 00000000..82cd0532 --- /dev/null +++ b/lib/Controller/MediaApiController.php @@ -0,0 +1,44 @@ + +// SPDX-License-Identifier: AGPL-3.0-or-later + +namespace OCA\Social\Controller; + +use OCP\AppFramework\Controller; +use OCP\Files\IMimeTypeDetector; + +class MediaApiController extends Controller { + public const IMAGE_MIME_TYPES = [ + 'image/png', + 'image/jpeg', + 'image/jpg', + 'image/gif', + 'image/x-xbitmap', + 'image/x-ms-bmp', + 'image/bmp', + 'image/svg+xml', + 'image/webp', + ]; + + private IMimeTypeDetector $mimeTypeDetector; + + /** + * Creates an attachment to be used with a new status. + * + * @NoAdminRequired + */ + public function uploadMedia(): DataResponse { + // TODO + return DataResponse([ + 'id' => 1, + 'url' => '', + 'preview_url' => '', + 'remote_url' => null, + 'text_url' => '', + 'description' => '', + ]); + } +} diff --git a/package-lock.json b/package-lock.json index a50efd7b..b3be8b25 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,6 @@ "vue-click-outside": "^1.0.7", "vue-contenteditable-directive": "^1.2.0", "vue-infinite-loading": "^2.4.4", - "vue-masonry-css": "^1.0.3", "vue-material-design-icons": "^5.0.0", "vue-router": "^3.5.3", "vue-tribute": "^1.0.6", @@ -27541,11 +27540,6 @@ } } }, - "node_modules/vue-masonry-css": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/vue-masonry-css/-/vue-masonry-css-1.0.3.tgz", - "integrity": "sha512-viecHQiHVLez7HlYUQsv1wJb2MT/RDSzkDp6m3In41vPrk6OsBmT2qRE8LZqYIA4daIwrnx/Xm8h4fjOpuE3hw==" - }, "node_modules/vue-material-design-icons": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/vue-material-design-icons/-/vue-material-design-icons-5.0.0.tgz", @@ -49827,11 +49821,6 @@ "vue-style-loader": "^4.1.0" } }, - "vue-masonry-css": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/vue-masonry-css/-/vue-masonry-css-1.0.3.tgz", - "integrity": "sha512-viecHQiHVLez7HlYUQsv1wJb2MT/RDSzkDp6m3In41vPrk6OsBmT2qRE8LZqYIA4daIwrnx/Xm8h4fjOpuE3hw==" - }, "vue-material-design-icons": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/vue-material-design-icons/-/vue-material-design-icons-5.0.0.tgz", diff --git a/package.json b/package.json index 8cc6e702..34050246 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,6 @@ "vue-click-outside": "^1.0.7", "vue-contenteditable-directive": "^1.2.0", "vue-infinite-loading": "^2.4.4", - "vue-masonry-css": "^1.0.3", "vue-material-design-icons": "^5.0.0", "vue-router": "^3.5.3", "vue-tribute": "^1.0.6", diff --git a/src/components/Composer.vue b/src/components/Composer/Composer.vue similarity index 83% rename from src/components/Composer.vue rename to src/components/Composer/Composer.vue index d10df3b8..7d5685b3 100644 --- a/src/components/Composer.vue +++ b/src/components/Composer/Composer.vue @@ -1,5 +1,6 @@ + + + + + + diff --git a/src/components/Composer/PreviewGridItem.vue b/src/components/Composer/PreviewGridItem.vue new file mode 100644 index 00000000..94233059 --- /dev/null +++ b/src/components/Composer/PreviewGridItem.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/src/main.js b/src/main.js index da4d28d5..f850dd3a 100644 --- a/src/main.js +++ b/src/main.js @@ -30,7 +30,6 @@ import vuetwemoji from 'vue-twemoji' import contenteditableDirective from 'vue-contenteditable-directive' import ClickOutside from 'vue-click-outside' import VTooltip from '@nextcloud/vue/dist/Directives/Tooltip' -import VueMasonry from 'vue-masonry-css' sync(store, router) @@ -57,7 +56,6 @@ Vue.use(vuetwemoji, { className: 'emoji', // custom className for image output size: 'twemoji' // image size }) -Vue.use(VueMasonry) /* eslint-disable-next-line no-new */ new Vue({ diff --git a/src/views/Timeline.vue b/src/views/Timeline.vue index 08fc3928..d06599fb 100644 --- a/src/views/Timeline.vue +++ b/src/views/Timeline.vue @@ -92,7 +92,7 @@