diff --git a/client/src/components/Watch/Panel/Twitter.vue b/client/src/components/Watch/Panel/Twitter.vue index 220959e4..034ed336 100644 --- a/client/src/components/Watch/Panel/Twitter.vue +++ b/client/src/components/Watch/Panel/Twitter.vue @@ -121,9 +121,9 @@ @@ -290,6 +290,12 @@ export default defineComponent({ }, computed: { ...mapStores(useChannelsStore, usePlayerStore, useSettingsStore, useUserStore), + + // ツイートボタンが無効かどうか + is_tweet_button_disabled(): boolean { + return this.is_logged_in_twitter === false || this.tweet_letter_remain_count < 0 || + ((this.tweet_text.trim() === '' || this.tweet_letter_remain_count === 140) && this.tweet_captures.length === 0); + }, }, watch: { diff --git a/client/src/router/index.ts b/client/src/router/index.ts index 4e2a2c5d..8b17b193 100644 --- a/client/src/router/index.ts +++ b/client/src/router/index.ts @@ -125,7 +125,13 @@ const router = createRouter({ // ルーティングの変更時に View Transitions API を適用する // ref: https://developer.mozilla.org/ja/docs/Web/API/View_Transitions_API router.beforeResolve((to, from, next) => { - if (document.startViewTransition) { + // View Transition API を適用しないルートの prefix + // to と from の両方のパスがこの prefix で始まる場合は View Transition API を適用しない + const no_transition_routes = [ + '/tv/watch/', + '/videos/watch/', + ]; + if (document.startViewTransition && !no_transition_routes.some((route) => to.path.startsWith(route) && from.path.startsWith(route))) { document.startViewTransition(() => { next(); });