merge upstream
This commit is contained in:
@@ -4,14 +4,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<MkStickyContainer>
|
||||
<template #header><MkPageHeader :actions="headerActions" :displayBackButton="true" :tabs="headerTabs"/></template>
|
||||
<PageWithHeader :actions="headerActions" :displayBackButton="true" :tabs="headerTabs">
|
||||
<MkSpacer :contentMax="800">
|
||||
<Transition
|
||||
:enterActiveClass="defaultStore.state.animation ? $style.fadeEnterActive : ''"
|
||||
:leaveActiveClass="defaultStore.state.animation ? $style.fadeLeaveActive : ''"
|
||||
:enterFromClass="defaultStore.state.animation ? $style.fadeEnterFrom : ''"
|
||||
:leaveToClass="defaultStore.state.animation ? $style.fadeLeaveTo : ''"
|
||||
:enterActiveClass="prefer.s.animation ? $style.fadeEnterActive : ''"
|
||||
:leaveActiveClass="prefer.s.animation ? $style.fadeLeaveActive : ''"
|
||||
:enterFromClass="prefer.s.animation ? $style.fadeEnterFrom : ''"
|
||||
:leaveToClass="prefer.s.animation ? $style.fadeLeaveTo : ''"
|
||||
mode="out-in"
|
||||
>
|
||||
<div v-if="page" :key="page.id" class="_gaps">
|
||||
@@ -94,17 +93,18 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<MkLoading v-else/>
|
||||
</Transition>
|
||||
</MkSpacer>
|
||||
</MkStickyContainer>
|
||||
</PageWithHeader>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, watch, ref, defineAsyncComponent } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { url } from '@@/js/config.js';
|
||||
import type { MenuItem } from '@/types/menu.js';
|
||||
import XPage from '@/components/page/page.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { url } from '@@/js/config.js';
|
||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||
import MkMediaImage from '@/components/MkMediaImage.vue';
|
||||
import MkImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
|
||||
import MkFollowButton from '@/components/MkFollowButton.vue';
|
||||
@@ -112,16 +112,16 @@ import MkContainer from '@/components/MkContainer.vue';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
import MkPagePreview from '@/components/MkPagePreview.vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { pageViewInterruptors, defaultStore } from '@/store.js';
|
||||
import { deepClone } from '@/scripts/clone.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { isSupportShare } from '@/scripts/navigator.js';
|
||||
import { definePage } from '@/page.js';
|
||||
import { deepClone } from '@/utility/clone.js';
|
||||
import { $i } from '@/i.js';
|
||||
import { isSupportShare } from '@/utility/navigator.js';
|
||||
import { instance } from '@/instance.js';
|
||||
import { getStaticImageUrl } from '@/scripts/media-proxy.js';
|
||||
import { copyToClipboard } from '@/scripts/copy-to-clipboard.js';
|
||||
import { useRouter } from '@/router/supplier.js';
|
||||
import type { MenuItem } from '@/types/menu.js';
|
||||
import { getStaticImageUrl } from '@/utility/media-proxy.js';
|
||||
import { copyToClipboard } from '@/utility/copy-to-clipboard.js';
|
||||
import { useRouter } from '@/router.js';
|
||||
import { prefer } from '@/preferences.js';
|
||||
import { getPluginHandlers } from '@/plugin.js';
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
@@ -150,6 +150,7 @@ function fetchPage() {
|
||||
page.value = _page;
|
||||
|
||||
// plugin
|
||||
const pageViewInterruptors = getPluginHandlers('page_view_interruptor');
|
||||
if (pageViewInterruptors.length > 0) {
|
||||
let result = deepClone(_page);
|
||||
for (const interruptor of pageViewInterruptors) {
|
||||
@@ -188,7 +189,6 @@ function copyLink() {
|
||||
if (!page.value) return;
|
||||
|
||||
copyToClipboard(`${url}/@${page.value.user.username}/pages/${page.value.name}`);
|
||||
os.success();
|
||||
}
|
||||
|
||||
function shareWithNote() {
|
||||
@@ -318,7 +318,7 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(() => ({
|
||||
definePage(() => ({
|
||||
title: page.value ? page.value.title || page.value.name : i18n.ts.pages,
|
||||
...page.value ? {
|
||||
avatar: page.value.user,
|
||||
|
||||
Reference in New Issue
Block a user