diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-10-10 19:49:25 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-10-10 19:49:25 +0900 |
| commit | 51b6a012a55eba9c0e902f6034cb1ded27aa9299 (patch) | |
| tree | 81ed6f74120c66e365101fa8afa66c0625512083 | |
| parent | Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff) | |
| download | misskey-51b6a012a55eba9c0e902f6034cb1ded27aa9299.tar.gz misskey-51b6a012a55eba9c0e902f6034cb1ded27aa9299.tar.bz2 misskey-51b6a012a55eba9c0e902f6034cb1ded27aa9299.zip | |
fix(frontend): ユーザープロフィールページでセンシティブなメディアが隠されない問題を修正
| -rw-r--r-- | packages/frontend/src/pages/user/index.files.vue | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/packages/frontend/src/pages/user/index.files.vue b/packages/frontend/src/pages/user/index.files.vue index 205da5071d..43d6d91fc9 100644 --- a/packages/frontend/src/pages/user/index.files.vue +++ b/packages/frontend/src/pages/user/index.files.vue @@ -10,15 +10,18 @@ SPDX-License-Identifier: AGPL-3.0-only <div :class="$style.root"> <MkLoading v-if="fetching"/> <div v-if="!fetching && files.length > 0" :class="$style.stream"> - <MkA - v-for="file in files" - :key="file.note.id + file.file.id" - :class="$style.img" - :to="notePage(file.note)" - > - <!-- TODO: 画像以外のファイルに対応 --> - <ImgWithBlurhash :hash="file.file.blurhash" :src="thumbnail(file.file)" :title="file.file.name"/> - </MkA> + <template v-for="file in files" :key="file.note.id + file.file.id"> + <div v-if="file.file.isSensitive && !showingFiles.includes(file.file.id)" :class="$style.sensitive" @click="showingFiles.push(file.file.id)"> + <div> + <div><i class="ti ti-eye-exclamation"></i> {{ i18n.ts.sensitive }}</div> + <div>{{ i18n.ts.clickToShow }}</div> + </div> + </div> + <MkA v-else :class="$style.img" :to="notePage(file.note)"> + <!-- TODO: 画像以外のファイルに対応 --> + <ImgWithBlurhash :hash="file.file.blurhash" :src="thumbnail(file.file)" :title="file.file.name"/> + </MkA> + </template> </div> <p v-if="!fetching && files.length == 0" :class="$style.empty">{{ i18n.ts.nothing }}</p> </div> @@ -45,6 +48,7 @@ let files = $ref<{ note: Misskey.entities.Note; file: Misskey.entities.DriveFile; }[]>([]); +let showingFiles = $ref<string[]>([]); function thumbnail(image: Misskey.entities.DriveFile): string { return defaultStore.state.disableShowingAnimatedImages @@ -94,4 +98,9 @@ onMounted(() => { padding: 16px; text-align: center; } + +.sensitive { + display: grid; + place-items: center; +} </style> |