enhance(frontend): ページ遷移時にPlayerを閉じるように (#13013)
* なんかできた * update changelog.md * onDeactivatedを使うように
This commit is contained in:
parent
c971edd2dd
commit
bc5aebe956
3 changed files with 8 additions and 2 deletions
|
@ -83,7 +83,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { defineAsyncComponent, onUnmounted, ref } from 'vue';
|
||||
import { defineAsyncComponent, onDeactivated, onUnmounted, ref } from 'vue';
|
||||
import type { summaly } from '@misskey-dev/summaly';
|
||||
import { url as local } from '@/config.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
|
@ -131,6 +131,10 @@ const embedId = `embed${Math.random().toString().replace(/\D/, '')}`;
|
|||
const tweetHeight = ref(150);
|
||||
const unknownUrl = ref(false);
|
||||
|
||||
onDeactivated(() => {
|
||||
playerEnabled.value = false;
|
||||
});
|
||||
|
||||
const requestUrl = new URL(props.url);
|
||||
if (!['http:', 'https:'].includes(requestUrl.protocol)) throw new Error('invalid url');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue