Skip to content

Commit

Permalink
fix storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
noridev committed Jan 8, 2025
1 parent 4275ff9 commit b0dea2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/frontend/src/components/global/CPAvatar-Friendly.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
8 changes: 4 additions & 4 deletions packages/frontend/src/components/global/CPPageHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
});
Expand Down

0 comments on commit b0dea2f

Please sign in to comment.