feat(frontend): Misskey Gamesのリストに鯖缶指定のチャンネルを載せる (MisskeyIO#383)

This commit is contained in:
まっちゃとーにゅ 2024-01-24 19:57:51 +09:00 committed by GitHub
parent 7884901950
commit ac79f1fdc1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 232 additions and 13 deletions

View file

@ -382,6 +382,13 @@ export const meta = {
optional: false, nullable: false,
},
},
featuredGameChannels: {
type: 'array',
optional: false, nullable: false,
items: {
type: 'string',
},
},
backgroundImageUrl: {
type: 'string',
optional: false, nullable: true,
@ -589,6 +596,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
perUserListTimelineCacheMax: instance.perUserListTimelineCacheMax,
notesPerOneAd: instance.notesPerOneAd,
urlPreviewDenyList: instance.urlPreviewDenyList,
featuredGameChannels: instance.featuredGameChannels,
};
});
}

View file

@ -150,9 +150,16 @@ export const paramDef = {
type: 'string',
},
},
urlPreviewDenyList: { type: 'array', nullable: true, items: {
type: 'string',
} },
urlPreviewDenyList: {
type: 'array', nullable: true, items: {
type: 'string',
},
},
featuredGameChannels: {
type: 'array', nullable: true, items: {
type: 'string',
},
},
},
required: [],
} as const;
@ -208,6 +215,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
set.urlPreviewDenyList = ps.urlPreviewDenyList.filter(Boolean);
}
if (Array.isArray(ps.featuredGameChannels)) {
set.featuredGameChannels = ps.featuredGameChannels.filter(Boolean);
}
if (ps.themeColor !== undefined) {
set.themeColor = ps.themeColor;
}