summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkUrlPreview.vue
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-07-21 20:36:07 +0900
committerGitHub <noreply@github.com>2023-07-21 20:36:07 +0900
commite64a81aa1d2801516e8eac8dc69aac540489f20b (patch)
tree56accbc0f5f71db864e1e975920135fb0a957291 /packages/frontend/src/components/MkUrlPreview.vue
parentMerge pull request #10990 from misskey-dev/develop (diff)
parentNew Crowdin updates (#11336) (diff)
downloadmisskey-e64a81aa1d2801516e8eac8dc69aac540489f20b.tar.gz
misskey-e64a81aa1d2801516e8eac8dc69aac540489f20b.tar.bz2
misskey-e64a81aa1d2801516e8eac8dc69aac540489f20b.zip
Merge pull request #11301 from misskey-dev/develop
Release: 13.14.0
Diffstat (limited to 'packages/frontend/src/components/MkUrlPreview.vue')
-rw-r--r--packages/frontend/src/components/MkUrlPreview.vue32
1 files changed, 18 insertions, 14 deletions
diff --git a/packages/frontend/src/components/MkUrlPreview.vue b/packages/frontend/src/components/MkUrlPreview.vue
index fcad5b8064..f7b1b7dfff 100644
--- a/packages/frontend/src/components/MkUrlPreview.vue
+++ b/packages/frontend/src/components/MkUrlPreview.vue
@@ -32,7 +32,7 @@
</div>
</template>
<div v-else>
- <component :is="self ? 'MkA' : 'a'" :class="[$style.link, { [$style.compact]: compact }]" :[attr]="self ? url.substr(local.length) : url" rel="nofollow noopener" :target="target" :title="url">
+ <component :is="self ? 'MkA' : 'a'" :class="[$style.link, { [$style.compact]: compact }]" :[attr]="self ? url.substring(local.length) : url" rel="nofollow noopener" :target="target" :title="url">
<div v-if="thumbnail" :class="$style.thumbnail" :style="`background-image: url('${thumbnail}')`">
</div>
<article :class="$style.body">
@@ -52,19 +52,21 @@
</footer>
</article>
</component>
- <div v-if="tweetId" :class="$style.action">
- <MkButton :small="true" inline @click="tweetExpanded = true">
- <i class="ti ti-brand-twitter"></i> {{ i18n.ts.expandTweet }}
- </MkButton>
- </div>
- <div v-if="!playerEnabled && player.url" :class="$style.action">
- <MkButton :small="true" inline @click="playerEnabled = true">
- <i class="ti ti-player-play"></i> {{ i18n.ts.enablePlayer }}
- </MkButton>
- <MkButton v-if="!isMobile" :small="true" inline @click="openPlayer()">
- <i class="ti ti-picture-in-picture"></i> {{ i18n.ts.openInWindow }}
- </MkButton>
- </div>
+ <template v-if="showActions">
+ <div v-if="tweetId" :class="$style.action">
+ <MkButton :small="true" inline @click="tweetExpanded = true">
+ <i class="ti ti-brand-twitter"></i> {{ i18n.ts.expandTweet }}
+ </MkButton>
+ </div>
+ <div v-if="!playerEnabled && player.url" :class="$style.action">
+ <MkButton :small="true" inline @click="playerEnabled = true">
+ <i class="ti ti-player-play"></i> {{ i18n.ts.enablePlayer }}
+ </MkButton>
+ <MkButton v-if="!isMobile" :small="true" inline @click="openPlayer()">
+ <i class="ti ti-picture-in-picture"></i> {{ i18n.ts.openInWindow }}
+ </MkButton>
+ </div>
+ </template>
</div>
</template>
@@ -85,9 +87,11 @@ const props = withDefaults(defineProps<{
url: string;
detail?: boolean;
compact?: boolean;
+ showActions?: boolean;
}>(), {
detail: false,
compact: false,
+ showActions: true,
});
const MOBILE_THRESHOLD = 500;