1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2025-01-19 08:13:14 +09:00

Fix: lint error

This commit is contained in:
meronmks 2023-10-22 14:14:58 +09:00
parent e1b45bd400
commit 808602cac8
No known key found for this signature in database
2 changed files with 5 additions and 8 deletions

View File

@ -42,11 +42,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkEmoji v-else class="emoji" :emoji="emoji" :normal="true"/> <MkEmoji v-else class="emoji" :emoji="emoji" :normal="true"/>
</button> </button>
</div> </div>
<div v-if="shown" style="padding-left: 18px;"> <div v-if="shown" v-for="child in customEmojiTree" style="padding-left: 18px;">
<!-- TODO: 再帰へのイベントの渡し方が微妙なのか反応はするがエフェクトが出ない --> <!-- TODO: 再帰へのイベントの渡し方が微妙なのか反応はするがエフェクトが出ない -->
<MkEmojiPickerSection <MkEmojiPickerSection
v-if="shown"
v-for="child in customEmojiTree"
:key="`custom:${child.value}`" :key="`custom:${child.value}`"
:initialShown="initialShown" :initialShown="initialShown"
:emojis="computed(() => customEmojis.filter(e => e.category === child.category).map(e => `:${e.name}:`))" :emojis="computed(() => customEmojis.filter(e => e.category === child.category).map(e => `:${e.name}:`))"
@ -62,9 +60,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed, Ref } from 'vue'; import { ref, computed, Ref } from 'vue';
import {CustomEmojiFolderTree, getEmojiName} from '@/scripts/emojilist.js'; import { CustomEmojiFolderTree, getEmojiName } from '@/scripts/emojilist.js';
import {i18n} from "../i18n.js"; import { i18n } from "../i18n.js";
import {customEmojis} from "@/custom-emojis.js"; import { customEmojis } from "@/custom-emojis.js";
import MkEmojiPickerSection from "@/components/MkEmojiPicker.section.vue"; import MkEmojiPickerSection from "@/components/MkEmojiPicker.section.vue";
const props = defineProps<{ const props = defineProps<{

View File

@ -153,12 +153,11 @@ const searchResultCustom = ref<Misskey.entities.CustomEmoji[]>([]);
const searchResultUnicode = ref<UnicodeEmojiDef[]>([]); const searchResultUnicode = ref<UnicodeEmojiDef[]>([]);
const tab = ref<'index' | 'custom' | 'unicode' | 'tags'>('index'); const tab = ref<'index' | 'custom' | 'unicode' | 'tags'>('index');
const customEmojiFolderRoot: CustomEmojiFolderTree = { value: "", category: "", children: [] }; const customEmojiFolderRoot: CustomEmojiFolderTree = { value: "", category: "", children: [] };
function parseAndMergeCategories(input: string, root: CustomEmojiFolderTree): CustomEmojiFolderTree { function parseAndMergeCategories(input: string, root: CustomEmojiFolderTree): CustomEmojiFolderTree {
const parts = input.split('/'); const parts = input.split('/');
var category = "" let category = ""
let currentNode: CustomEmojiFolderTree = root; let currentNode: CustomEmojiFolderTree = root;
for (const part of parts) { for (const part of parts) {