1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-07-25 23:44:57 +02:00

Merge branch 'improve-image-viewer' of https://github.com/misskey-dev/misskey into improve-image-viewer

This commit is contained in:
kakkokari-gtyih
2026-07-12 11:10:28 +09:00
6 changed files with 11 additions and 11 deletions

View File

@@ -21,7 +21,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import MkKeyValue from '@/components/MkKeyValue.vue';
import { i18n } from '@/i18n.js';
import type { Content } from '@/components/MkImageGallery.item.vue';
import type { Content } from '@/components/MkLightbox.item.vue';
const props = defineProps<{
content: Content;

View File

@@ -179,9 +179,10 @@ export function calculateSourceTransform({
<script lang="ts" setup>
import { computed, nextTick, ref, useTemplateRef, markRaw, watch, provide } from 'vue';
import { DI } from '@/di.js';
import MkVideoControl from './MkVideoControl.vue';
import XFileInfo from './MkImageGallery.item.fileinfo.vue';
import XFileInfo from './MkLightbox.item.fileinfo.vue';
import type { MenuItem } from '@/types/menu.js';
import { DI } from '@/di.js';
import * as os from '@/os.js';
import { prefer } from '@/preferences.js';
import { i18n } from '@/i18n.js';
@@ -190,7 +191,6 @@ import { makeDoubleTapDetector } from '@/utility/double-tap.js';
import { deviceKind } from '@/utility/device-kind.js';
import { isTouchUsing } from '@/utility/touch.js';
import { getFileMenu } from '@/utility/get-file-menu.js';
import type { MenuItem } from '@/types/menu.js';
const props = withDefaults(defineProps<{
content: Content;
@@ -213,7 +213,7 @@ const mainEl = useTemplateRef('mainEl');
const videoEl = useTemplateRef('videoEl');
const videoControl = useTemplateRef('videoControl');
provide(DI.mkImageGalleryItemVideoEl, videoEl);
provide(DI.mkLightboxItemVideoEl, videoEl);
const originalContentLoaded = ref(false);
const thumbnailContentLoaded = ref(false);

View File

@@ -49,8 +49,8 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { ref, watch, nextTick, onBeforeUnmount, onMounted } from 'vue';
import XItem from './MkImageGallery.item.vue';
import type { Content } from './MkImageGallery.item.vue';
import XItem from './MkLightbox.item.vue';
import type { Content } from './MkLightbox.item.vue';
import type { Keymap } from '@/utility/hotkey.js';
import * as os from '@/os.js';
import { prefer } from '@/preferences.js';

View File

@@ -47,13 +47,13 @@ SPDX-License-Identifier: AGPL-3.0-only
import { computed, markRaw, onMounted, onUnmounted, useTemplateRef } from 'vue';
import * as Misskey from 'misskey-js';
import { FILE_TYPE_BROWSERSAFE } from '@@/js/const.js';
import type { Content } from '@/components/MkLightbox.item.vue';
import XBanner from '@/components/MkMediaBanner.vue';
import XImage from '@/components/MkMediaImage.vue';
import XVideo from '@/components/MkMediaVideo.vue';
import * as os from '@/os.js';
import { prefer } from '@/preferences.js';
import { genId } from '@/utility/id.js';
import type { Content } from '@/components/MkImageGallery.item.vue';
const props = defineProps<{
mediaList: Misskey.entities.DriveFile[];
@@ -144,7 +144,7 @@ async function openGallery(id?: string) {
sourceElement: getElementByMarker(`${markerId}:${media.id}`),
}));
const { dispose } = await os.popupAsyncWithDialog(import('@/components/MkImageGallery.vue').then(x => x.default), {
const { dispose } = await os.popupAsyncWithDialog(import('@/components/MkLightbox.vue').then(x => x.default), {
defaultIndex: contents.findIndex(conten => conten.id === id),
contents: contents,
}, {

View File

@@ -48,7 +48,7 @@ import * as os from '@/os.js';
import hasAudio from '@/utility/media-has-audio.js';
import MkMediaRange from '@/components/MkMediaRange.vue';
const videoEl = inject(DI.mkImageGalleryItemVideoEl, shallowRef<HTMLVideoElement | null>(null));
const videoEl = inject(DI.mkLightboxItemVideoEl, shallowRef<HTMLVideoElement | null>(null));
// Menu
const menuShowing = ref(false);

View File

@@ -19,5 +19,5 @@ export const DI = {
inModal: Symbol() as InjectionKey<boolean>,
inAppSearchMarkerId: Symbol() as InjectionKey<Ref<string | null>>,
inChannel: Symbol() as InjectionKey<ComputedRef<string | null> | null>, // 現在開いているチャンネルのID
mkImageGalleryItemVideoEl: Symbol() as InjectionKey<Ref<HTMLVideoElement | null>>,
mkLightboxItemVideoEl: Symbol() as InjectionKey<Ref<HTMLVideoElement | null>>,
};