wip
This commit is contained in:
@@ -151,8 +151,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { defineAsyncComponent, computed, onMounted, onUnmounted, nextTick, watch, ref } from 'vue';
|
||||
import { defineAsyncComponent, computed, onMounted, onUnmounted, nextTick, watch, ref, inject } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { getScrollPosition } from '@@/js/scroll.js';
|
||||
import MkNote from '@/components/MkNote.vue';
|
||||
import MkFollowButton from '@/components/MkFollowButton.vue';
|
||||
import MkAccountMoved from '@/components/MkAccountMoved.vue';
|
||||
@@ -161,7 +162,6 @@ import MkTextarea from '@/components/MkTextarea.vue';
|
||||
import MkOmit from '@/components/MkOmit.vue';
|
||||
import MkInfo from '@/components/MkInfo.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import { getScrollPosition } from '@@/js/scroll.js';
|
||||
import { getUserMenu } from '@/scripts/get-user-menu.js';
|
||||
import number from '@/filters/number.js';
|
||||
import { userPage } from '@/filters/user.js';
|
||||
@@ -174,7 +174,9 @@ import { confetti } from '@/scripts/confetti.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { isFollowingVisibleForMe, isFollowersVisibleForMe } from '@/scripts/isFfVisibleForMe.js';
|
||||
import { useRouter } from '@/router/supplier.js';
|
||||
import { getStaticImageUrl } from '@/scripts/media-proxy.js';
|
||||
|
||||
const serverMetadata = inject('serverMetadata');
|
||||
const mediaProxy = inject('mediaProxy');
|
||||
|
||||
function calcAge(birthdate: string): number {
|
||||
const date = new Date(birthdate);
|
||||
@@ -224,7 +226,7 @@ const style = computed(() => {
|
||||
if (props.user.bannerUrl == null) return {};
|
||||
if (defaultStore.state.disableShowingAnimatedImages) {
|
||||
return {
|
||||
backgroundImage: `url(${ getStaticImageUrl(props.user.bannerUrl) })`,
|
||||
backgroundImage: `url(${ mediaProxy.getStaticImageUrl(props.user.bannerUrl) })`,
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
@@ -238,7 +240,7 @@ const age = computed(() => {
|
||||
});
|
||||
|
||||
function menu(ev: MouseEvent) {
|
||||
const { menu, cleanup } = getUserMenu(user.value, router);
|
||||
const { menu, cleanup } = getUserMenu({ serverMetadata }, user.value, router);
|
||||
os.popupMenu(menu, ev.currentTarget ?? ev.target).finally(cleanup);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user