forked from FoundKeyGang/FoundKey
auto-fix lints with eslint
This commit is contained in:
parent
10e7e65279
commit
6c4655693e
3 changed files with 5 additions and 6 deletions
|
@ -134,8 +134,8 @@ function emojiSearch<Type>(src: Type[], max: number, query: string): Type[] {
|
||||||
const match = (str: string): boolean => str && re.test(str);
|
const match = (str: string): boolean => str && re.test(str);
|
||||||
const matches = src.filter(emoji =>
|
const matches = src.filter(emoji =>
|
||||||
match(emoji.name)
|
match(emoji.name)
|
||||||
|| emoji.aliases?.some(match) // custom emoji
|
|| emoji.aliases?.some(match) // custom emoji
|
||||||
|| emoji.keywords?.some(match) // unicode emoji
|
|| emoji.keywords?.some(match), // unicode emoji
|
||||||
);
|
);
|
||||||
// TODO: sort matches by distance to query
|
// TODO: sort matches by distance to query
|
||||||
if (max <= 0 || matches.length < max) return matches;
|
if (max <= 0 || matches.length < max) return matches;
|
||||||
|
@ -148,9 +148,9 @@ const queryCallback = (query) => {
|
||||||
searchResultCustom.value = emojiSearch(instance.emojis, maxCustomEmojiPicker.value, query);
|
searchResultCustom.value = emojiSearch(instance.emojis, maxCustomEmojiPicker.value, query);
|
||||||
searchResultUnicode.value = emojiSearch(emojilist, maxUnicodeEmojiPicker.value, query);
|
searchResultUnicode.value = emojiSearch(emojilist, maxUnicodeEmojiPicker.value, query);
|
||||||
queryTimeoutId = -1;
|
queryTimeoutId = -1;
|
||||||
}
|
};
|
||||||
watch(q, () => {
|
watch(q, () => {
|
||||||
if(queryTimeoutId >= 0) {
|
if (queryTimeoutId >= 0) {
|
||||||
clearTimeout(queryTimeoutId);
|
clearTimeout(queryTimeoutId);
|
||||||
queryTimeoutId = -1;
|
queryTimeoutId = -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,6 @@ const props = defineProps<{
|
||||||
showing: boolean;
|
showing: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
||||||
let top = $ref(0);
|
let top = $ref(0);
|
||||||
let left = $ref(0);
|
let left = $ref(0);
|
||||||
const zIndex = os.claimZIndex('middle');
|
const zIndex = os.claimZIndex('middle');
|
||||||
|
|
|
@ -65,7 +65,7 @@ const pagination = {
|
||||||
limit: 10,
|
limit: 10,
|
||||||
offsetMode: true,
|
offsetMode: true,
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
sort: sort,
|
sort,
|
||||||
host: host !== '' ? host : null,
|
host: host !== '' ? host : null,
|
||||||
...(
|
...(
|
||||||
state === 'federating' ? { federating: true } :
|
state === 'federating' ? { federating: true } :
|
||||||
|
|
Loading…
Reference in a new issue