diff --git a/lib/Controller/LocalController.php b/lib/Controller/LocalController.php
index 5548f1f7..b75e237f 100644
--- a/lib/Controller/LocalController.php
+++ b/lib/Controller/LocalController.php
@@ -124,14 +124,10 @@ class LocalController extends Controller {
*
* @NoAdminRequired
*/
- public function postCreate(string $content = '', $to = null, string $type = null, ?string $replyTo = null, $attachments = null, ?string $hashtags = null): DataResponse {
+ public function postCreate(string $content = '', array $to = [], string $type = null, ?string $replyTo = null, $attachments = null, array $hashtags = []): DataResponse {
$content = $content ?: '';
- $to = is_string($to) ? [$to] : $to;
- $to = $to ?? [];
$replyTo = $replyTo ?? '';
$type = $type ?? Stream::TYPE_PUBLIC;
- $hashtags = $hashtags === '' ? [] : $hashtags;
- $hashtags = $hashtags ?? [];
$attachments = $attachments ?? [];
try {
diff --git a/src/components/Composer/Composer.vue b/src/components/Composer/Composer.vue
index 9ef2c37a..62d4f6ca 100644
--- a/src/components/Composer/Composer.vue
+++ b/src/components/Composer/Composer.vue
@@ -25,7 +25,6 @@
@@ -402,11 +402,12 @@ export default {
this.$refs.fileUploadInput.click()
},
handleFileChange(event) {
- const previewUrl = URL.createObjectURL(event.target.files[0])
- this.previewUrls.push({
- description: '',
- url: previewUrl,
- result: event.target.files[0],
+ event.target.files.forEach((file) => {
+ this.previewUrls.push({
+ description: '',
+ url: URL.createObjectURL(file),
+ result: file,
+ })
})
},
removeAttachment(idx) {
@@ -421,7 +422,6 @@ export default {
}
this.post += this.$twemoji.parse(emoji) + ' '
this.$refs.composerInput.innerHTML += this.$twemoji.parse(emoji) + ' '
- this.$refs.emojiPicker.hide()
},
togglePopoverMenu() {
this.menuOpened = !this.menuOpened
@@ -476,14 +476,12 @@ export default {
const formData = new FormData()
formData.append('content', content)
- formData.append('to', to)
- formData.append('hashtags', hashtags)
+ to.forEach(to => formData.append('to[]', to))
+ hashtags.forEach(hashtag => formData.append('hashtags[]', hashtag))
formData.append('type', this.type)
- for (const preview of this.previewUrls) {
- // TODO send the summary and other props too
- formData.append('attachments', preview.result)
- formData.append('attachmentDescriptions', preview.description)
- }
+ this.previewUrls.forEach(preview => formData.append('attachments[]', preview.result))
+ this.previewUrls.forEach(preview => formData.append('attachmentDescriptions[]', preview.description))
+
if (this.replyTo) {
formData.append('replyTo', this.replyTo.id)
}
@@ -556,122 +554,146 @@ export default {
+
diff --git a/src/components/PostAttachment.vue b/src/components/PostAttachment.vue
index 6a7644c3..0e1f06d0 100644
--- a/src/components/PostAttachment.vue
+++ b/src/components/PostAttachment.vue
@@ -1,9 +1,15 @@
-
-
-
+
+
+
+
+ {{ item }}
+
-
-
+
+
diff --git a/src/components/TimelineEntry.vue b/src/components/TimelineEntry.vue
index 2ce2baec..04941109 100644
--- a/src/components/TimelineEntry.vue
+++ b/src/components/TimelineEntry.vue
@@ -27,8 +27,8 @@
-
-
+
@@ -130,9 +130,19 @@ export default {
display: flex;
margin: auto;
padding: 0;
+
&:focus {
background-color: rgba(47, 47, 47, 0.068);
}
+
+ .entry__avatar {
+ flex-shrink: 0;
+ }
+
+ .entry__content {
+ flex-grow: 1;
+ width: 0;
+ }
}
.notification-header {
diff --git a/src/components/TimelinePost.vue b/src/components/TimelinePost.vue
index 05809747..9c3b095d 100644
--- a/src/components/TimelinePost.vue
+++ b/src/components/TimelinePost.vue
@@ -220,7 +220,6 @@ export default {
font-size: 15px;
line-height: 1.6em;
position: relative;
- width: 100%;
::v-deep a.widget-default {
text-decoration: none !important;
@@ -276,13 +275,6 @@ export default {
}
}
- span {
- /* opacity: 0.5; */
- }
- .entry-content {
- display: flex;
- }
-
.post-header {
display: flex;
flex-direction: row;