Merge remote-tracking branch 'misskey-original/develop' into develop
This commit is contained in:
commit
801697ccdd
53 changed files with 1100 additions and 173 deletions
|
|
@ -218,7 +218,7 @@ function getTextOptions(def: values.Value | undefined): Omit<AsUiText, 'id' | 't
|
|||
};
|
||||
}
|
||||
|
||||
function getMfmOptions(def: values.Value | undefined): Omit<AsUiMfm, 'id' | 'type'> {
|
||||
function getMfmOptions(def: values.Value | undefined, call: (fn: values.VFn, args: values.Value[]) => Promise<values.Value>): Omit<AsUiMfm, 'id' | 'type'> {
|
||||
utils.assertObject(def);
|
||||
|
||||
const text = def.value.get('text');
|
||||
|
|
@ -241,7 +241,7 @@ function getMfmOptions(def: values.Value | undefined): Omit<AsUiMfm, 'id' | 'typ
|
|||
color: color?.value,
|
||||
font: font?.value,
|
||||
onClickEv: (evId: string) => {
|
||||
if (onClickEv) call(onClickEv, values.STR(evId));
|
||||
if (onClickEv) call(onClickEv, [values.STR(evId)]);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,8 @@ for (let i = 0; i < emojilist.length; i++) {
|
|||
export const emojiCharByCategory = _charGroupByCategory;
|
||||
|
||||
export function getEmojiName(char: string): string | null {
|
||||
const idx = _indexByChar.get(char);
|
||||
// Colorize it because emojilist.json assumes that
|
||||
const idx = _indexByChar.get(colorizeEmoji(char));
|
||||
if (idx == null) {
|
||||
return null;
|
||||
} else {
|
||||
|
|
@ -44,6 +45,10 @@ export function getEmojiName(char: string): string | null {
|
|||
}
|
||||
}
|
||||
|
||||
export function colorizeEmoji(char: string) {
|
||||
return char.length === 1 ? `${char}\uFE0F` : char;
|
||||
}
|
||||
|
||||
export interface CustomEmojiFolderTree {
|
||||
value: string;
|
||||
category: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue