diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue index ccb33dc30c..0a97030fb4 100644 --- a/packages/frontend/src/components/MkPostForm.vue +++ b/packages/frontend/src/components/MkPostForm.vue @@ -274,12 +274,12 @@ const maxTextLength = computed((): number => { const canPost = computed((): boolean => { return !props.mock && !posting.value && !posted.value && ( - 1 <= textLength.value || + 1 <= textLength.value || 1 <= files.value.length || poll.value != null || props.renote != null || (props.reply != null && quoteId.value != null) - ) && + ) && (textLength.value <= maxTextLength.value) && (!poll.value || poll.value.choices.length >= 2); }); @@ -857,7 +857,7 @@ async function post(ev?: MouseEvent) { if (notesCount === 1) { claimAchievement('notes1'); } - poll.value = null; + if (postData.schedule?.scheduledAt) { const d = new Date(postData.schedule.scheduledAt); @@ -901,6 +901,7 @@ async function post(ev?: MouseEvent) { if (m === 0 && s === 0) { claimAchievement('postedAt0min0sec'); } + clear(); }); }).catch(err => { posting.value = false; diff --git a/packages/frontend/src/components/MkUrlPreview.vue b/packages/frontend/src/components/MkUrlPreview.vue index 6954f1f6ff..9b1640e0a4 100644 --- a/packages/frontend/src/components/MkUrlPreview.vue +++ b/packages/frontend/src/components/MkUrlPreview.vue @@ -13,10 +13,11 @@ SPDX-License-Identifier: AGPL-3.0-only v-if="player.url.startsWith('http://') || player.url.startsWith('https://')" sandbox="allow-popups allow-scripts allow-storage-access-by-user-activation allow-same-origin" scrolling="no" - :allow="player.allow == null ? 'autoplay;encrypted-media;fullscreen' : player.allow.filter(x => ['autoplay', 'clipboard-write', 'fullscreen', 'encrypted-media', 'picture-in-picture', 'web-share'].includes(x)).join(';')" + :allow="player.allow == null ? 'encrypted-media;fullscreen' : player.allow.filter(x => ['autoplay', 'clipboard-write', 'fullscreen', 'encrypted-media', 'picture-in-picture', 'web-share'].includes(x)).join(';')" :class="$style.playerIframe" - :src="player.url + (player.url.match(/\?/) ? '&autoplay=1&auto_play=1' : '?autoplay=1&auto_play=1')" - :style="{ border: 0 }" + :src="player.url" + :style="{ border: 0, backgroundColor: 'transparent' }" + allowtransparency="true" > invalid url @@ -27,14 +28,18 @@ SPDX-License-Identifier: AGPL-3.0-only - + @@ -83,7 +88,7 @@ SPDX-License-Identifier: AGPL-3.0-only