diff --git a/src/components/select-icon.tsx b/src/components/select-icon.tsx index cd606a7..4ee999a 100644 --- a/src/components/select-icon.tsx +++ b/src/components/select-icon.tsx @@ -22,12 +22,12 @@ const SelectIcons = (props: IProps) => { const i18n = inject('i18n'); - const ALLOWED_EMOJI_GROUP = ['object', 'symbols', 'flags', 'nature', 'people', 'activity', 'travel']; - const EmojisGroups = (window.siyuan.emojis as ImojiGroup[]).filter(emoji => ALLOWED_EMOJI_GROUP.includes(emoji.id)) - .sort((a, b) => ALLOWED_EMOJI_GROUP.indexOf(a.id) - ALLOWED_EMOJI_GROUP.indexOf(b.id)); + const ALLOWED_EMOJI_GROUP = ['activity', 'travel', 'people', 'nature', 'food', 'symbols', 'object', 'flags']; + let EmojisGroups = (window.siyuan.emojis as ImojiGroup[]).filter(emoji => ALLOWED_EMOJI_GROUP.includes(emoji.id)); + EmojisGroups.sort((a, b) => ALLOWED_EMOJI_GROUP.indexOf(a.id) - ALLOWED_EMOJI_GROUP.indexOf(b.id)) const emojiUnicodes = EmojisGroups.map(group => group.items.map(item => item.unicode)).flat(); - const SIZE = '20px' + const SIZE = '20px'; const AllSymbols = () => (
diff --git a/vite.config.ts b/vite.config.ts index 53f3c4b..0183a40 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -11,11 +11,12 @@ import vitePluginYamlI18n from './yaml-plugin'; export default defineConfig(({ mode }) => { const env = loadEnv(mode, process.cwd(), ''); const isSrcmap = env.VITE_SOURCEMAP === 'inline'; - const isDev = mode === 'development'; + const isDev = env.NODE_ENV === 'development'; const distDir = isDev ? "dev" : "dist"; console.log("isDev=>", isDev); console.log("isSrcmap=>", isSrcmap); + console.log("distDir=>", distDir); return { resolve: {