From 4ae1a659588a649f9b4f795840ac70b5be081dc6 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 9 Feb 2022 21:25:48 +0900 Subject: feat: インスタンスのテーマカラーを設定できるように MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/server/web/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'packages/backend/src/server/web/index.ts') diff --git a/packages/backend/src/server/web/index.ts b/packages/backend/src/server/web/index.ts index a0667f0c20..325121bbaf 100644 --- a/packages/backend/src/server/web/index.ts +++ b/packages/backend/src/server/web/index.ts @@ -200,6 +200,7 @@ router.get(['/@:user', '/@:user/:sub'], async (ctx, next) => { sub: ctx.params.sub, instanceName: meta.name || 'Misskey', icon: meta.iconUrl, + themeColor: meta.themeColor, }); ctx.set('Cache-Control', 'public, max-age=30'); } else { @@ -239,6 +240,7 @@ router.get('/notes/:note', async (ctx, next) => { summary: getNoteSummary(_note), instanceName: meta.name || 'Misskey', icon: meta.iconUrl, + themeColor: meta.themeColor, }); if (['public', 'home'].includes(note.visibility)) { @@ -277,6 +279,7 @@ router.get('/@:user/pages/:page', async (ctx, next) => { profile, instanceName: meta.name || 'Misskey', icon: meta.iconUrl, + themeColor: meta.themeColor, }); if (['public'].includes(page.visibility)) { @@ -307,6 +310,7 @@ router.get('/clips/:clip', async (ctx, next) => { profile, instanceName: meta.name || 'Misskey', icon: meta.iconUrl, + themeColor: meta.themeColor, }); ctx.set('Cache-Control', 'public, max-age=180'); @@ -330,6 +334,7 @@ router.get('/gallery/:post', async (ctx, next) => { profile, instanceName: meta.name || 'Misskey', icon: meta.iconUrl, + themeColor: meta.themeColor, }); ctx.set('Cache-Control', 'public, max-age=180'); @@ -353,6 +358,7 @@ router.get('/channels/:channel', async (ctx, next) => { channel: _channel, instanceName: meta.name || 'Misskey', icon: meta.iconUrl, + themeColor: meta.themeColor, }); ctx.set('Cache-Control', 'public, max-age=180'); @@ -412,6 +418,7 @@ router.get('(.*)', async ctx => { instanceName: meta.name || 'Misskey', desc: meta.description, icon: meta.iconUrl, + themeColor: meta.themeColor, }); ctx.set('Cache-Control', 'public, max-age=300'); }); -- cgit v1.3.1-freya