diff options
| author | tamaina <tamaina@hotmail.co.jp> | 2023-02-03 08:07:25 +0000 |
|---|---|---|
| committer | tamaina <tamaina@hotmail.co.jp> | 2023-02-03 08:07:25 +0000 |
| commit | 0d148bd23bf3e45d9ea824f6016c2fa5c5bcb1a8 (patch) | |
| tree | 0358bf1eb9f879057d538ceb46908c275f816471 /packages | |
| parent | update idb-proxy.ts (diff) | |
| parent | 13.3.0 (diff) | |
| download | sharkey-0d148bd23bf3e45d9ea824f6016c2fa5c5bcb1a8.tar.gz sharkey-0d148bd23bf3e45d9ea824f6016c2fa5c5bcb1a8.tar.bz2 sharkey-0d148bd23bf3e45d9ea824f6016c2fa5c5bcb1a8.zip | |
Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/backend/src/core/activitypub/ApRendererService.ts | 2 | ||||
| -rw-r--r-- | packages/backend/src/misc/nyaize.ts | 4 | ||||
| -rw-r--r-- | packages/frontend/package.json | 1 | ||||
| -rw-r--r-- | packages/frontend/src/components/MkMediaVideo.vue | 29 |
4 files changed, 21 insertions, 15 deletions
diff --git a/packages/backend/src/core/activitypub/ApRendererService.ts b/packages/backend/src/core/activitypub/ApRendererService.ts index 91a2767e69..648f30229a 100644 --- a/packages/backend/src/core/activitypub/ApRendererService.ts +++ b/packages/backend/src/core/activitypub/ApRendererService.ts @@ -274,7 +274,7 @@ export class ApRendererService { } as any; if (reaction.startsWith(':')) { - const name = reaction.replace(/:/g, ''); + const name = reaction.replaceAll(':', ''); const emoji = await this.emojisRepository.findOneBy({ name, host: IsNull(), diff --git a/packages/backend/src/misc/nyaize.ts b/packages/backend/src/misc/nyaize.ts index 500d1db2cb..350f8d2172 100644 --- a/packages/backend/src/misc/nyaize.ts +++ b/packages/backend/src/misc/nyaize.ts @@ -1,14 +1,14 @@ export function nyaize(text: string): string { return text // ja-JP - .replace(/な/g, 'にゃ').replace(/ナ/g, 'ニャ').replace(/ナ/g, 'ニャ') + .replaceAll('な', 'にゃ').replaceAll('ナ', 'ニャ').replaceAll('ナ', 'ニャ') // en-US .replace(/(?<=n)a/gi, x => x === 'A' ? 'YA' : 'ya') .replace(/(?<=morn)ing/gi, x => x === 'ING' ? 'YAN' : 'yan') .replace(/(?<=every)one/gi, x => x === 'ONE' ? 'NYAN' : 'nyan') // ko-KR .replace(/[나-낳]/g, match => String.fromCharCode( - match.charCodeAt(0)! + '냐'.charCodeAt(0) - '나'.charCodeAt(0) + match.charCodeAt(0)! + '냐'.charCodeAt(0) - '나'.charCodeAt(0), )) .replace(/(다$)|(다(?=\.))|(다(?= ))|(다(?=!))|(다(?=\?))/gm, '다냥') .replace(/(야(?=\?))|(야$)|(야(?= ))/gm, '냥'); diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 1e0ab6ba26..40183d64ce 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -62,6 +62,7 @@ "typescript": "4.9.5", "uuid": "9.0.0", "vanilla-tilt": "1.8.0", + "vue-plyr": "7.0.0", "vite": "4.1.1", "vue": "3.2.47", "vue-prism-editor": "2.0.0-alpha.2", diff --git a/packages/frontend/src/components/MkMediaVideo.vue b/packages/frontend/src/components/MkMediaVideo.vue index df0bf84116..5a2da050bb 100644 --- a/packages/frontend/src/components/MkMediaVideo.vue +++ b/packages/frontend/src/components/MkMediaVideo.vue @@ -6,19 +6,20 @@ </div> </div> <div v-else class="kkjnbbplepmiyuadieoenjgutgcmtsvu"> - <video - :poster="video.thumbnailUrl" - :title="video.comment" - :alt="video.comment" - preload="none" - controls - @contextmenu.stop - > - <source - :src="video.url" - :type="video.type" + <vue-plyr> + <video + controls + crossorigin + playsinline + :data-poster="video.thumbnailUrl" > - </video> + <source + size="720" + :src="video.url" + :type="video.type" + /> + </video> + </vue-plyr> <i class="ti ti-eye-off" @click="hide = true"></i> </div> </template> @@ -26,7 +27,9 @@ <script lang="ts" setup> import { ref } from 'vue'; import * as misskey from 'misskey-js'; +import VuePlyr from 'vue-plyr'; import { defaultStore } from '@/store'; +import 'vue-plyr/dist/vue-plyr.css'; const props = defineProps<{ video: misskey.entities.DriveFile; @@ -39,6 +42,8 @@ const hide = ref((defaultStore.state.nsfw === 'force') ? true : props.video.isSe .kkjnbbplepmiyuadieoenjgutgcmtsvu { position: relative; + --plyr-color-main: var(--accent); + > i { display: block; position: absolute; |