mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-23 17:10:39 +01:00
wip
This commit is contained in:
parent
1eca9b9fbd
commit
8775d9f707
5 changed files with 11 additions and 56 deletions
|
@ -20,7 +20,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<i class="ti ti-repeat" style="margin-right: 4px;"></i>
|
||||
<I18n :src="i18n.ts.renotedBy" tag="span" :class="$style.renoteText">
|
||||
<template #user>
|
||||
<EmA v-user-preview="inEmbedPage ? undefined : note.userId" :class="$style.renoteUserName" :to="userPage(note.user)">
|
||||
<EmA v-user-preview="true ? undefined : note.userId" :class="$style.renoteUserName" :to="userPage(note.user)">
|
||||
<EmUserName :user="note.user"/>
|
||||
</EmA>
|
||||
</template>
|
||||
|
@ -61,7 +61,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
:author="appearNote.user"
|
||||
:nyaize="'respect'"
|
||||
:emojiUrls="appearNote.emojis"
|
||||
:enableEmojiMenu="!inEmbedPage"
|
||||
:enableEmojiMenu="!true"
|
||||
:enableEmojiMenuReaction="true"
|
||||
/>
|
||||
<div v-if="translating || translation" :class="$style.translation">
|
||||
|
@ -75,7 +75,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<div v-if="appearNote.files && appearNote.files.length > 0">
|
||||
<EmMediaList :mediaList="appearNote.files" :originalEntityUrl="`${url}/notes/${appearNote.id}`"/>
|
||||
</div>
|
||||
<EmPoll v-if="appearNote.poll" :noteId="appearNote.id" :poll="appearNote.poll" :readOnly="inEmbedPage" :class="$style.poll"/>
|
||||
<EmPoll v-if="appearNote.poll" :noteId="appearNote.id" :poll="appearNote.poll" :readOnly="true" :class="$style.poll"/>
|
||||
<div v-if="appearNote.renote" :class="$style.quote"><EmNoteSimple :note="appearNote.renote" :class="$style.quoteNote"/></div>
|
||||
<button v-if="isLong && collapsed" :class="$style.collapsed" class="_button" @click="collapsed = false">
|
||||
<span :class="$style.collapsedLabel">{{ i18n.ts.showMore }}</span>
|
||||
|
@ -151,7 +151,6 @@ const emit = defineEmits<{
|
|||
const inTimeline = inject<boolean>('inTimeline', false);
|
||||
const inChannel = inject('inChannel', null);
|
||||
const currentClip = inject<Ref<Misskey.entities.Clip> | null>('currentClip', null);
|
||||
const inEmbedPage = inject<boolean>('EMBED_PAGE', false);
|
||||
|
||||
const note = ref(deepClone(props.note));
|
||||
|
||||
|
|
|
@ -41,35 +41,23 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<script setup lang="ts">
|
||||
import { ref, computed, shallowRef, inject, onActivated } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import type { Paging } from '@/components/MkPagination.vue';
|
||||
import type { ParsedEmbedParams } from '@/embed-page.js';
|
||||
import EmNotes from '@/embed/components/EmNotes.vue';
|
||||
import XNotFound from '@/pages/not-found.vue';
|
||||
import EmTimelineContainer from '@/embed/components/EmTimelineContainer.vue';
|
||||
import type { Paging } from '@/components/MkPagination.vue';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { instance } from '@/instance.js';
|
||||
import { url, instanceName } from '@/config.js';
|
||||
import { scrollToTop } from '@/scripts/scroll.js';
|
||||
import { isLink } from '@/scripts/is-link.js';
|
||||
import { useRouter } from '@/router/supplier.js';
|
||||
import { defaultEmbedParams } from '@/scripts/embed-page.js';
|
||||
import type { ParsedEmbedParams } from '@/scripts/embed-page.js';
|
||||
import { defaultEmbedParams } from '@/embed-page.js';
|
||||
|
||||
const props = defineProps<{
|
||||
clipId: string;
|
||||
}>();
|
||||
|
||||
function redirectIfNotEmbedPage() {
|
||||
const inEmbedPage = inject<boolean>('EMBED_PAGE', false);
|
||||
|
||||
if (!inEmbedPage) {
|
||||
const router = useRouter();
|
||||
router.replace(`/clips/${props.clipId}`);
|
||||
}
|
||||
}
|
||||
|
||||
redirectIfNotEmbedPage();
|
||||
|
||||
onActivated(redirectIfNotEmbedPage);
|
||||
|
||||
const embedParams = inject<ParsedEmbedParams>('embedParams', defaultEmbedParams);
|
||||
|
|
|
@ -17,23 +17,11 @@ import * as Misskey from 'misskey-js';
|
|||
import EmNoteDetailed from '@/embed/components/EmNoteDetailed.vue';
|
||||
import XNotFound from '@/pages/not-found.vue';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { useRouter } from '@/router/supplier.js';
|
||||
|
||||
const props = defineProps<{
|
||||
noteId: string;
|
||||
}>();
|
||||
|
||||
function redirectIfNotEmbedPage() {
|
||||
const inEmbedPage = inject<boolean>('EMBED_PAGE', false);
|
||||
|
||||
if (!inEmbedPage) {
|
||||
const router = useRouter();
|
||||
router.replace(`/notes/${props.noteId}`);
|
||||
}
|
||||
}
|
||||
|
||||
redirectIfNotEmbedPage();
|
||||
|
||||
onActivated(redirectIfNotEmbedPage);
|
||||
|
||||
provide('EMBED_ORIGINAL_ENTITY_URL', `/notes/${props.noteId}`);
|
||||
|
|
|
@ -39,32 +39,22 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script setup lang="ts">
|
||||
import { computed, shallowRef, inject, onActivated } from 'vue';
|
||||
import type { Paging } from '@/components/MkPagination.vue';
|
||||
import type { ParsedEmbedParams } from '@/embed-page.js';
|
||||
import EmNotes from '@/embed/components/EmNotes.vue';
|
||||
import XNotFound from '@/pages/not-found.vue';
|
||||
import EmTimelineContainer from '@/embed/components/EmTimelineContainer.vue';
|
||||
import type { Paging } from '@/components/MkPagination.vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { instance } from '@/instance.js';
|
||||
import { url, instanceName } from '@/config.js';
|
||||
import { scrollToTop } from '@/scripts/scroll.js';
|
||||
import { isLink } from '@/scripts/is-link.js';
|
||||
import { useRouter } from '@/router/supplier.js';
|
||||
import { defaultEmbedParams } from '@/scripts/embed-page.js';
|
||||
import type { ParsedEmbedParams } from '@/scripts/embed-page.js';
|
||||
import { defaultEmbedParams } from '@/embed-page.js';
|
||||
|
||||
const props = defineProps<{
|
||||
tag: string;
|
||||
}>();
|
||||
|
||||
function redirectIfNotEmbedPage() {
|
||||
const inEmbedPage = inject<boolean>('EMBED_PAGE', false);
|
||||
|
||||
if (!inEmbedPage) {
|
||||
const router = useRouter();
|
||||
router.replace(`/tags/${props.tag}`);
|
||||
}
|
||||
}
|
||||
|
||||
redirectIfNotEmbedPage();
|
||||
|
||||
onActivated(redirectIfNotEmbedPage);
|
||||
|
|
|
@ -49,7 +49,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
import { ref, computed, shallowRef, inject, onActivated } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import type { Paging } from '@/components/MkPagination.vue';
|
||||
import type { ParsedEmbedParams } from '@/scripts/embed-page.js';
|
||||
import type { ParsedEmbedParams } from '@/embed-page.js';
|
||||
import EmNotes from '@/embed/components/EmNotes.vue';
|
||||
import XNotFound from '@/pages/not-found.vue';
|
||||
import EmTimelineContainer from '@/embed/components/EmTimelineContainer.vue';
|
||||
|
@ -59,22 +59,12 @@ import { instance } from '@/instance.js';
|
|||
import { url, instanceName } from '@/config.js';
|
||||
import { scrollToTop } from '@/scripts/scroll.js';
|
||||
import { isLink } from '@/scripts/is-link.js';
|
||||
import { useRouter } from '@/router/supplier.js';
|
||||
import { defaultEmbedParams } from '@/scripts/embed-page.js';
|
||||
import { defaultEmbedParams } from '@/embed-page.js';
|
||||
|
||||
const props = defineProps<{
|
||||
username: string;
|
||||
}>();
|
||||
|
||||
function redirectIfNotEmbedPage() {
|
||||
const inEmbedPage = inject<boolean>('EMBED_PAGE', false);
|
||||
|
||||
if (!inEmbedPage) {
|
||||
const router = useRouter();
|
||||
router.replace(`/@${props.username}`);
|
||||
}
|
||||
}
|
||||
|
||||
redirectIfNotEmbedPage();
|
||||
|
||||
onActivated(redirectIfNotEmbedPage);
|
||||
|
|
Loading…
Reference in a new issue