mirror of
https://github.com/go-gitea/gitea
synced 2025-07-05 01:57:20 +00:00
Frontend refactor, PascalCase to camelCase, remove unused code (#17365)
* Frontend refactor, PascalCase to camelCase, remove unused code * fix
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
import emojis from '../../../assets/emoji.json';
|
||||
|
||||
const {AssetUrlPrefix} = window.config;
|
||||
const {CustomEmojis} = window.config;
|
||||
const {assetUrlPrefix} = window.config;
|
||||
const {customEmojis} = window.config;
|
||||
|
||||
const tempMap = {...CustomEmojis};
|
||||
const tempMap = {...customEmojis};
|
||||
for (const {emoji, aliases} of emojis) {
|
||||
for (const alias of aliases || []) {
|
||||
tempMap[alias] = emoji;
|
||||
@ -24,8 +24,8 @@ for (const key of emojiKeys) {
|
||||
// retrieve HTML for given emoji name
|
||||
export function emojiHTML(name) {
|
||||
let inner;
|
||||
if (Object.prototype.hasOwnProperty.call(CustomEmojis, name)) {
|
||||
inner = `<img alt=":${name}:" src="${AssetUrlPrefix}/img/emoji/${name}.png">`;
|
||||
if (Object.prototype.hasOwnProperty.call(customEmojis, name)) {
|
||||
inner = `<img alt=":${name}:" src="${assetUrlPrefix}/img/emoji/${name}.png">`;
|
||||
} else {
|
||||
inner = emojiString(name);
|
||||
}
|
||||
|
Reference in New Issue
Block a user