forked from mirror/misskey
wip
This commit is contained in:
parent
3143cf388e
commit
1eca9b9fbd
@ -44,7 +44,6 @@ const props = defineProps<{
|
|||||||
}>();
|
}>();
|
||||||
|
|
||||||
const mock = inject<boolean>('mock', false);
|
const mock = inject<boolean>('mock', false);
|
||||||
const inEmbedPage = inject<boolean>('EMBED_PAGE', false);
|
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'reactionToggled', emoji: string, newCount: number): void;
|
(ev: 'reactionToggled', emoji: string, newCount: number): void;
|
||||||
@ -145,7 +144,7 @@ onMounted(() => {
|
|||||||
if (!props.isInitial) anime();
|
if (!props.isInitial) anime();
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!mock && !inEmbedPage) {
|
if (!mock) {
|
||||||
useTooltip(buttonEl, async (showing) => {
|
useTooltip(buttonEl, async (showing) => {
|
||||||
const reactions = await misskeyApiGet('notes/reactions', {
|
const reactions = await misskeyApiGet('notes/reactions', {
|
||||||
noteId: props.note.id,
|
noteId: props.note.id,
|
||||||
|
@ -32,8 +32,6 @@ const props = withDefaults(defineProps<{
|
|||||||
|
|
||||||
const behavior = props.behavior ?? inject<MkABehavior>('linkNavigationBehavior', null);
|
const behavior = props.behavior ?? inject<MkABehavior>('linkNavigationBehavior', null);
|
||||||
|
|
||||||
const inEmbedPage = inject<boolean>('EMBED_PAGE', false);
|
|
||||||
|
|
||||||
const el = shallowRef<HTMLElement>();
|
const el = shallowRef<HTMLElement>();
|
||||||
|
|
||||||
defineExpose({ $el: el });
|
defineExpose({ $el: el });
|
||||||
@ -51,8 +49,6 @@ const active = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function onContextmenu(ev) {
|
function onContextmenu(ev) {
|
||||||
if (inEmbedPage) return;
|
|
||||||
|
|
||||||
const selection = window.getSelection();
|
const selection = window.getSelection();
|
||||||
if (selection && selection.toString() !== '') return;
|
if (selection && selection.toString() !== '') return;
|
||||||
os.contextMenu([{
|
os.contextMenu([{
|
||||||
|
@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<component :is="link ? MkA : 'span'" v-user-preview="(preview && !inEmbedPage) ? user.id : undefined" v-bind="bound" class="_noSelect" :class="[$style.root, { [$style.animation]: animation, [$style.cat]: user.isCat, [$style.square]: squareAvatars }]" :style="{ color }" :title="acct(user)" @click="onClick">
|
<component :is="link ? MkA : 'span'" v-user-preview="preview ? user.id : undefined" v-bind="bound" class="_noSelect" :class="[$style.root, { [$style.animation]: animation, [$style.cat]: user.isCat, [$style.square]: squareAvatars }]" :style="{ color }" :title="acct(user)" @click="onClick">
|
||||||
<MkImgWithBlurhash :class="$style.inner" :src="url" :hash="user.avatarBlurhash" :cover="true" :onlyAvgColor="true"/>
|
<MkImgWithBlurhash :class="$style.inner" :src="url" :hash="user.avatarBlurhash" :cover="true" :onlyAvgColor="true"/>
|
||||||
<MkUserOnlineIndicator v-if="indicator" :class="$style.indicator" :user="user"/>
|
<MkUserOnlineIndicator v-if="indicator" :class="$style.indicator" :user="user"/>
|
||||||
<div v-if="user.isCat" :class="[$style.ears]">
|
<div v-if="user.isCat" :class="[$style.ears]">
|
||||||
@ -40,7 +40,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { watch, ref, computed, inject } from 'vue';
|
import { watch, ref, computed } from 'vue';
|
||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkImgWithBlurhash from '../MkImgWithBlurhash.vue';
|
import MkImgWithBlurhash from '../MkImgWithBlurhash.vue';
|
||||||
import MkA from './MkA.vue';
|
import MkA from './MkA.vue';
|
||||||
@ -50,8 +50,6 @@ import { acct, userPage } from '@/filters/user.js';
|
|||||||
import MkUserOnlineIndicator from '@/components/MkUserOnlineIndicator.vue';
|
import MkUserOnlineIndicator from '@/components/MkUserOnlineIndicator.vue';
|
||||||
import { defaultStore } from '@/store.js';
|
import { defaultStore } from '@/store.js';
|
||||||
|
|
||||||
const inEmbedPage = inject<boolean>('EMBED_PAGE', false);
|
|
||||||
|
|
||||||
const animation = ref(defaultStore.state.animation);
|
const animation = ref(defaultStore.state.animation);
|
||||||
const squareAvatars = ref(defaultStore.state.squareAvatars);
|
const squareAvatars = ref(defaultStore.state.squareAvatars);
|
||||||
const useBlurEffect = ref(defaultStore.state.useBlurEffect);
|
const useBlurEffect = ref(defaultStore.state.useBlurEffect);
|
||||||
|
@ -377,7 +377,6 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
|||||||
key: Math.random(),
|
key: Math.random(),
|
||||||
code: token.props.code,
|
code: token.props.code,
|
||||||
lang: token.props.lang ?? undefined,
|
lang: token.props.lang ?? undefined,
|
||||||
copyButton: true,
|
|
||||||
})];
|
})];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user