embedプレイヤーを閉じれるように (#4402)
This commit is contained in:
parent
db693f598b
commit
85d89cf4c4
2 changed files with 18 additions and 0 deletions
|
@ -334,6 +334,7 @@ common/views/pages/explore.vue:
|
||||||
|
|
||||||
common/views/components/url-preview.vue:
|
common/views/components/url-preview.vue:
|
||||||
enable-player: "プレイヤーを開く"
|
enable-player: "プレイヤーを開く"
|
||||||
|
disable-player: "プレイヤーを閉じる"
|
||||||
|
|
||||||
common/views/components/user-list.vue:
|
common/views/components/user-list.vue:
|
||||||
no-users: "ユーザーがいません"
|
no-users: "ユーザーがいません"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div v-if="playerEnabled" class="player" :style="`padding: ${(player.height || 0) / (player.width || 1) * 100}% 0 0`">
|
<div v-if="playerEnabled" class="player" :style="`padding: ${(player.height || 0) / (player.width || 1) * 100}% 0 0`">
|
||||||
|
<button class="disablePlayer" @click="playerEnabled = false" :title="$t('disable-player')"><fa icon="times"/></button>
|
||||||
<iframe :src="player.url + (player.url.match(/\?/) ? '&autoplay=1&auto_play=1' : '?autoplay=1&auto_play=1')" :width="player.width || '100%'" :heigth="player.height || 250" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen />
|
<iframe :src="player.url + (player.url.match(/\?/) ? '&autoplay=1&auto_play=1' : '?autoplay=1&auto_play=1')" :width="player.width || '100%'" :heigth="player.height || 250" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen />
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="tweetUrl && detail" class="twitter">
|
<div v-else-if="tweetUrl && detail" class="twitter">
|
||||||
|
@ -126,6 +127,22 @@ export default Vue.extend({
|
||||||
position relative
|
position relative
|
||||||
width 100%
|
width 100%
|
||||||
|
|
||||||
|
> button
|
||||||
|
position absolute
|
||||||
|
top -1.5em
|
||||||
|
right 0
|
||||||
|
font-size 1em
|
||||||
|
width 1.5em
|
||||||
|
height 1.5em
|
||||||
|
padding 0
|
||||||
|
margin 0
|
||||||
|
color var(--text)
|
||||||
|
background rgba(128, 128, 128, 0.2)
|
||||||
|
opacity 0.7
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
opacity 0.9
|
||||||
|
|
||||||
> iframe
|
> iframe
|
||||||
height 100%
|
height 100%
|
||||||
left 0
|
left 0
|
||||||
|
|
Loading…
Reference in a new issue