mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-11-27 14:28:53 +09:00
doubleClickToShow
This commit is contained in:
parent
6c4ae6b462
commit
e75ae15b08
@ -173,6 +173,7 @@ pinnedNote: "Pinned note"
|
||||
pinned: "Pin to profile"
|
||||
you: "You"
|
||||
clickToShow: "Click to show"
|
||||
doubleClickToShow: "Double click to show"
|
||||
sensitive: "Sensitive"
|
||||
add: "Add"
|
||||
reaction: "Reactions"
|
||||
|
1
locales/index.d.ts
vendored
1
locales/index.d.ts
vendored
@ -176,6 +176,7 @@ export interface Locale {
|
||||
"pinned": string;
|
||||
"you": string;
|
||||
"clickToShow": string;
|
||||
"doubleClickToShow": string;
|
||||
"sensitive": string;
|
||||
"add": string;
|
||||
"reaction": string;
|
||||
|
@ -173,6 +173,7 @@ pinnedNote: "ピン留めされたノート"
|
||||
pinned: "ピン留め"
|
||||
you: "あなた"
|
||||
clickToShow: "クリックして表示"
|
||||
doubleClickToShow: "ダブルクリックして表示"
|
||||
sensitive: "センシティブ"
|
||||
add: "追加"
|
||||
reaction: "リアクション"
|
||||
|
@ -173,6 +173,7 @@ pinnedNote: "고정해놓은 노트"
|
||||
pinned: "프로필에 고정"
|
||||
you: "나"
|
||||
clickToShow: "클릭하여 보기"
|
||||
doubleClickToShow: "두 번 탭하여 보기"
|
||||
sensitive: "열람 주의"
|
||||
add: "추가"
|
||||
reaction: "리액션"
|
||||
|
@ -38,7 +38,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<div :class="$style.hiddenTextWrapper">
|
||||
<b v-if="image.isSensitive" style="display: block;"><i class="ti ti-eye-exclamation"></i> {{ i18n.ts.sensitive }}{{ defaultStore.state.enableDataSaverMode ? ` (${i18n.ts.image}${image.size ? ' ' + bytes(image.size) : ''})` : '' }}</b>
|
||||
<b v-else style="display: block;"><i class="ti ti-photo"></i> {{ defaultStore.state.enableDataSaverMode && image.size ? bytes(image.size) : i18n.ts.image }}</b>
|
||||
<span v-if="controls" style="display: block;">{{ i18n.ts.clickToShow }}</span>
|
||||
<span v-if="controls" style="display: block;">{{ clickToShowMessage }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -91,6 +91,12 @@ const url = $computed(() => (props.raw || defaultStore.state.loadRawImages)
|
||||
: props.image.thumbnailUrl,
|
||||
);
|
||||
|
||||
let clickToShowMessage = $computed(() =>
|
||||
defaultStore.state.nsfwOpenBehavior === 'click' ? i18n.ts.clickToShow
|
||||
: defaultStore.state.nsfwOpenBehavior === 'doubleClick' ? i18n.ts.doubleClickToShow
|
||||
: ''
|
||||
);
|
||||
|
||||
function onClick(ev: MouseEvent) {
|
||||
if (!props.controls) {
|
||||
return;
|
||||
|
@ -9,7 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<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>
|
||||
<b v-else style="display: block;"><i class="ti ti-movie"></i> {{ defaultStore.state.enableDataSaverMode && video.size ? bytes(video.size) : i18n.ts.video }}</b>
|
||||
<span>{{ i18n.ts.clickToShow }}</span>
|
||||
<span>{{ clickToShowMessage }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else :class="[$style.visible, (video.isSensitive && defaultStore.state.highlightSensitiveMedia) && $style.sensitiveContainer]" data-is-hidden="false">
|
||||
@ -46,6 +46,12 @@ const props = defineProps<{
|
||||
|
||||
const hide = ref((defaultStore.state.nsfw === 'force' || defaultStore.state.enableDataSaverMode) ? true : (props.video.isSensitive && defaultStore.state.nsfw !== 'ignore'));
|
||||
|
||||
let clickToShowMessage = $computed(() =>
|
||||
defaultStore.state.nsfwOpenBehavior === 'click' ? i18n.ts.clickToShow
|
||||
: defaultStore.state.nsfwOpenBehavior === 'doubleClick' ? i18n.ts.doubleClickToShow
|
||||
: ''
|
||||
);
|
||||
|
||||
function onClick(ev: MouseEvent) {
|
||||
if (!hide.value) return;
|
||||
if (defaultStore.state.nsfwOpenBehavior === 'doubleClick') {
|
||||
|
Loading…
Reference in New Issue
Block a user