mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-14 20:25:39 +02:00
fix(frontend): 絵文字パレットが空の状態でMisskeyについてのページが閲覧できない問題を修正 (#17243)
* fix(frontend): 絵文字パレットが空の状態でMisskeyについてのページが閲覧できない問題を修正 * Update Changelog * extension * add comment
This commit is contained in:
@@ -150,6 +150,7 @@ import { definePage } from '@/page.js';
|
||||
import { claimAchievement, claimedAchievements } from '@/utility/achievements.js';
|
||||
import { $i } from '@/i.js';
|
||||
import { prefer } from '@/preferences.js';
|
||||
import { DEFAULT_EMOJIS } from '@@/js/const.js';
|
||||
|
||||
const patronsWithIcon = [{
|
||||
name: 'カイヤン',
|
||||
@@ -429,7 +430,12 @@ const containerEl = useTemplateRef('containerEl');
|
||||
|
||||
function iconLoaded() {
|
||||
if (containerEl.value == null) return;
|
||||
const emojis = prefer.s.emojiPalettes[0].emojis;
|
||||
const emojis = prefer.s.emojiPalettes[0]?.emojis ?? [];
|
||||
|
||||
if (emojis.length < DEFAULT_EMOJIS.length) {
|
||||
emojis.push(...DEFAULT_EMOJIS.slice(0, DEFAULT_EMOJIS.length - emojis.length));
|
||||
}
|
||||
|
||||
const containerWidth = containerEl.value.offsetWidth;
|
||||
for (let i = 0; i < 32; i++) {
|
||||
easterEggEmojis.value.push({
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { hemisphere } from '@@/js/intl-const.js';
|
||||
import { DEFAULT_EMOJIS } from '@@/js/const.js';
|
||||
import { prefersReducedMotion } from '@@/js/config.js';
|
||||
import { definePreferences } from './manager.js';
|
||||
import type { Theme } from '@/theme.js';
|
||||
@@ -103,7 +104,7 @@ export const PREF_DEF = definePreferences({
|
||||
default: () => [{
|
||||
id: genId(),
|
||||
name: '',
|
||||
emojis: ['👍', '❤️', '😆', '🤔', '😮', '🎉', '💢', '😥', '😇', '🍮'],
|
||||
emojis: DEFAULT_EMOJIS,
|
||||
}] as {
|
||||
id: string;
|
||||
name: string;
|
||||
|
||||
Reference in New Issue
Block a user