summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2018-08-23 00:45:44 +0900
committerGitHub <noreply@github.com>2018-08-23 00:45:44 +0900
commitbaa71070a80b1580ce4594437c8d66ca8f0a6a3c (patch)
tree58a2bbf0cf492146bbb41baf29c62d791498d093 /src
parentMerge pull request #2402 from acid-chicken/patch-3 (diff)
parentMerge pull request #2405 from acid-chicken/patch-4 (diff)
downloadmisskey-baa71070a80b1580ce4594437c8d66ca8f0a6a3c.tar.gz
misskey-baa71070a80b1580ce4594437c8d66ca8f0a6a3c.tar.bz2
misskey-baa71070a80b1580ce4594437c8d66ca8f0a6a3c.zip
Merge pull request #2403 from syuilo/greenkeeper/summaly-2.1.4
Update summaly to the latest version 🚀
Diffstat (limited to 'src')
-rw-r--r--src/client/app/common/views/components/url-preview.vue20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/client/app/common/views/components/url-preview.vue b/src/client/app/common/views/components/url-preview.vue
index 95dafa8f4c..be69012737 100644
--- a/src/client/app/common/views/components/url-preview.vue
+++ b/src/client/app/common/views/components/url-preview.vue
@@ -1,5 +1,7 @@
<template>
-<iframe v-if="player" :src="player" heigth="250" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen />
+<div v-if="player.url" class="player" :style="`padding: ${(player.height || 0) / (player.width || 1) * 100}% 0 0`">
+ <iframe :src="player.url" :width="player.width || '100%'" :heigth="player.height || 250" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen />
+</div>
<div v-else-if="tweetUrl && detail" class="twitter">
<blockquote ref="tweet" class="twitter-tweet" :data-theme="$store.state.device.darkmode ? 'dark' : null">
<a :href="url"></a>
@@ -46,7 +48,11 @@ export default Vue.extend({
thumbnail: null,
icon: null,
sitename: null,
- player: null,
+ player: {
+ url: null,
+ width: null,
+ height: null
+ },
tweetUrl: null,
misskeyUrl
};
@@ -170,9 +176,17 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-iframe
+.twitter
+ position relative
width 100%
+ > iframe
+ height 100%
+ left 0
+ position absolute
+ top 0
+ width 100%
+
root(isDark)
> a
display block