Skip to content

Commit

Permalink
chg: isChildren -> categoryFolderFlag
Browse files Browse the repository at this point in the history
  • Loading branch information
meronmks committed Oct 26, 2023
1 parent 563bd78 commit 0ae2d13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/frontend/src/components/MkEmojiPicker.section.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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"
>
Expand All @@ -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[];
}>();
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/src/components/MkEmojiPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
>
Expand All @@ -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">
Expand Down

0 comments on commit 0ae2d13

Please sign in to comment.