fix(frontend): 絵文字パレットが空の状態でMisskeyについてのページが閲覧できない問題を修正 (#17243)

* fix(frontend): 絵文字パレットが空の状態でMisskeyについてのページが閲覧できない問題を修正

* Update Changelog

* extension

* add comment
This commit is contained in:
かっこかり
2026-03-18 21:34:28 +09:00
committed by GitHub
parent a3b0dc91e8
commit f16ef2ef56
4 changed files with 16 additions and 3 deletions

View File

@@ -4,7 +4,7 @@
- 依存関係の更新
### Client
-
- Fix: 絵文字パレットが空の状態でMisskeyについてのページが閲覧できない問題を修正
### Server
- Fix: 自分の行ったフォロワー限定投稿または指名投稿に自分自身でリアクションなどを行った場合のイベントが流れない問題を修正

View File

@@ -79,3 +79,9 @@ export const MFM_PARAMS: Record<typeof MFM_TAGS[number], string[]> = {
ruby: [],
unixtime: [],
};
/**
* デフォルトの絵文字。UIの演出などでも使用されるため空にしてはいけない
* 絵文字パレットのデフォルト絵文字を空にする等の場合は、preferenceのdefinition側の値を空にすること
*/
export const DEFAULT_EMOJIS = ['👍', '❤️', '😆', '🤔', '😮', '🎉', '💢', '😥', '😇', '🍮'];

View File

@@ -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({

View File

@@ -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;