Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about#emojisでcontent-visibilityを指定 #361

Merged
merged 1 commit into from
Dec 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions packages/frontend/src/pages/about.emojis.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkFoldableSection v-for="category in customEmojiCategories" v-once :key="category">
<template #header>{{ category || i18n.ts.other }}</template>
<div :class="$style.emojis">
<XEmoji v-for="emoji in customEmojis.filter(e => e.category === category)" :key="emoji.name" :emoji="emoji"/>
<XEmoji v-for="emoji in customEmojis.filter(e => e.category === category)" :key="emoji.name" :emoji="emoji" :class="{ [$style.skipRender]: defaultStore.state.skipNoteRender }"/>
</div>
</MkFoldableSection>

<MkFoldableSection v-once>
<template #header>{{ i18n.ts.other }}</template>
<div :class="$style.emojis">
<XEmoji v-for="emoji in customEmojis.filter(e => e.category === null)" :key="emoji.name" :emoji="emoji"/>
<XEmoji v-for="emoji in customEmojis.filter(e => e.category === null)" :key="emoji.name" :emoji="emoji" :class="{ [$style.skipRender]: defaultStore.state.skipNoteRender }"/>
</div>
</MkFoldableSection>
</div>
Expand All @@ -46,6 +46,7 @@ import MkFoldableSection from '@/components/MkFoldableSection.vue';
import { customEmojis, customEmojiCategories } from '@/custom-emojis.js';
import { i18n } from '@/i18n.js';
import { $i } from '@/account.js';
import { defaultStore } from '@/store.js';

const q = ref('');
const searchEmojis = ref<EmojiSimple[]>([]);
Expand All @@ -70,4 +71,9 @@ watch(q, () => {
grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
grid-gap: 12px;
}

.skipRender {
content-visibility: auto;
contain-intrinsic-size: 190px 66px;
}
</style>
Loading