mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-11-24 15:16:25 +09:00
(add) highlight sensitive image
This commit is contained in:
parent
934e4be658
commit
d951b67d82
1
locales/index.d.ts
vendored
1
locales/index.d.ts
vendored
@ -713,6 +713,7 @@ export interface Locale {
|
||||
"alwaysMarkSensitive": string;
|
||||
"loadRawImages": string;
|
||||
"disableShowingAnimatedImages": string;
|
||||
"highlightSensitiveImages": string;
|
||||
"verificationEmailSent": string;
|
||||
"notSet": string;
|
||||
"emailVerified": string;
|
||||
|
@ -710,6 +710,7 @@ lockedAccountInfo: "フォローを承認制にしても、ノートの公開範
|
||||
alwaysMarkSensitive: "デフォルトでメディアをセンシティブ設定にする"
|
||||
loadRawImages: "添付画像のサムネイルをオリジナル画質にする"
|
||||
disableShowingAnimatedImages: "アニメーション画像を再生しない"
|
||||
highlightSensitiveImages: "センシティブな添付画像を目立たせる"
|
||||
verificationEmailSent: "確認のメールを送信しました。メールに記載されたリンクにアクセスして、設定を完了してください。"
|
||||
notSet: "未設定"
|
||||
emailVerified: "メールアドレスが確認されました"
|
||||
|
@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div :class="hide ? $style.hidden : $style.visible" :style="darkMode ? '--c: rgb(255 255 255 / 2%);' : '--c: rgb(0 0 0 / 2%);'" @click="onclick">
|
||||
<div :class="[hide ? $style.hidden : $style.visible, (image.isSensitive && defaultStore.state.highlightSensitiveImages) ? $style.sensitive : $style.nonSensitive]" :style="darkMode ? '--c: rgb(255 255 255 / 2%);' : '--c: rgb(0 0 0 / 2%);'" @click="onclick">
|
||||
<component
|
||||
:is="disableImageLink ? 'div' : 'a'"
|
||||
v-bind="disableImageLink ? {
|
||||
@ -26,7 +26,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
:title="image.comment || image.name"
|
||||
:width="image.properties.width"
|
||||
:height="image.properties.height"
|
||||
:style="hide ? 'filter: brightness(0.5);' : null"
|
||||
:style="hide ? 'filter: brightness(0.7);' : null"
|
||||
/>
|
||||
</component>
|
||||
<template v-if="hide">
|
||||
@ -124,6 +124,14 @@ function showMenu(ev: MouseEvent) {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sensitive {
|
||||
border: 3px solid var(--warn);
|
||||
}
|
||||
|
||||
.nonSensitive {
|
||||
border: 3px solid transparent;
|
||||
}
|
||||
|
||||
.hiddenText {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
|
@ -51,6 +51,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<MkSwitch v-if="advancedMfm" v-model="animatedMfm">{{ i18n.ts.enableAnimatedMfm }}</MkSwitch>
|
||||
<MkSwitch v-model="showGapBetweenNotesInTimeline">{{ i18n.ts.showGapBetweenNotesInTimeline }}</MkSwitch>
|
||||
<MkSwitch v-model="loadRawImages">{{ i18n.ts.loadRawImages }}</MkSwitch>
|
||||
<MkSwitch v-model="highlightSensitiveImages">{{ i18n.ts.highlightSensitiveImages }}</MkSwitch>
|
||||
<MkSwitch v-model="useReactionPickerForContextMenu">{{ i18n.ts.useReactionPickerForContextMenu }}</MkSwitch>
|
||||
<MkRadios v-model="reactionsDisplaySize">
|
||||
<template #label>{{ i18n.ts.reactionsDisplaySize }}</template>
|
||||
@ -233,6 +234,7 @@ const disableDrawer = computed(defaultStore.makeGetterSetter('disableDrawer'));
|
||||
const disableShowingAnimatedImages = computed(defaultStore.makeGetterSetter('disableShowingAnimatedImages'));
|
||||
const forceShowAds = computed(defaultStore.makeGetterSetter('forceShowAds'));
|
||||
const loadRawImages = computed(defaultStore.makeGetterSetter('loadRawImages'));
|
||||
const highlightSensitiveImages = computed(defaultStore.makeGetterSetter('highlightSensitiveImages'));
|
||||
const enableDataSaverMode = computed(defaultStore.makeGetterSetter('enableDataSaverMode'));
|
||||
const imageNewTab = computed(defaultStore.makeGetterSetter('imageNewTab'));
|
||||
const nsfw = computed(defaultStore.makeGetterSetter('nsfw'));
|
||||
@ -281,6 +283,7 @@ watch([
|
||||
overridedDeviceKind,
|
||||
mediaListWithOneImageAppearance,
|
||||
reactionsDisplaySize,
|
||||
highlightSensitiveImages,
|
||||
], async () => {
|
||||
await reloadAsk();
|
||||
});
|
||||
|
@ -184,6 +184,10 @@ export const defaultStore = markRaw(new Storage('base', {
|
||||
where: 'device',
|
||||
default: 'respect' as 'respect' | 'force' | 'ignore',
|
||||
},
|
||||
highlightSensitiveImages: {
|
||||
where: 'device',
|
||||
default: false,
|
||||
},
|
||||
animation: {
|
||||
where: 'device',
|
||||
default: !window.matchMedia('(prefers-reduced-motion)').matches,
|
||||
|
Loading…
Reference in New Issue
Block a user