chg: isChildren -> categoryFolderFlag

This commit is contained in:
meronmks 2023-10-26 22:48:40 +09:00
parent 563bd784db
commit 0ae2d136e5
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template>
<!-- このコンポーネントの要素のclassは親から利用されるのでむやみに弄らないこと -->
<!-- フォルダの中にはカスタム絵文字だけUnicode絵文字もこっち -->
<section v-if="!isChildren">
<section v-if="!categoryFolderFlag">
<header class="_acrylic" @click="shown = !shown">
<i class="toggle ti-fw" :class="shown ? 'ti ti-chevron-down' : 'ti ti-chevron-up'"></i> <slot></slot> (<i class="ti ti-icons ti-fw"></i>:{{emojis.length}})
</header>
@ -48,7 +48,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:key="`custom:${child.value}`"
:initialShown="initialShown"
:emojis="computed(() => customEmojis.filter(e => e.category === child.category).map(e => `:${e.name}:`))"
:isChildren="child.children.length!==0"
:categoryFolderFlag="child.children.length!==0"
:customEmojiTree="child.children"
@chosen="nestedChosen"
>
@ -68,7 +68,7 @@ import MkEmojiPickerSection from "@/components/MkEmojiPicker.section.vue";
const props = defineProps<{
emojis: string[] | Ref<string[]>;
initialShown?: boolean;
isChildren?: boolean;
categoryFolderFlag?: boolean;
customEmojiTree?: CustomEmojiFolderTree[];
}>();

View File

@ -77,7 +77,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:key="`custom:${child.value}`"
:initialShown="false"
:emojis="computed(() => customEmojis.filter(e => child.value === i18n.ts.other ? (e.category === 'null' || !e.category) : e.category === child.value).filter(filterAvailable).map(e => `:${e.name}:`))"
:isChildren="child.children.length!==0"
:categoryFolderFlag="child.children.length!==0"
:customEmojiTree="child.children"
@chosen="chosen"
>
@ -86,7 +86,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
<div v-once class="group">
<header class="_acrylic">{{ i18n.ts.emoji }}</header>
<XSection v-for="category in categories" :key="category" :emojis="emojiCharByCategory.get(category) ?? []" :isChildren="false" @chosen="chosen">{{ category }}</XSection>
<XSection v-for="category in categories" :key="category" :emojis="emojiCharByCategory.get(category) ?? []" :categoryFolderFlag="false" @chosen="chosen">{{ category }}</XSection>
</div>
</div>
<div class="tabs">