diff --git a/packages/frontend/src/components/global/CPAvatar-Friendly.vue b/packages/frontend/src/components/global/CPAvatar-Friendly.vue index e3581e3a26..3485286917 100644 --- a/packages/frontend/src/components/global/CPAvatar-Friendly.vue +++ b/packages/frontend/src/components/global/CPAvatar-Friendly.vue @@ -39,8 +39,8 @@ SPDX-License-Identifier: AGPL-3.0-only import { onMounted, onUnmounted, watch, ref, computed } from 'vue'; import * as Misskey from 'cherrypick-js'; import { extractAvgColorFromBlurhash } from '@@/js/extract-avg-color-from-blurhash.js'; -import MkImgWithBlurhash from '@/components/MkImgWithBlurhash.vue'; -import MkA from '@/components/global/MkA.vue'; +import MkImgWithBlurhash from '../MkImgWithBlurhash.vue'; +import MkA from './MkA.vue'; import { getStaticImageUrl } from '@/scripts/media-proxy.js'; import { acct, userPage } from '@/filters/user.js'; import { defaultStore } from '@/store.js'; diff --git a/packages/frontend/src/components/global/CPPageHeader.vue b/packages/frontend/src/components/global/CPPageHeader.vue index 866a45059c..437d005f93 100644 --- a/packages/frontend/src/components/global/CPPageHeader.vue +++ b/packages/frontend/src/components/global/CPPageHeader.vue @@ -197,18 +197,18 @@ onMounted(() => { // https://developer.mozilla.org/ja/docs/Web/API/HTMLElement/offsetWidth#%E5%80%A4 const parentRect = tabEl.parentElement.getBoundingClientRect(); const rect = tabEl.getBoundingClientRect(); - tabHighlightEl.value.style.width = rect.width + 'px'; - tabHighlightEl.value.style.left = (rect.left - parentRect.left) + 'px'; + tabHighlightEl.value.style.width = `${rect.width}px`; + tabHighlightEl.value.style.left = `${rect.left - parentRect.left}px`; } }); }, { immediate: true, }); - if (el.value && el.value.parentElement) { + if (el.value?.parentElement) { narrow.value = el.value.parentElement.offsetWidth < 500; ro = new ResizeObserver((entries, observer) => { - if (el.value && el.value.parentElement && document.body.contains(el.value as HTMLElement)) { + if (el.value?.parentElement && document.body.contains(el.value as HTMLElement)) { narrow.value = el.value.parentElement.offsetWidth < 500; } });