fix linter issues
All checks were successful
Lint / pnpm_install (pull_request) Successful in 25s
Test (production install and build) / production (22.x) (pull_request) Successful in 58s
Lint / lint (misskey-js) (pull_request) Successful in 32s
Test (frontend) / vitest (22.x) (pull_request) Successful in 1m14s
Lint / typecheck (misskey-js) (pull_request) Successful in 33s
Lint / lint (sw) (pull_request) Successful in 1m33s
Lint / lint (backend) (pull_request) Successful in 1m37s
Lint / typecheck (backend) (pull_request) Successful in 1m39s
Lint / lint (frontend) (pull_request) Successful in 7m28s
All checks were successful
Lint / pnpm_install (pull_request) Successful in 25s
Test (production install and build) / production (22.x) (pull_request) Successful in 58s
Lint / lint (misskey-js) (pull_request) Successful in 32s
Test (frontend) / vitest (22.x) (pull_request) Successful in 1m14s
Lint / typecheck (misskey-js) (pull_request) Successful in 33s
Lint / lint (sw) (pull_request) Successful in 1m33s
Lint / lint (backend) (pull_request) Successful in 1m37s
Lint / typecheck (backend) (pull_request) Successful in 1m39s
Lint / lint (frontend) (pull_request) Successful in 7m28s
This commit is contained in:
parent
78adbebb18
commit
38fda7790e
6 changed files with 15 additions and 12 deletions
|
@ -39,7 +39,7 @@ import XVideo from '@/components/MkMediaVideo.vue';
|
|||
import * as os from '@/os.js';
|
||||
import { FILE_TYPE_BROWSERSAFE } from '@/const.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import {$i} from "@/account";
|
||||
import { $i } from "@/account";
|
||||
|
||||
const props = defineProps<{
|
||||
mediaList: Misskey.entities.DriveFile[];
|
||||
|
@ -92,10 +92,11 @@ async function calcAspectRatio() {
|
|||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (($i ? defaultStore.state.markIncomingMediaInCwedPostAsSensitive : true))
|
||||
if (($i ? defaultStore.state.markIncomingMediaInCwedPostAsSensitive : true)) {
|
||||
props.mediaList.forEach(media => {
|
||||
media.isSensitive = props.isNoteSensitive
|
||||
})
|
||||
media.isSensitive = props.isNoteSensitive;
|
||||
});
|
||||
}
|
||||
|
||||
calcAspectRatio();
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<MkPoll v-if="appearNote.poll" :noteId="appearNote.id" :poll="appearNote.poll" :class="$style.poll"/>
|
||||
<div v-if="isEnabledUrlPreview">
|
||||
|
|
|
@ -92,7 +92,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<MkPoll v-if="appearNote.poll" ref="pollViewer" :noteId="appearNote.id" :poll="appearNote.poll" :class="$style.poll"/>
|
||||
<div v-if="isEnabledUrlPreview">
|
||||
|
|
|
@ -14,7 +14,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</div>
|
||||
<details v-if="note.files && note.files.length > 0">
|
||||
<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 v-if="note.poll">
|
||||
<summary>{{ i18n.ts.poll }}</summary>
|
||||
|
|
|
@ -33,8 +33,8 @@ import XVideo from '@/components/MkMediaVideo.vue';
|
|||
import XImage from '@/components/MkMediaImage.vue';
|
||||
import XBanner from '@/components/MkMediaBanner.vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import {$i} from "@/account";
|
||||
import {defaultStore} from "@/store";
|
||||
import { $i } from "@/account";
|
||||
import { defaultStore } from "@/store";
|
||||
|
||||
const props = defineProps<{
|
||||
user: Misskey.entities.UserDetailed;
|
||||
|
@ -54,8 +54,10 @@ onMounted(() => {
|
|||
}).then(notes => {
|
||||
for (const note of notes) {
|
||||
for (let file of note.files) {
|
||||
if (($i ? defaultStore.state.markIncomingMediaInCwedPostAsSensitive : true))
|
||||
file.isSensitive = note.cw !== null
|
||||
if (($i ? defaultStore.state.markIncomingMediaInCwedPostAsSensitive : true)) {
|
||||
file.isSensitive = note.cw !== null;
|
||||
}
|
||||
|
||||
medias.value.push({
|
||||
note,
|
||||
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>
|
||||
</div>
|
||||
<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 v-if="note.poll">
|
||||
<MkPoll :noteId="note.id" :poll="note.poll" :readOnly="true"/>
|
||||
|
|
Loading…
Reference in a new issue