From ebedb81e3f763da528604f0371db0a0fe09be267 Mon Sep 17 00:00:00 2001 From: tamaina Date: Fri, 3 Feb 2023 08:07:17 +0000 Subject: [PATCH 1/9] update idb-proxy.ts Maybe fixed #9769 --- packages/frontend/src/scripts/idb-proxy.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/frontend/src/scripts/idb-proxy.ts b/packages/frontend/src/scripts/idb-proxy.ts index 218682bb5..7dbca01de 100644 --- a/packages/frontend/src/scripts/idb-proxy.ts +++ b/packages/frontend/src/scripts/idb-proxy.ts @@ -8,14 +8,15 @@ import { const fallbackName = (key: string) => `idbfallback::${key}`; -let idbAvailable = typeof window !== 'undefined' ? !!window.indexedDB : true; +let idbAvailable = typeof window !== 'undefined' ? !!(window.indexedDB && window.indexedDB.open) : true; if (idbAvailable) { - iset('idb-test', 'test').catch(err => { - console.error('idb error', err); - console.error('indexedDB is unavailable. It will use localStorage.'); - idbAvailable = false; - }); + await iset('idb-test', 'test') + .catch(err => { + console.error('idb error', err); + console.error('indexedDB is unavailable. It will use localStorage.'); + idbAvailable = false; + }); } else { console.error('indexedDB is unavailable. It will use localStorage.'); } From d78e15cc1a4166d6f08ab4914a6d9ec61d8a33da Mon Sep 17 00:00:00 2001 From: tamaina Date: Fri, 3 Feb 2023 20:37:15 +0000 Subject: [PATCH 2/9] =?UTF-8?q?fix(client):=20=E3=82=AB=E3=82=B9=E3=82=BF?= =?UTF-8?q?=E3=83=A0=E7=B5=B5=E6=96=87=E5=AD=97=E3=81=AB=E3=82=A2=E3=83=8B?= =?UTF-8?q?=E3=83=A1=E3=83=BC=E3=82=B7=E3=83=A7=E3=83=B3=E7=94=BB=E5=83=8F?= =?UTF-8?q?=E3=82=92=E5=86=8D=E7=94=9F=E3=81=97=E3=81=AA=E3=81=84=E8=A8=AD?= =?UTF-8?q?=E5=AE=9A=E3=81=8C=E9=81=A9=E7=94=A8=E3=81=95=E3=82=8C=E3=81=A6?= =?UTF-8?q?=E3=81=84=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +++ .../src/components/global/MkCustomEmoji.vue | 22 +++++++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36d9fcc4f..8dca1170d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,9 @@ You should also include the user name that made the change. ### Improvements - ロールで広告の非表示が有効になっている場合は最初から広告を非表示にするように +### Bugfixes +- Client: カスタム絵文字にアニメーション画像を再生しない設定が適用されていない問題を修正 + ## 13.2.6 (2023/02/01) ### Changes - docker-compose.ymlをdocker-compose.yml.exampleにしました。docker-compose.ymlとしてコピーしてから使用してください。 diff --git a/packages/frontend/src/components/global/MkCustomEmoji.vue b/packages/frontend/src/components/global/MkCustomEmoji.vue index 93c47f0c2..e6dedd035 100644 --- a/packages/frontend/src/components/global/MkCustomEmoji.vue +++ b/packages/frontend/src/components/global/MkCustomEmoji.vue @@ -18,19 +18,23 @@ const props = defineProps<{ }>(); const customEmojiName = computed(() => (props.name[0] === ':' ? props.name.substr(1, props.name.length - 2) : props.name).replace('@.', '')); -const url = computed(() => { + +const rawUrl = computed(() => { if (props.url) { return props.url; - } else if (props.host == null && !customEmojiName.value.includes('@')) { - const found = customEmojis.value.find(x => x.name === customEmojiName.value); - return found ? defaultStore.state.disableShowingAnimatedImages ? getStaticImageUrl(found.url) : found.url : null; - } else { - const rawUrl = props.host ? `/emoji/${customEmojiName.value}@${props.host}.webp` : `/emoji/${customEmojiName.value}.webp`; - return defaultStore.state.disableShowingAnimatedImages - ? getStaticImageUrl(rawUrl) - : rawUrl; } + if (props.host == null && !customEmojiName.value.includes('@')) { + return customEmojis.value.find(x => x.name === customEmojiName.value)?.url || null; + } + return props.host ? `/emoji/${customEmojiName.value}@${props.host}.webp` : `/emoji/${customEmojiName.value}.webp`; }); + +const url = computed(() => + defaultStore.reactiveState.disableShowingAnimatedImages.value && rawUrl.value + ? getStaticImageUrl(rawUrl.value) + : rawUrl.value +); + const alt = computed(() => `:${customEmojiName.value}:`); let errored = $ref(url.value == null); From b2a67ba5ca82a988d7f83dac721c1f5641f94b81 Mon Sep 17 00:00:00 2001 From: tamaina Date: Fri, 3 Feb 2023 21:21:36 +0000 Subject: [PATCH 3/9] =?UTF-8?q?fix(client):=20=E3=82=AA=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=83=97=E3=83=AA=E3=83=BC=E3=83=88=E3=81=A7?= =?UTF-8?q?Unicode=E7=B5=B5=E6=96=87=E5=AD=97=E3=81=8C=E3=82=AB=E3=82=B9?= =?UTF-8?q?=E3=82=BF=E3=83=A0=E7=B5=B5=E6=96=87=E5=AD=97=E3=81=A8=E3=81=97?= =?UTF-8?q?=E3=81=A6=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C=E3=81=A6=E3=81=97?= =?UTF-8?q?=E3=81=BE=E3=81=86=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + packages/frontend/src/components/MkAutocomplete.vue | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dca1170d..2e96ced51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ You should also include the user name that made the change. ### Bugfixes - Client: カスタム絵文字にアニメーション画像を再生しない設定が適用されていない問題を修正 +- Client: オートコンプリートでUnicode絵文字がカスタム絵文字として表示されてしまうのを修正 ## 13.2.6 (2023/02/01) ### Changes diff --git a/packages/frontend/src/components/MkAutocomplete.vue b/packages/frontend/src/components/MkAutocomplete.vue index 27997eb33..e523b988b 100644 --- a/packages/frontend/src/components/MkAutocomplete.vue +++ b/packages/frontend/src/components/MkAutocomplete.vue @@ -17,7 +17,8 @@
  1. - + + From 57f5df2d22ff5dc4989b5cc2d8522bb6a0a6eee0 Mon Sep 17 00:00:00 2001 From: Rox Squires Date: Sat, 4 Feb 2023 00:00:16 +0000 Subject: [PATCH 4/9] Fix | Vue-plyr CORS issue (#9790) * Added Video player Added vue-plyr as the video play * Create node.js.yml * Delete node.js.yml * Added vue-plyr into pnpm-lock.yaml * tweak * Fixed the pnpm-lock.yaml For some reason on the dependencies there was to instances of vue-plyr * Added MkMediaAudio * Update MkMediaList.vue * CORS checks * Update MkMediaVideo.vue * Update MkMediaVideo.vue * Fixed CORS the property made the video player use the CORS policy that stopped instance not using media caching not able to load the video from remote instance --------- Co-authored-by: syuilo --- packages/frontend/src/components/MkMediaList.vue | 2 ++ packages/frontend/src/components/MkMediaVideo.vue | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/MkMediaList.vue b/packages/frontend/src/components/MkMediaList.vue index f263ae0ce..58bec80f2 100644 --- a/packages/frontend/src/components/MkMediaList.vue +++ b/packages/frontend/src/components/MkMediaList.vue @@ -30,6 +30,8 @@ const props = defineProps<{ raw?: boolean; }>(); +console.log(MediaList.toString) + const gallery = ref(null); const pswpZIndex = os.claimZIndex('middle'); diff --git a/packages/frontend/src/components/MkMediaVideo.vue b/packages/frontend/src/components/MkMediaVideo.vue index 5a2da050b..2c24c16f5 100644 --- a/packages/frontend/src/components/MkMediaVideo.vue +++ b/packages/frontend/src/components/MkMediaVideo.vue @@ -9,8 +9,6 @@