[Frontend] Incoming media that isnt marked as sensitive but is from a cwed post is now sensitve #74
6 changed files with 15 additions and 12 deletions
|
@ -92,10 +92,11 @@ async function calcAspectRatio() {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (($i ? defaultStore.state.markIncomingMediaInCwedPostAsSensitive : true))
|
if (($i ? defaultStore.state.markIncomingMediaInCwedPostAsSensitive : true)) {
|
||||||
props.mediaList.forEach(media => {
|
props.mediaList.forEach(media => {
|
||||||
media.isSensitive = props.isNoteSensitive
|
media.isSensitive = props.isNoteSensitive;
|
||||||
})
|
});
|
||||||
|
}
|
||||||
|
|
||||||
calcAspectRatio();
|
calcAspectRatio();
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="appearNote.files && appearNote.files.length > 0">
|
<div v-if="appearNote.files && appearNote.files.length > 0">
|
||||||
<MkMediaList :mediaList="appearNote.files" :user="appearNote.user" :is-note-sensitive="note.cw"/>
|
<MkMediaList :mediaList="appearNote.files" :user="appearNote.user" :isNoteSensitive="note.cw"/>
|
||||||
</div>
|
</div>
|
||||||
<MkPoll v-if="appearNote.poll" :noteId="appearNote.id" :poll="appearNote.poll" :class="$style.poll"/>
|
<MkPoll v-if="appearNote.poll" :noteId="appearNote.id" :poll="appearNote.poll" :class="$style.poll"/>
|
||||||
<div v-if="isEnabledUrlPreview">
|
<div v-if="isEnabledUrlPreview">
|
||||||
|
|
|
@ -92,7 +92,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="appearNote.files && appearNote.files.length > 0">
|
<div v-if="appearNote.files && appearNote.files.length > 0">
|
||||||
<MkMediaList :mediaList="appearNote.files" :user="appearNote.user" :is-note-sensitive="note.cw"/>
|
<MkMediaList :mediaList="appearNote.files" :user="appearNote.user" :isNoteSensitive="note.cw"/>
|
||||||
</div>
|
</div>
|
||||||
<MkPoll v-if="appearNote.poll" ref="pollViewer" :noteId="appearNote.id" :poll="appearNote.poll" :class="$style.poll"/>
|
<MkPoll v-if="appearNote.poll" ref="pollViewer" :noteId="appearNote.id" :poll="appearNote.poll" :class="$style.poll"/>
|
||||||
<div v-if="isEnabledUrlPreview">
|
<div v-if="isEnabledUrlPreview">
|
||||||
|
|
|
@ -14,7 +14,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</div>
|
</div>
|
||||||
<details v-if="note.files && note.files.length > 0">
|
<details v-if="note.files && note.files.length > 0">
|
||||||
<summary>({{ i18n.tsx.withNFiles({ n: note.files.length }) }})</summary>
|
<summary>({{ i18n.tsx.withNFiles({ n: note.files.length }) }})</summary>
|
||||||
<MkMediaList :mediaList="note.files" :user="note.user" :is-note-sensitive="note.cw"/>
|
<MkMediaList :mediaList="note.files" :user="note.user" :isNoteSensitive="note.cw"/>
|
||||||
</details>
|
</details>
|
||||||
<details v-if="note.poll">
|
<details v-if="note.poll">
|
||||||
<summary>{{ i18n.ts.poll }}</summary>
|
<summary>{{ i18n.ts.poll }}</summary>
|
||||||
|
|
|
@ -54,8 +54,10 @@ onMounted(() => {
|
||||||
}).then(notes => {
|
}).then(notes => {
|
||||||
for (const note of notes) {
|
for (const note of notes) {
|
||||||
for (let file of note.files) {
|
for (let file of note.files) {
|
||||||
if (($i ? defaultStore.state.markIncomingMediaInCwedPostAsSensitive : true))
|
if (($i ? defaultStore.state.markIncomingMediaInCwedPostAsSensitive : true)) {
|
||||||
file.isSensitive = note.cw !== null
|
file.isSensitive = note.cw !== null;
|
||||||
|
}
|
||||||
|
|
||||||
medias.value.push({
|
medias.value.push({
|
||||||
note,
|
note,
|
||||||
file,
|
file,
|
||||||
|
|
|
@ -14,7 +14,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkA v-if="note.renoteId" class="rp" :to="`/notes/${note.renoteId}`">RN: ...</MkA>
|
<MkA v-if="note.renoteId" class="rp" :to="`/notes/${note.renoteId}`">RN: ...</MkA>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="note.files.length > 0" :class="$style.richcontent">
|
<div v-if="note.files.length > 0" :class="$style.richcontent">
|
||||||
<MkMediaList :mediaList="note.files" :user="note.user" :is-note-sensitive="note.cw"/>
|
<MkMediaList :mediaList="note.files" :user="note.user" :isNoteSensitive="note.cw"/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="note.poll">
|
<div v-if="note.poll">
|
||||||
<MkPoll :noteId="note.id" :poll="note.poll" :readOnly="true"/>
|
<MkPoll :noteId="note.id" :poll="note.poll" :readOnly="true"/>
|
||||||
|
|
Loading…
Reference in a new issue