mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-12-03 01:09:01 +09:00
(add) apply mediaHighlight to video
This commit is contained in:
parent
6eb6e2a9f0
commit
7c0dc87451
@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div v-if="hide" :class="$style.hidden" @click="hide = false">
|
||||
<div v-if="hide" :class="[$style.hidden, (video.isSensitive && defaultStore.state.highlightSensitiveImages) ? $style.sensitiveContainer : $style.nonSensitiveContainer]" @click="hide = false">
|
||||
<!-- 【注意】dataSaverMode が有効になっている際には、hide が false になるまでサムネイルや動画を読み込まないようにすること -->
|
||||
<div :class="$style.sensitive">
|
||||
<b v-if="video.isSensitive" style="display: block;"><i class="ti ti-alert-triangle"></i> {{ i18n.ts.sensitive }}{{ defaultStore.state.enableDataSaverMode ? ` (${i18n.ts.video}${video.size ? ' ' + bytes(video.size) : ''})` : '' }}</b>
|
||||
@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<span>{{ i18n.ts.clickToShow }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else :class="$style.visible">
|
||||
<div v-else :class="[$style.visible, (video.isSensitive && defaultStore.state.highlightSensitiveImages) ? $style.sensitiveContainer : $style.nonSensitiveContainer]">
|
||||
<video
|
||||
:class="$style.video"
|
||||
:poster="video.thumbnailUrl"
|
||||
@ -49,6 +49,14 @@ const hide = ref((defaultStore.state.nsfw === 'force' || defaultStore.state.enab
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sensitiveContainer {
|
||||
border: 3px solid var(--warn);
|
||||
}
|
||||
|
||||
.nonSensitiveContainer {
|
||||
border: 3px solid transparent;
|
||||
}
|
||||
|
||||
.hide {
|
||||
display: block;
|
||||
position: absolute;
|
||||
|
Loading…
Reference in New Issue
Block a user