mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 15:34:13 +00:00 
			
		
		
		
	Fix linting in MkEmojiPicker and custom-emojis in frontend
This commit is contained in:
		
							parent
							
								
									695e7fd68e
								
							
						
					
					
						commit
						84f86f526d
					
				
					 2 changed files with 5 additions and 8 deletions
				
			
		| 
						 | 
					@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
<!-- このコンポーネントの要素のclassは親から利用されるのでむやみに弄らないこと -->
 | 
					<!-- このコンポーネントの要素のclassは親から利用されるのでむやみに弄らないこと -->
 | 
				
			||||||
<!-- フォルダの中にはカスタム絵文字だけ(Unicode絵文字もこっち) -->
 | 
					<!-- フォルダの中にはカスタム絵文字だけ(Unicode絵文字もこっち) -->
 | 
				
			||||||
<section v-if="!hasChildSection" :data-shown="shown" v-panel style="border-radius: var(--radius-sm); border-bottom: 0.5px solid var(--divider);">
 | 
					<section v-if="!hasChildSection" v-panel :data-shown="shown" style="border-radius: var(--radius-sm); border-bottom: 0.5px solid var(--divider);">
 | 
				
			||||||
	<header class="_acrylic" :data-shown="shown" @click="shown = !shown">
 | 
						<header class="_acrylic" :data-shown="shown" @click="shown = !shown">
 | 
				
			||||||
		<i class="toggle ti-fw" :class="shown ? 'ph-bold ph-caret-down' : 'ph-bold ph-caret-right'"></i> <slot></slot>
 | 
							<i class="toggle ti-fw" :class="shown ? 'ph-bold ph-caret-down' : 'ph-bold ph-caret-right'"></i> <slot></slot>
 | 
				
			||||||
		<span class="emoji-count"><i class="ph-smiley ph-bold ph-lg"></i> {{ emojis.length }}</span>
 | 
							<span class="emoji-count"><i class="ph-smiley ph-bold ph-lg"></i> {{ emojis.length }}</span>
 | 
				
			||||||
| 
						 | 
					@ -31,7 +31,7 @@ SPDX-License-Identifier: AGPL-3.0-only
 | 
				
			||||||
	<header class="_acrylic" :data-shown="shown" @click="shown = !shown">
 | 
						<header class="_acrylic" :data-shown="shown" @click="shown = !shown">
 | 
				
			||||||
		<i class="toggle ti-fw" :class="shown ? 'ph-bold ph-caret-down' : 'ph-bold ph-caret-right'"></i> <slot></slot>
 | 
							<i class="toggle ti-fw" :class="shown ? 'ph-bold ph-caret-down' : 'ph-bold ph-caret-right'"></i> <slot></slot>
 | 
				
			||||||
		<span class="emoji-count"><i class="ph-folder ph-bold"></i> {{ customEmojiTree?.length }}</span>
 | 
							<span class="emoji-count"><i class="ph-folder ph-bold"></i> {{ customEmojiTree?.length }}</span>
 | 
				
			||||||
		<span class="emoji-count" v-if="emojis.length > 0"><i class="ph-smiley ph-bold"></i> {{ emojis.length }}</span>
 | 
							<span v-if="emojis.length > 0" class="emoji-count"><i class="ph-smiley ph-bold"></i> {{ emojis.length }}</span>
 | 
				
			||||||
	</header>
 | 
						</header>
 | 
				
			||||||
	<div v-if="shown" style="padding-left: 9px;">
 | 
						<div v-if="shown" style="padding-left: 9px;">
 | 
				
			||||||
		<MkEmojiPickerSection
 | 
							<MkEmojiPickerSection
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,14 +22,11 @@ export const customEmojiCategories = computed<[ ...string[], null ]>(() => {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export function compareBySortKey(a: Misskey.entities.EmojiSimple, b: Misskey.entities.EmojiSimple): number {
 | 
					export function compareBySortKey(a: Misskey.entities.EmojiSimple, b: Misskey.entities.EmojiSimple): number {
 | 
				
			||||||
	if (a.sortKey === b.sortKey) {
 | 
						if (a.sortKey === b.sortKey) {
 | 
				
			||||||
		if (a.name === b.name)
 | 
							if (a.name === b.name) return 0;
 | 
				
			||||||
			return 0;
 | 
					 | 
				
			||||||
		return (a.name > b.name) ? 1 : -1;
 | 
							return (a.name > b.name) ? 1 : -1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (a.sortKey === null)
 | 
						if (a.sortKey === null) return 1;
 | 
				
			||||||
		return 1;
 | 
						if (b.sortKey === null) return -1;
 | 
				
			||||||
	if (b.sortKey === null)
 | 
					 | 
				
			||||||
		return -1;
 | 
					 | 
				
			||||||
	return (a.sortKey > b.sortKey) ? 1 : -1;
 | 
						return (a.sortKey > b.sortKey) ? 1 : -1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue