This commit is contained in:
syuilo
2024-09-01 08:44:55 +09:00
parent e7171d9ab2
commit aab1c76981
117 changed files with 587 additions and 568 deletions

View File

@@ -51,9 +51,8 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts" setup>
import { watch, ref, computed } from 'vue';
import { watch, ref, computed, inject } from 'vue';
import * as Misskey from 'misskey-js';
import { getStaticImageUrl } from '@/scripts/media-proxy.js';
import bytes from '@/filters/bytes.js';
import ImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
import { defaultStore } from '@/store.js';
@@ -61,6 +60,8 @@ import { i18n } from '@/i18n.js';
import * as os from '@/os.js';
import { $i, iAmModerator } from '@/account.js';
const mediaProxy = inject('mediaProxy');
const props = withDefaults(defineProps<{
image: Misskey.entities.DriveFile;
raw?: boolean;
@@ -79,7 +80,7 @@ const darkMode = ref<boolean>(defaultStore.state.darkMode);
const url = computed(() => (props.raw || defaultStore.state.loadRawImages)
? props.image.url
: defaultStore.state.disableShowingAnimatedImages
? getStaticImageUrl(props.image.url)
? mediaProxy.getStaticImageUrl(props.image.url)
: props.image.thumbnailUrl,
);